From 2d0ad050485f50d02bcc6f6b5059bcca4f8b14a5 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Tue, 30 May 2023 15:23:18 +0200 Subject: [PATCH] Fixed GameMode evolution items crash --- P3D/Pokemon/Monster/EvolutionCondition.vb | 29 +++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/P3D/Pokemon/Monster/EvolutionCondition.vb b/P3D/Pokemon/Monster/EvolutionCondition.vb index e3098d7cd..06ee848a8 100644 --- a/P3D/Pokemon/Monster/EvolutionCondition.vb +++ b/P3D/Pokemon/Monster/EvolutionCondition.vb @@ -174,11 +174,20 @@ Public Class EvolutionCondition 'REMOVE HELD ITEM CHECK End If Else - If p.Item.ID <> CInt(c.Argument) Then - canEvolve = False - 'ElseIf c.Trigger = EvolutionTrigger.Trading Then - 'REMOVE HELD ITEM CHECK + If Item.GetItemByID(c.Argument).IsGameModeItem Then + If p.Item.ID.ToString <> c.Argument Then + canEvolve = False + 'ElseIf c.Trigger = EvolutionTrigger.Trading Then + 'REMOVE HELD ITEM CHECK + End If + Else + If p.Item.ID <> CInt(c.Argument) Then + canEvolve = False + 'ElseIf c.Trigger = EvolutionTrigger.Trading Then + 'REMOVE HELD ITEM CHECK + End If End If + End If End If Case ConditionTypes.InParty @@ -204,13 +213,19 @@ Public Class EvolutionCondition canEvolve = False End If Case ConditionTypes.Item - If p.Item.IsGameModeItem = True Then + If Item.GetItemByID(arg).IsGameModeItem = True Then If arg <> c.Argument Then canEvolve = False End If Else - If CInt(arg) <> CInt(c.Argument) Then - canEvolve = False + If Item.GetItemByID(c.Argument).IsGameModeItem = True Then + If arg <> c.Argument Then + canEvolve = False + End If + Else + If CInt(arg) <> CInt(c.Argument) Then + canEvolve = False + End If End If End If Case ConditionTypes.Level