Core/Creatures: Minor HasSpell method cleanup

Cherry-picked improved from 5734788c02

(cherry picked from commit 3670779e8eb07c05f77e61e09486d85d7210e4ed)
This commit is contained in:
ariel-
2021-09-19 22:40:38 +02:00
committed by Shauren
parent 05c9b8c337
commit a54e5bf4c8
@@ -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