aboutsummaryrefslogtreecommitdiff
path: root/src/game/TemporarySummon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/TemporarySummon.cpp')
-rw-r--r--src/game/TemporarySummon.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/game/TemporarySummon.cpp b/src/game/TemporarySummon.cpp
index ab7ebbcca3e..75d34ed2f3b 100644
--- a/src/game/TemporarySummon.cpp
+++ b/src/game/TemporarySummon.cpp
@@ -205,6 +205,8 @@ void TempSummon::InitStats(uint32 duration)
if(m_Properties->Faction)
setFaction(m_Properties->Faction);
+ else if(IsVehicle()) // properties should be vehicle
+ setFaction(owner->getFaction());
}
void TempSummon::InitSummon()
@@ -287,16 +289,6 @@ void Minion::InitStats(uint32 duration)
m_owner->SetMinion(this, true);
}
-void Minion::InitSummon()
-{
- TempSummon::InitSummon();
-
- if(m_owner->GetTypeId() == TYPEID_PLAYER
- && m_owner->GetMinionGUID() == GetGUID()
- && !m_owner->GetCharmGUID())
- ((Player*)m_owner)->CharmSpellInitialize();
-}
-
void Minion::RemoveFromWorld()
{
if(!IsInWorld())
@@ -329,6 +321,16 @@ void Guardian::InitStats(uint32 duration)
SetReactState(REACT_AGGRESSIVE);
}
+void Guardian::InitSummon()
+{
+ TempSummon::InitSummon();
+
+ if(m_owner->GetTypeId() == TYPEID_PLAYER
+ && m_owner->GetMinionGUID() == GetGUID()
+ && !m_owner->GetCharmGUID())
+ ((Player*)m_owner)->CharmSpellInitialize();
+}
+
Puppet::Puppet(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner)
{
assert(owner->GetTypeId() == TYPEID_PLAYER);