Core/Creatures: Minor HasSpell method cleanup

Cherry-picked improved from 5734788c02

(cherry picked from commit 3670779e8e)
This commit is contained in:
ariel-
2018-03-19 17:29:13 -03:00
committed by Shauren
parent 05c9b8c337
commit a54e5bf4c8

View File

@@ -2739,11 +2739,7 @@ void Creature::SendZoneUnderAttackMessage(Player* attacker)
bool Creature::HasSpell(uint32 spellID) const
{
for (uint8 i = 0; i < MAX_CREATURE_SPELLS; ++i)
if (spellID == m_spells[i])
return true;
return false;
return std::find(std::begin(m_spells), std::end(m_spells), spellID) != std::end(m_spells);
}
time_t Creature::GetRespawnTimeEx() const