Use PokeBattle_Pokemon#hasItem? instead of isConst?

This commit is contained in:
jonisavo
2020-09-06 15:41:46 +03:00
parent 97b2548a7e
commit e73bef533d
8 changed files with 34 additions and 35 deletions

View File

@@ -826,7 +826,7 @@ def pbGiveItemToPokemon(item,pkmn,scene,pkmnid=0)
end
if pkmn.hasItem?
olditemname = PBItems.getName(pkmn.item)
if isConst?(pkmn.item,PBItems,:LEFTOVERS)
if pkmn.hasItem?(:LEFTOVERS)
scene.pbDisplay(_INTL("{1} is already holding some {2}.\1",pkmn.name,olditemname))
elsif newitemname.starts_with_vowel?
scene.pbDisplay(_INTL("{1} is already holding an {2}.\1",pkmn.name,olditemname))