From 280b8dc7992f941abd06267c3bd50c2d0f9fab22 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Wed, 22 Jul 2020 15:21:50 +0200 Subject: [PATCH] Fixed build --- src/server/game/AI/PlayerAI/PlayerAI.cpp | 2 +- src/server/game/Entities/Player/Player.cpp | 4 ++-- src/server/game/Instances/InstanceScript.cpp | 4 ++-- .../MagistersTerrace/boss_selin_fireheart.cpp | 6 +++--- .../SunwellPlateau/boss_kalecgos.cpp | 14 +++++++------- .../SunwellPlateau/instance_sunwell_plateau.cpp | 1 + .../boss_blackheart_the_inciter.cpp | 4 ++-- .../ShadowLabyrinth/instance_shadow_labyrinth.cpp | 1 + 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/server/game/AI/PlayerAI/PlayerAI.cpp b/src/server/game/AI/PlayerAI/PlayerAI.cpp index 46ae2dbfc4c..5171fe108b1 100644 --- a/src/server/game/AI/PlayerAI/PlayerAI.cpp +++ b/src/server/game/AI/PlayerAI/PlayerAI.cpp @@ -1268,7 +1268,7 @@ void SimpleCharmedPlayerAI::UpdateAI(const uint32 diff) me->CastStop(); me->StopMoving(); me->GetMotionMaster()->Clear(); - me->GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); + me->FollowTarget(target); } return; } diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 355b24e64e4..ade61344c0b 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -10944,7 +10944,7 @@ InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool return EQUIP_ERR_GENERIC_STUNNED; if (IsCharmed()) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; // @todo is this the correct error? + return EQUIP_ERR_CLIENT_LOCKED_OUT; // @todo is this the correct error? // do not allow equipping gear except weapons, offhands, projectiles, relics in // - combat @@ -11103,7 +11103,7 @@ InventoryResult Player::CanUnequipItem(uint16 pos, bool swap) const return EQUIP_ERR_LOOT_GONE; if (IsCharmed()) - return EQUIP_ERR_CANT_DO_RIGHT_NOW; // @todo is this the correct error? + return EQUIP_ERR_CLIENT_LOCKED_OUT; // @todo is this the correct error? // do not allow unequipping gear except weapons, offhands, projectiles, relics in // - combat diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 7ebb51106f4..234b786964c 100644 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -362,7 +362,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state) if (bossInfo->state == TO_BE_DECIDED) // loading { bossInfo->state = state; - TC_LOG_DEBUG("scripts", "InstanceScript: Initialize boss %u state as %s (map %u, %u).", id, GetBossStateName(state).c_str(), instance->GetId(), instance->GetInstanceId()); + TC_LOG_DEBUG("scripts", "InstanceScript: Initialize boss %u state as %s (map %u, %u).", id, GetBossStateName(state), instance->GetId(), instance->GetInstanceId()); return false; } @@ -373,7 +373,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state) if (bossInfo->state == DONE) { - TC_LOG_ERROR("map", "InstanceScript: Tried to set instance state from %s back to %s for map %u, instance id %u. Blocked!", GetBossStateName(bossInfo->state).c_str(), GetBossStateName(state).c_str(), instance->GetId(), instance->GetInstanceId()); + TC_LOG_ERROR("map", "InstanceScript: Tried to set instance boss %u state from %s back to %s for map %u, instance id %u. Blocked!", id, GetBossStateName(bossInfo->state), GetBossStateName(state), instance->GetId(), instance->GetInstanceId()); return false; } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index e00d401b429..ec34efa3c5d 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -131,10 +131,10 @@ class boss_selin_fireheart : public CreatureScript crystal->KillSelf(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); - _EnterCombat(); + _JustEngagedWith(); events.SetPhase(PHASE_NORMAL); events.ScheduleEvent(EVENT_FEL_EXPLOSION, 2100, 0, PHASE_NORMAL); @@ -267,7 +267,7 @@ class npc_fel_crystal : public CreatureScript { if (InstanceScript* instance = me->GetInstanceScript()) { - Creature* Selin = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SELIN)); + Creature* Selin = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SELIN_FIREHEART)); if (Selin && Selin->IsAlive()) Selin->AI()->DoAction(ACTION_SWITCH_PHASE); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index 17e161f2e7b..97a4021412c 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -208,13 +208,13 @@ struct boss_kalecgos : public BossAI damage = 0; } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me); Talk(SAY_EVIL_AGGRO); - _EnterCombat(); + _JustEngagedWith(); - if (Creature* kalecgosHuman = me->SummonCreature(NPC_KALECGOS_HUMAN, KalecgosSummonPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000)) + if (Creature* kalecgosHuman = me->SummonCreature(NPC_KALEC, KalecgosSummonPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000)) if (Creature* sathrovar = instance->GetCreature(DATA_SATHROVARR)) { sathrovar->SetInCombatWith(kalecgosHuman); @@ -461,9 +461,9 @@ struct boss_sathrovarr : public BossAI events.ScheduleEvent(EVENT_CHECK_TIMER, Seconds(1)); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); Talk(SAY_SATH_AGGRO); } @@ -748,7 +748,7 @@ class spell_kalecgos_curse_of_boundless_agony : public AuraScript if (instance->GetBossState(DATA_KALECGOS) == IN_PROGRESS) return; - Remove(AURA_REMOVE_BY_CANCEL); + Remove(AuraRemoveFlags::ByCancel); } void OnPeriodic(AuraEffect const* aurEff) @@ -769,7 +769,7 @@ class spell_kalecgos_curse_of_boundless_agony : public AuraScript void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { - if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_CANCEL) + if (!GetTargetApplication()->GetRemoveMode().HasFlag(AuraRemoveFlags::ByCancel)) GetTarget()->CastSpell(GetTarget(), SPELL_AGONY_CURSE_ALLY, true); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index 18398ab3049..e80be5577c7 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -17,6 +17,7 @@ #include "ScriptMgr.h" #include "AreaBoundary.h" +#include "GameObject.h" #include "InstanceScript.h" #include "Log.h" #include "Map.h" diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp index 2a30055eb04..b2318b16587 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp @@ -80,9 +80,9 @@ struct boss_blackheart_the_inciter : public BossAI _Reset(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_INCITE_CHAOS, 20000); events.ScheduleEvent(EVENT_CHARGE_ATTACK, 5000); events.ScheduleEvent(EVENT_WAR_STOMP, 15000); diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp index aff019e6e15..b83e6786f64 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/instance_shadow_labyrinth.cpp @@ -16,6 +16,7 @@ */ #include "ScriptMgr.h" +#include "GameObject.h" #include "InstanceScript.h" #include "Map.h" #include "ScriptedCreature.h"