mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
Core/Phases: Preliminary work with correctly implementing the phase system in 4.3.4
Put here for peer review.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user