Core/Creatures: Minor HasSpell method cleanup

Cherry-picked improved from 5734788c02
This commit is contained in:
ariel-
2018-03-19 17:29:13 -03:00
parent d88b50a6ad
commit 3670779e8e

View File

@@ -2586,11 +2586,7 @@ uint32 Creature::GetShieldBlockValue() const //dunno mob block
bool Creature::HasSpell(uint32 spellID) const
{
uint8 i;
for (i = 0; i < MAX_CREATURE_SPELLS; ++i)
if (spellID == m_spells[i])
break;
return i < MAX_CREATURE_SPELLS; //broke before end of iteration of known spells
return std::find(std::begin(m_spells), std::end(m_spells), spellID) != std::end(m_spells);
}
time_t Creature::GetRespawnTimeEx() const