diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 586487fb8a..77fed0f493 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -5848,7 +5848,8 @@ void Player::GiveXpForGather(uint32 const& skillId, uint32 const& reqSkillValue) // Skip if the profession is no gather profession if (skillId != SKILL_HERBALISM && skillId != SKILL_MINING && skillId != SKILL_ARCHAEOLOGY) return; - uint32 areaId = GetBaseMap()->GetAreaId(GetPositionX(), GetPositionY(), GetPositionZ()); + + uint32 areaId = GetBaseMap()->GetAreaId(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ()); AreaTableEntry const* areaEntry = sAreaTableStore.LookupEntry(areaId); if (!areaEntry) @@ -27674,7 +27675,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy return nullptr; } - PhasingHandler::InheritPhaseShift(pet, this); if (!hasPetData) { Map* map = GetMap(); @@ -27691,8 +27691,6 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy if (!new_name.empty()) pet->SetName(new_name); - pet->CopyPhaseFrom(this); - pet->SetCreatorGUID(GetGUID()); pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, GetFaction()); @@ -27734,6 +27732,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy } } + PhasingHandler::InheritPhaseShift(pet, this); + if (duration > 0) pet->SetDuration(duration); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp index e4d2523478..8ffbe122e1 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp @@ -346,14 +346,14 @@ class boss_foe_reaper_5000 : public CreatureScript Trinity::NormalizeMapCoord(destX); Trinity::NormalizeMapCoord(destY); travelDistZ = 10.0f; - destZ = map->GetHeight(me->GetPhases(), destX, destY, respZ + travelDistZ - 2.0f, false); + destZ = map->GetHeight(me->GetPhaseShift(), destX, destY, respZ + travelDistZ - 2.0f, false); if (std::fabs(destZ - respZ) > travelDistZ) { - destZ = map->GetHeight(me->GetPhases(), destX, destY, respZ - 2.0f, true); + destZ = map->GetHeight(me->GetPhaseShift(), destX, destY, respZ - 2.0f, true); if (std::fabs(destZ - respZ) > travelDistZ) { - destZ = map->GetHeight(me->GetPhases(), destX, destY, respZ + travelDistZ - 2.0f, true); + destZ = map->GetHeight(me->GetPhaseShift(), destX, destY, respZ + travelDistZ - 2.0f, true); if (std::fabs(destZ - respZ) > travelDistZ) return; diff --git a/src/server/scripts/EasternKingdoms/Gilneas/chapter1.cpp b/src/server/scripts/EasternKingdoms/Gilneas/chapter1.cpp index 0ccd824bfb..a0e9e48bce 100644 --- a/src/server/scripts/EasternKingdoms/Gilneas/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/Gilneas/chapter1.cpp @@ -24,6 +24,7 @@ #include "ScriptedEscortAI.h" #include "CombatAI.h" #include "PassiveAI.h" +#include "PhasingHandler.h" #include "Player.h" #include "SpellInfo.h" #include "CreatureTextMgr.h" @@ -367,14 +368,12 @@ class npc_josiah_avery : public CreatureScript struct npc_josiah_averyAI : public PassiveAI { - npc_josiah_averyAI(Creature* creature) : PassiveAI(creature) - { - } + npc_josiah_averyAI(Creature* creature) : PassiveAI(creature) { } void IsSummonedBy(Unit* summoner) override { - me->SetInPhase(PHASE_ID_SUMMON, false, false); - me->SetInPhase(PHASE_ID_WOUND, false, true); + PhasingHandler::AddPhase(me, PHASE_ID_SUMMON, true); + PhasingHandler::AddPhase(me, PHASE_ID_WOUND, true); _playerGuid = summoner->GetGUID(); _events.ScheduleEvent(EVENT_COSMETIC_ATTACK, Milliseconds(500)); } diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 8870654f21..85dc7e3c35 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -1880,7 +1880,7 @@ class spell_mage_hot_streak : public SpellScriptLoader SPELL_MAGE_IMPROVED_HOT_STREAK_R1, SPELL_MAGE_IMPROVED_HOT_STREAK_R2, SPELL_MAGE_FIREBALL, - SPELL_MAGE_PYRO_BLAST, + SPELL_MAGE_PYROBLAST, SPELL_MAGE_FIRE_BLAST, SPELL_MAGE_FROSTFIRE_BOLT, SPELL_MAGE_SCORCH @@ -1896,7 +1896,7 @@ class spell_mage_hot_streak : public SpellScriptLoader switch (eventInfo.GetSpellInfo()->Id) { case SPELL_MAGE_FIREBALL: - case SPELL_MAGE_PYRO_BLAST: + case SPELL_MAGE_PYROBLAST: case SPELL_MAGE_FIRE_BLAST: case SPELL_MAGE_FROSTFIRE_BOLT: case SPELL_MAGE_SCORCH: @@ -2027,7 +2027,7 @@ class spell_mage_pyroblast : public SpellScriptLoader void HandleDamage(SpellEffIndex /*effIndex*/) { // Copy the spellpower coefficient from the original pyroblast spell - if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_MAGE_PYRO_BLAST)) + if (SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_MAGE_PYROBLAST)) { int32 damage = GetEffectValue(); if (Unit* target = GetHitUnit()) diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 85e9cc1aaf..33d5c51899 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -3057,7 +3057,7 @@ class npc_mage_orb : public CreatureScript pos.m_positionX = me->GetPositionX() + cos(pos.GetOrientation()) * 100.0f; pos.m_positionY = me->GetPositionY() + sin(pos.GetOrientation()) * 100.0f; float ground; - me->GetMap()->GetWaterOrGroundLevel(me->GetPhases(), pos.GetPositionX(), pos.GetPositionY(), me->GetPositionZ(), &ground); + me->GetMap()->GetWaterOrGroundLevel(me->GetPhaseShift(), pos.GetPositionX(), pos.GetPositionY(), me->GetPositionZ(), &ground); pos.m_positionZ = ground; Movement::MoveSplineInit init(me); init.SetSmooth();