aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 8dfa017467a..ab05cd235eb 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3200,6 +3200,9 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
return;
}
+ for (auto phase : m_caster->GetPhases())
+ pGameObj->SetInPhase(phase, false, true);
+
int32 duration = m_spellInfo->GetDuration();
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -3221,6 +3224,9 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
if (linkedGO->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, map,
m_caster->GetPhaseMask(), x, y, z, target->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
+ for (auto phase : m_caster->GetPhases())
+ linkedGO->SetInPhase(phase, false, true);
+
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
linkedGO->SetSpellId(m_spellInfo->Id);
@@ -3872,6 +3878,9 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
return;
}
+ for (auto phase : m_caster->GetPhases())
+ pGameObj->SetInPhase(phase, false, true);
+
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction());
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
int32 duration = m_spellInfo->GetDuration();
@@ -4228,6 +4237,9 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
return;
}
+ for (auto phase : m_caster->GetPhases())
+ go->SetInPhase(phase, false, true);
+
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
int32 duration = m_spellInfo->GetDuration();
go->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -4857,6 +4869,9 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
return;
}
+ for (auto phase : m_caster->GetPhases())
+ pGameObj->SetInPhase(phase, false, true);
+
int32 duration = m_spellInfo->GetDuration();
switch (goinfo->type)
@@ -4919,6 +4934,9 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
if (linkedGO->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, cMap,
m_caster->GetPhaseMask(), fx, fy, fz, m_caster->GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
{
+ for (auto phase : m_caster->GetPhases())
+ linkedGO->SetInPhase(phase, false, true);
+
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
//linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
linkedGO->SetSpellId(m_spellInfo->Id);