aboutsummaryrefslogtreecommitdiff
path: root/src/game/TemporarySummon.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-02 19:24:22 -0500
committermegamage <none@none>2009-05-02 19:24:22 -0500
commit122d94494523bd9e7fe8fabbacd11c08dbaba8f8 (patch)
tree54a52abd8d6bb27f72f9090a4e9fd78d14f69cab /src/game/TemporarySummon.cpp
parentabe9b27ee44dd8484b8b8992bba742480f4ab33a (diff)
*Update summon system.
*Fix the bug that shaman cannot summon fire elemental. *Fix the bug that totem meters cannot be displayed. --HG-- branch : trunk
Diffstat (limited to 'src/game/TemporarySummon.cpp')
-rw-r--r--src/game/TemporarySummon.cpp39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index cfbc2a65920..b5ef539ab0c 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -284,37 +284,46 @@ bool TempSummon::SetOwner(Unit *owner, bool apply)
return true;
}
-Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(properties, owner)
-, m_owner(owner), m_bonusdamage(0)
+Minion::Minion(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(properties, owner)
+, m_owner(owner)
{
- m_summonMask |= SUMMON_MASK_GUARDIAN;
- InitCharmInfo();
+ m_summonMask |= SUMMON_MASK_MINION;
}
-void Guardian::InitSummon(uint32 duration)
+void Minion::InitSummon(uint32 duration)
{
TempSummon::InitSummon(duration);
- SetReactState(REACT_AGGRESSIVE);
+ SetReactState(REACT_PASSIVE);
SetCreatorGUID(m_owner->GetGUID());
setFaction(m_owner->getFaction());
- if(m_owner->GetTypeId() == TYPEID_PLAYER)
- {
- m_charmInfo->InitCharmCreateSpells();
- //((Player*)m_owner)->CharmSpellInitialize();
- }
-
- m_owner->SetGuardian(this, true);
+ m_owner->SetMinion(this, true);
}
-void Guardian::RemoveFromWorld()
+void Minion::RemoveFromWorld()
{
if(!IsInWorld())
return;
- m_owner->SetGuardian(this, false);
+ m_owner->SetMinion(this, false);
TempSummon::RemoveFromWorld();
}
+Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner)
+, m_bonusdamage(0)
+{
+ m_summonMask |= SUMMON_MASK_GUARDIAN;
+ InitCharmInfo();
+}
+
+void Guardian::InitSummon(uint32 duration)
+{
+ if(m_owner->GetTypeId() == TYPEID_PLAYER)
+ m_charmInfo->InitCharmCreateSpells();
+
+ Minion::InitSummon(duration);
+
+ SetReactState(REACT_AGGRESSIVE);
+}