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, 6 insertions, 12 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 67ef2c73811..61634e2be7c 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -3218,8 +3218,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
return;
}
- for (auto phase : m_caster->GetPhases())
- pGameObj->SetInPhase(phase, false, true);
+ pGameObj->CopyPhaseFrom(m_caster);
int32 duration = m_spellInfo->GetDuration();
@@ -3242,8 +3241,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
if (linkedGO->Create(sObjectMgr->GetGenerator<HighGuid::GameObject>()->Generate(), 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->CopyPhaseFrom(m_caster);
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
linkedGO->SetSpellId(m_spellInfo->Id);
@@ -3877,8 +3875,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
return;
}
- for (auto phase : m_caster->GetPhases())
- pGameObj->SetInPhase(phase, false, true);
+ pGameObj->CopyPhaseFrom(m_caster);
pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction());
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
@@ -4250,8 +4247,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
return;
}
- for (auto phase : m_caster->GetPhases())
- go->SetInPhase(phase, false, true);
+ go->CopyPhaseFrom(m_caster);
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
int32 duration = m_spellInfo->GetDuration();
@@ -4888,8 +4884,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
return;
}
- for (auto phase : m_caster->GetPhases())
- pGameObj->SetInPhase(phase, false, true);
+ pGameObj->CopyPhaseFrom(m_caster);
int32 duration = m_spellInfo->GetDuration();
@@ -4953,8 +4948,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
if (linkedGO->Create(sObjectMgr->GetGenerator<HighGuid::GameObject>()->Generate(), linkedEntry, cMap,
0, 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->CopyPhaseFrom(m_caster);
linkedGO->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
//linkedGO->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());