mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Creatures: Minor HasSpell method cleanup
Cherry-picked improved from 5734788c02
This commit is contained in:
@@ -2586,11 +2586,7 @@ uint32 Creature::GetShieldBlockValue() const //dunno mob block
|
||||
|
||||
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