Core/Entities: Phase Rework (main commit)
This commit is contained in:
1 parent
4a268b3fd3
commit
e44bb5f387
79 files changed
+1738
-851
No files matched your search
@@ -25,6 +25,7 @@
|
||||
#include "World.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "Player.h"
|
||||
#include "SkillExtraItems.h"
|
||||
#include "Unit.h"
|
||||
@@ -3165,7 +3166,7 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
pGameObj->CopyPhaseFrom(m_caster);
|
||||
PhasingHandler::InheritPhaseShift(pGameObj, m_caster);
|
||||
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
@@ -3184,6 +3185,8 @@ void Spell::EffectSummonObjectWild(SpellEffIndex effIndex)
|
||||
|
||||
if (GameObject* linkedTrap = pGameObj->GetLinkedTrap())
|
||||
{
|
||||
PhasingHandler::InheritPhaseShift(linkedTrap, m_caster);
|
||||
|
||||
linkedTrap->SetRespawnTime(duration > 0 ? duration / IN_MILLISECONDS : 0);
|
||||
linkedTrap->SetSpellId(m_spellInfo->Id);
|
||||
|
||||
@@ -3773,7 +3776,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
pGameObj->CopyPhaseFrom(m_caster);
|
||||
PhasingHandler::InheritPhaseShift(pGameObj, m_caster);
|
||||
|
||||
pGameObj->SetFaction(m_caster->GetFaction());
|
||||
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
|
||||
@@ -4134,7 +4137,7 @@ void Spell::EffectSummonObject(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
go->CopyPhaseFrom(m_caster);
|
||||
PhasingHandler::InheritPhaseShift(go, m_caster);
|
||||
|
||||
//pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
@@ -4848,7 +4851,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
pGameObj->CopyPhaseFrom(m_caster);
|
||||
PhasingHandler::InheritPhaseShift(pGameObj, m_caster);
|
||||
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
@@ -4908,6 +4911,8 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
if (GameObject* linkedTrap = pGameObj->GetLinkedTrap())
|
||||
{
|
||||
PhasingHandler::InheritPhaseShift(linkedTrap, m_caster);
|
||||
|
||||
linkedTrap->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
|
||||
//linkedTrap->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel());
|
||||
linkedTrap->SetSpellId(m_spellInfo->Id);
|
||||
@@ -5742,7 +5747,7 @@ void Spell::EffectUpdatePlayerPhase(SpellEffIndex /*effIndex*/)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
unitTarget->UpdateAreaPhase();
|
||||
PhasingHandler::OnConditionChange(unitTarget);
|
||||
}
|
||||
|
||||
void Spell::EffectUpdateZoneAurasAndPhases(SpellEffIndex /*effIndex*/)
|
||||
|
||||
Reference in new issue
Block a user