diff options
| author | jackpoz <giacomopoz@gmail.com> | 2015-12-07 20:06:02 +0100 |
|---|---|---|
| committer | MitchesD <majklprofik@seznam.cz> | 2016-01-15 20:34:27 +0100 |
| commit | 2f1bd93c9e943e584bcd576261da200eec91747f (patch) | |
| tree | 954fdcb524341c892f9646e7c36ecaacc69830d1 /src/server/scripts/EasternKingdoms/ScarletMonastery | |
| parent | a0719b75f33a81b3258008a4f0e9959bdae1e5d9 (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.
(cherry picked from commit 3267c90102068ed88c0bd7146ae747fe8ba44771)
# Conflicts:
# src/server/game/AI/SmartScripts/SmartScript.cpp
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletMonastery')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 8bc5412c610..7a6e3ec124d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -359,8 +359,8 @@ public: { die = false; if (Unit* body = ObjectAccessor::GetUnit(*me, bodyGUID)) - body->Kill(body); - me->Kill(me); + body->KillSelf(); + me->KillSelf(); } else wait -= diff; } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 7a7c30ed9bb..caab177d53f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -121,7 +121,7 @@ class instance_scarlet_monastery : public InstanceMapScript { Creature* add = instance->GetCreature(guid); if (add && add->IsAlive()) - add->Kill(add); + add->KillSelf(); } HorsemanAdds.clear(); HandleGameObject(PumpkinShrineGUID, false); |
