Fixes crash in safari zone because of type icons

This commit is contained in:
infinitefusion
2024-12-21 17:11:30 -05:00
parent 81489ec8e6
commit c846150afd

View File

@@ -275,7 +275,6 @@ class PokemonDataBox < SpriteWrapper
0,(s-1)*STATUS_ICON_HEIGHT,-1,STATUS_ICON_HEIGHT])
end
#Draw type icons (foe Pokémon only)
if @battler.opposes?(0) && $PokemonSystem.type_icons
drawEnemyTypeIcons(imagePos)
@@ -287,6 +286,7 @@ class PokemonDataBox < SpriteWrapper
end
def drawEnemyTypeIcons(imagePos)
return if @battler.is_a?(PokeBattle_FakeBattler)
type1_number = GameData::Type.get(@battler.type1).id_number
type2_number = GameData::Type.get(@battler.type2).id_number