mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/SAI: Fix two memoryleaks in my previous commits. Thanks to @Xter for the notice.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user