aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-28 00:07:03 -0500
committermegamage <none@none>2009-04-28 00:07:03 -0500
commitb75f3e710211124820c7028df3c07b54a464ab5e (patch)
tree4a389892aa289725c1da600d384bdf1c13ad5c73 /src
parent71841e5f43fa00a866ceb8f75d365aaa54e38ecb (diff)
*Fix a bug that totem cannot be summoned.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Totem.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 3bee1c005b2..1b23b40fa37 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -36,7 +36,7 @@ Totem::Totem(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(
void Totem::Update( uint32 time )
{
Unit *owner = GetOwner();
- if (!owner || !owner->isAlive() || !this->isAlive())
+ if (!owner || !owner->isAlive() || !isAlive())
{
UnSummon(); // remove self
return;
@@ -117,7 +117,7 @@ void Totem::UnSummon()
CombatStop();
RemoveAurasDueToSpell(GetSpell());
- Unit *owner = this->GetOwner();
+ Unit *owner = GetOwner();
if (owner)
{
// clear owenr's totem slot
@@ -156,10 +156,7 @@ void Totem::UnSummon()
Unit *Totem::GetOwner()
{
- uint64 ownerid = GetOwnerGUID();
- if(!ownerid)
- return NULL;
- return ObjectAccessor::GetUnit(*this, ownerid);
+ return GetSummoner();
}
bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const