diff options
| author | jackpoz <giacomopoz@gmail.com> | 2015-12-07 20:06:02 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2015-12-07 20:06:02 +0100 |
| commit | 3267c90102068ed88c0bd7146ae747fe8ba44771 (patch) | |
| tree | 9689330f246f04104e01de5c3a07191d32ef0682 /src/server/game/AI/SmartScripts | |
| parent | ee12982008267184aea0616554cfafaa9227c60c (diff) | |
Core/Unit: Add Unit::KillSelf() overload
Add Unit::KillSelf() function as overload of Unit::Kill(this) . Use KillSelf() whenever the killer and the victim are the same to clearly state the Unit is going to kill itself.
Diffstat (limited to 'src/server/game/AI/SmartScripts')
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index a1703dfa78f..7ca4274bc40 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -979,7 +979,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (me && !me->isDead()) { - me->Kill(me); + me->KillSelf(); TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_DIE: Creature %u", me->GetGUID().GetCounter()); } break; @@ -1249,7 +1249,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!IsUnit(*itr)) continue; - (*itr)->ToUnit()->Kill((*itr)->ToUnit()); + (*itr)->ToUnit()->KillSelf(); } delete targets; |
