diff options
Diffstat (limited to 'src/game/TemporarySummon.cpp')
| -rw-r--r-- | src/game/TemporarySummon.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp index ed0849a98d6..dd50480e770 100644 --- a/src/game/TemporarySummon.cpp +++ b/src/game/TemporarySummon.cpp @@ -198,9 +198,9 @@ void TempSummon::InitSummon(uint32 duration) { if(owner->m_SummonSlot[slot] && owner->m_SummonSlot[slot] != GetGUID()) { - Creature *OldTotem = GetMap()->GetCreature(owner->m_SummonSlot[slot]); - if(OldTotem && OldTotem->isSummon()) - ((TempSummon*)OldTotem)->UnSummon(); + Creature *oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]); + if(oldSummon && oldSummon->isSummon()) + ((TempSummon*)oldSummon)->UnSummon(); } owner->m_SummonSlot[slot] = GetGUID(); } @@ -264,7 +264,10 @@ bool TempSummon::SetOwner(Unit *owner, bool apply) return false; } if(owner->GetTypeId() == TYPEID_PLAYER) + { m_ControlledByPlayer = true; + SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + } } else { |
