aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.cpp8
-rwxr-xr-xsrc/server/game/Entities/Creature/TemporarySummon.h2
-rwxr-xr-xsrc/server/game/Entities/Totem/Totem.cpp2
-rwxr-xr-xsrc/server/game/Entities/Totem/Totem.h2
4 files changed, 4 insertions, 10 deletions
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index ff39a482187..43b29c600d6 100755
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -21,7 +21,6 @@
#include "CreatureAI.h"
#include "ObjectMgr.h"
#include "TemporarySummon.h"
-#include "Totem.h"
TempSummon::TempSummon(SummonPropertiesEntry const* properties, Unit* owner, bool isWorldObject) :
Creature(isWorldObject), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN),
@@ -196,12 +195,7 @@ void TempSummon::InitStats(uint32 duration)
{
Creature* oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]);
if (oldSummon && oldSummon->isSummon())
- {
- if (oldSummon->isTotem())
- oldSummon->ToTotem()->UnSummon();
- else
- oldSummon->ToTempSummon()->UnSummon();
- }
+ oldSummon->ToTempSummon()->UnSummon();
}
owner->m_SummonSlot[slot] = GetGUID();
}
diff --git a/src/server/game/Entities/Creature/TemporarySummon.h b/src/server/game/Entities/Creature/TemporarySummon.h
index 537bbd9c099..ba7faf60ddf 100755
--- a/src/server/game/Entities/Creature/TemporarySummon.h
+++ b/src/server/game/Entities/Creature/TemporarySummon.h
@@ -29,7 +29,7 @@ class TempSummon : public Creature
void Update(uint32 time);
virtual void InitStats(uint32 lifetime);
virtual void InitSummon();
- void UnSummon(uint32 msTime = 0);
+ virtual void UnSummon(uint32 msTime = 0);
void RemoveFromWorld();
void SetTempSummonType(TempSummonType type);
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
diff --git a/src/server/game/Entities/Totem/Totem.cpp b/src/server/game/Entities/Totem/Totem.cpp
index 063d017d1db..a9a0484a4ea 100755
--- a/src/server/game/Entities/Totem/Totem.cpp
+++ b/src/server/game/Entities/Totem/Totem.cpp
@@ -96,7 +96,7 @@ void Totem::InitSummon()
CastSpell(this, GetSpell(1), true);
}
-void Totem::UnSummon()
+void Totem::UnSummon(uint32 msTime)
{
CombatStop();
RemoveAurasDueToSpell(GetSpell(), GetGUID());
diff --git a/src/server/game/Entities/Totem/Totem.h b/src/server/game/Entities/Totem/Totem.h
index f1429d1771d..6271253498d 100755
--- a/src/server/game/Entities/Totem/Totem.h
+++ b/src/server/game/Entities/Totem/Totem.h
@@ -40,7 +40,7 @@ class Totem : public Minion
void Update(uint32 time);
void InitStats(uint32 duration);
void InitSummon();
- void UnSummon();
+ void UnSummon(uint32 msTime = 0);
uint32 GetSpell(uint8 slot = 0) const { return m_spells[slot]; }
uint32 GetTotemDuration() const { return m_duration; }
void SetTotemDuration(uint32 duration) { m_duration = duration; }