diff options
author | Subv <subv2112@gmail.com> | 2014-06-01 22:27:29 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2014-06-01 22:27:29 -0500 |
commit | 48ec2df81fa8f88cd32d7a79b587603aedbd89e0 (patch) | |
tree | 1a6404c63979ee20a39f8b577db21541b37739c5 /src/server/game/Spells/SpellEffects.cpp | |
parent | 6bc62d730ed08e6e12d9b57d4914e98019298781 (diff) |
Core/Phases: Preliminary work with correctly implementing the phase system in 4.3.4
Put here for peer review.
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 18 |
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); |