From 7b344747e9b53be84eab6199d1799f85d4b03cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 24 Mar 2017 17:17:08 +0800 Subject: [PATCH] =?UTF-8?q?Limit=20the=20max=20level=20of=20Pok=C3=A9mons?= =?UTF-8?q?=20to=2040.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PokemonGoIV/0Main.vb | 15 +++++++++++---- oxt/PokemonGoIV/0Main.xba | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/PokemonGoIV/0Main.vb b/PokemonGoIV/0Main.vb index f7fc9be..5a5bf13 100644 --- a/PokemonGoIV/0Main.vb +++ b/PokemonGoIV/0Main.vb @@ -89,7 +89,7 @@ Function fnFindIV ( _ Dim fLevel As Double, nStamina As Integer Dim nAttack As Integer, nDefense As integer Dim nI As Integer, nJ As Integer - Dim fStep As Double, nN As Integer + Dim fStep As Double, nN As Integer, nMaxLevel As Integer If aQuery.sPokemonId = "" Then fnFindIV = maIV @@ -114,6 +114,10 @@ Function fnFindIV ( _ Next nI End If nN = -1 + nMaxLevel = aQuery.nPlayerLevel + 1.5 + If nMaxLevel > 40 Then + nMaxLevel = 40 + End If For fLevel = 1 To UBound (mStardust) Step fStep If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then For nStamina = 0 To 15 @@ -134,8 +138,7 @@ Function fnFindIV ( _ End With If aQuery.nPlayerLevel <> 0 Then maIV (nN).nMaxCP = fnCalcCP ( _ - aBaseStats, _ - aQuery.nPlayerLevel + 1.5, _ + aBaseStats, nMaxLevel, _ nAttack, nDefense, nStamina) End If maIV (nN).maEvolved _ @@ -147,7 +150,11 @@ Function fnFindIV ( _ fLevel, nAttack, _ nDefense, nStamina) If aQuery.nPlayerLevel <> 0 Then - maIV (nN).maEvolved (nI).nMaxCP = fnCalcCP (maEvBaseStats (nI), aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina) + maIV (nN).maEvolved (nI).nMaxCP _ + = fnCalcCP ( _ + maEvBaseStats (nI), _ + nMaxLevel, nAttack, _ + nDefense, nStamina) End If Next nI End If diff --git a/oxt/PokemonGoIV/0Main.xba b/oxt/PokemonGoIV/0Main.xba index 8cf2aae..d107f06 100644 --- a/oxt/PokemonGoIV/0Main.xba +++ b/oxt/PokemonGoIV/0Main.xba @@ -91,7 +91,7 @@ Function fnFindIV ( _ Dim fLevel As Double, nStamina As Integer Dim nAttack As Integer, nDefense As integer Dim nI As Integer, nJ As Integer - Dim fStep As Double, nN As Integer + Dim fStep As Double, nN As Integer, nMaxLevel As Integer If aQuery.sPokemonId = "" Then fnFindIV = maIV @@ -116,6 +116,10 @@ Function fnFindIV ( _ Next nI End If nN = -1 + nMaxLevel = aQuery.nPlayerLevel + 1.5 + If nMaxLevel > 40 Then + nMaxLevel = 40 + End If For fLevel = 1 To UBound (mStardust) Step fStep If mStardust (CInt (fLevel - 0.5)) = aQuery.nStardust Then For nStamina = 0 To 15 @@ -136,8 +140,7 @@ Function fnFindIV ( _ End With If aQuery.nPlayerLevel <> 0 Then maIV (nN).nMaxCP = fnCalcCP ( _ - aBaseStats, _ - aQuery.nPlayerLevel + 1.5, _ + aBaseStats, nMaxLevel, _ nAttack, nDefense, nStamina) End If maIV (nN).maEvolved _ @@ -149,7 +152,11 @@ Function fnFindIV ( _ fLevel, nAttack, _ nDefense, nStamina) If aQuery.nPlayerLevel <> 0 Then - maIV (nN).maEvolved (nI).nMaxCP = fnCalcCP (maEvBaseStats (nI), aQuery.nPlayerLevel + 1.5, nAttack, nDefense, nStamina) + maIV (nN).maEvolved (nI).nMaxCP _ + = fnCalcCP ( _ + maEvBaseStats (nI), _ + nMaxLevel, nAttack, _ + nDefense, nStamina) End If Next nI End If