Core/Creatures: Minor HasSpell method cleanup

Cherry-picked improved from 5734788c0277d7f342d534dca63db0ce4e862bc5
This commit is contained in:
ariel- authored and Aokromes committed 2018-03-29 00:58:17 +02:00
1 parent cc78ff1291
commit 00db1e6b22
1 file changed
+1 -5
@@ -2391,11 +2391,7 @@ void Creature::SetInCombatWithZone()
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