diff options
author | Discover- <amort11@hotmail.com> | 2013-12-19 10:28:45 +0100 |
---|---|---|
committer | Discover- <amort11@hotmail.com> | 2013-12-19 10:28:45 +0100 |
commit | e44e932d4dd56d76ef36e332b3e55cab4e4219c6 (patch) | |
tree | 4c3fc7c3648553c2b0ffbec563faf005b99a0519 | |
parent | ec62bc6e8820b38516cf8b332fc12134cdabef5d (diff) |
Core/SAI: Fix two memoryleaks in my previous commits. Thanks to @Xter for the notice.
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index a36621f87d5..21539584cd6 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1059,6 +1059,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u (*itr)->ToCreature()->DespawnOrUnsummon(e.action.forceDespawn.delay); } + delete targets; break; } case SMART_ACTION_SET_INGAME_PHASE_MASK: @@ -1076,6 +1077,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u (*itr)->ToGameObject()->SetPhaseMask(e.action.ingamePhaseMask.mask, true); } + delete targets; break; } case SMART_ACTION_MOUNT_TO_ENTRY_OR_MODEL: @@ -1120,6 +1122,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u ai->SetInvincibilityHpLevel(me->CountPctFromMaxHealth(e.action.invincHP.percent)); else ai->SetInvincibilityHpLevel(e.action.invincHP.minHP); + break; } case SMART_ACTION_SET_DATA: |