Core/Creatures: Minor HasSpell method cleanup
Cherry-picked improved from 5734788c0277d7f342d534dca63db0ce4e862bc5
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user