mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Creatures: Minor HasSpell method cleanup
Cherry-picked improved from5734788c02(cherry picked from commit3670779e8e)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user