aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTraesh <Traesh@users.noreply.github.com>2018-03-19 17:51:27 +0100
committerShauren <shauren.trinity@gmail.com>2018-03-19 17:51:27 +0100
commit5734788c0277d7f342d534dca63db0ce4e862bc5 (patch)
treed429c1106ba113c5580eb6c7363ee5b78f5c2b68 /src
parent463b943ecac266b1e1571b0fe6ded5cbd1bba21b (diff)
Core/Creatures: Minor HasSpell method cleanup (#21669)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 395d4793f01..6b28aae6562 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2428,11 +2428,11 @@ void Creature::SetInCombatWithZone()
bool Creature::HasSpell(uint32 spellID) const
{
- uint8 i;
- for (i = 0; i < MAX_CREATURE_SPELLS; ++i)
+ for (uint8 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 true;
+
+ return false;
}
time_t Creature::GetRespawnTimeEx() const