*Fix a bug that totem cannot be summoned.
--HG-- branch : trunk
This commit is contained in:
+3
-6
@@ -36,7 +36,7 @@ Totem::Totem(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(
|
|||||||
void Totem::Update( uint32 time )
|
void Totem::Update( uint32 time )
|
||||||
{
|
{
|
||||||
Unit *owner = GetOwner();
|
Unit *owner = GetOwner();
|
||||||
if (!owner || !owner->isAlive() || !this->isAlive())
|
if (!owner || !owner->isAlive() || !isAlive())
|
||||||
{
|
{
|
||||||
UnSummon(); // remove self
|
UnSummon(); // remove self
|
||||||
return;
|
return;
|
||||||
@@ -117,7 +117,7 @@ void Totem::UnSummon()
|
|||||||
|
|
||||||
CombatStop();
|
CombatStop();
|
||||||
RemoveAurasDueToSpell(GetSpell());
|
RemoveAurasDueToSpell(GetSpell());
|
||||||
Unit *owner = this->GetOwner();
|
Unit *owner = GetOwner();
|
||||||
if (owner)
|
if (owner)
|
||||||
{
|
{
|
||||||
// clear owenr's totem slot
|
// clear owenr's totem slot
|
||||||
@@ -156,10 +156,7 @@ void Totem::UnSummon()
|
|||||||
|
|
||||||
Unit *Totem::GetOwner()
|
Unit *Totem::GetOwner()
|
||||||
{
|
{
|
||||||
uint64 ownerid = GetOwnerGUID();
|
return GetSummoner();
|
||||||
if(!ownerid)
|
|
||||||
return NULL;
|
|
||||||
return ObjectAccessor::GetUnit(*this, ownerid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const
|
bool Totem::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const
|
||||||
|
|||||||
Reference in New Issue
Block a user