From ed1fa6282e1c26755bf6af739570bdb6d06b799b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 21 Sep 2021 18:56:36 -0400 Subject: [PATCH] Core/Creatures: Minor HasSpell method cleanup Port From (https://github.com/TrinityCore/TrinityCore/commit/a54e5bf4c8fda8595465b043effd4ce51ce3311d) --- Source/Game/Entities/Creature/Creature.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index a9a5d3ec3..0079dbb85 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2421,11 +2421,7 @@ namespace Game.Entities public override bool HasSpell(uint spellId) { - for (byte i = 0; i < SharedConst.MaxCreatureSpells; ++i) - if (spellId == m_spells[i]) - return true; - - return false; + return m_spells.Contains(spellId); } public long GetRespawnTimeEx()