diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index bb014a034..17d48bf54 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -348,7 +348,7 @@ void CreatureAI::MoveCircleChecks() !victim || !me->IsFreeToMove() || me->HasUnitMovementFlag(MOVEMENTFLAG_ROOT) || !me->IsWithinMeleeRange(victim) || me == victim->GetVictim() || - (victim->GetTypeId() != TYPEID_PLAYER && !victim->IsPet()) // only player & pets to save CPU + (!victim->IsPlayer() && !victim->IsPet()) // only player & pets to save CPU ) { return; @@ -357,14 +357,12 @@ void CreatureAI::MoveCircleChecks() me->GetMotionMaster()->MoveCircleTarget(me->GetVictim()); } -void CreatureAI::MoveBackwardsChecks() { +void CreatureAI::MoveBackwardsChecks() +{ Unit *victim = me->GetVictim(); - if ( - !victim || - !me->IsFreeToMove() || me->HasUnitMovementFlag(MOVEMENTFLAG_ROOT) || - (victim->GetTypeId() != TYPEID_PLAYER && !victim->IsPet()) - ) + if (!victim || !me->IsFreeToMove() || me->HasUnitMovementFlag(MOVEMENTFLAG_ROOT) || + (!victim->IsPlayer() && !victim->IsPet())) { return; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 307393920..d2ceebc54 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -191,8 +191,7 @@ bool SummonList::IsAnyCreatureInCombat() const ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), me(creature), - IsFleeing(false), - _isCombatMovementAllowed(true) + IsFleeing(false) { _isHeroic = me->GetMap()->IsHeroic(); _difficulty = Difficulty(me->GetMap()->GetSpawnMode()); @@ -209,7 +208,7 @@ void ScriptedAI::AttackStartNoMove(Unit* who) void ScriptedAI::AttackStart(Unit* who) { - if (IsCombatMovementAllowed()) + if (me->IsCombatMovementAllowed()) CreatureAI::AttackStart(who); else AttackStartNoMove(who); @@ -537,11 +536,6 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(ranged)); } -void ScriptedAI::SetCombatMovement(bool allowMovement) -{ - _isCombatMovementAllowed = allowMovement; -} - enum eNPCs { NPC_BROODLORD = 12017, diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index 669367ca6..de69876f6 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -373,14 +373,6 @@ struct ScriptedAI : public CreatureAI void SetEquipmentSlots(bool loadDefault, int32 mainHand = EQUIP_NO_CHANGE, int32 offHand = EQUIP_NO_CHANGE, int32 ranged = EQUIP_NO_CHANGE); - // Used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims - // NOTE: If you use SetCombatMovement while the creature is in combat, it will do NOTHING - This only affects AttackStart - // You should make the necessary to make it happen so. - // Remember that if you modified _isCombatMovementAllowed (e.g: using SetCombatMovement) it will not be reset at Reset(). - // It will keep the last value you set. - void SetCombatMovement(bool allowMovement); - bool IsCombatMovementAllowed() const { return _isCombatMovementAllowed; } - virtual bool CheckEvadeIfOutOfCombatArea() const { return false; } // return true for heroic mode. i.e. @@ -452,7 +444,6 @@ struct ScriptedAI : public CreatureAI private: Difficulty _difficulty; - bool _isCombatMovementAllowed; bool _isHeroic; std::unordered_set _uniqueTimedEvents; }; diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 88e33c93c..0319ed5c7 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -64,7 +64,7 @@ void npc_escortAI::AttackStart(Unit* who) me->StopMoving(); } - if (IsCombatMovementAllowed()) + if (me->IsCombatMovementAllowed()) me->GetMotionMaster()->MoveChase(who); } } @@ -178,8 +178,8 @@ void npc_escortAI::JustRespawned() { RemoveEscortState(STATE_ESCORT_ESCORTING | STATE_ESCORT_RETURNING | STATE_ESCORT_PAUSED); - if (!IsCombatMovementAllowed()) - SetCombatMovement(true); + if (!me->IsCombatMovementAllowed()) + me->SetCombatMovement(true); //add a small delay before going to first waypoint, normal in near all cases m_uiWPWaitTimer = 1000; diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index c53a0e6f1..e74591af1 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -55,7 +55,7 @@ void FollowerAI::AttackStart(Unit* who) if (me->HasUnitState(UNIT_STATE_FOLLOW)) me->ClearUnitState(UNIT_STATE_FOLLOW); - if (IsCombatMovementAllowed()) + if (me->IsCombatMovementAllowed()) me->GetMotionMaster()->MoveChase(who); } } @@ -141,8 +141,8 @@ void FollowerAI::JustRespawned() { m_uiFollowState = STATE_FOLLOW_NONE; - if (!IsCombatMovementAllowed()) - SetCombatMovement(true); + if (!me->IsCombatMovementAllowed()) + me->SetCombatMovement(true); if (me->GetFaction() != me->GetCreatureTemplate()->faction) me->SetFaction(me->GetCreatureTemplate()->faction); diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 5c0260411..fbebfb85c 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -220,7 +220,7 @@ Creature::Creature(bool isWorldObject): Unit(isWorldObject), MovableMapObject(), m_spawnId(0), m_equipmentId(0), m_originalEquipmentId(0), m_AlreadyCallAssistance(false), m_AlreadySearchedAssistance(false), m_regenHealth(true), m_regenPower(true), m_AI_locked(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_originalEntry(0), m_moveInLineOfSightDisabled(false), m_moveInLineOfSightStrictlyDisabled(false), m_homePosition(), m_transportHomePosition(), m_creatureInfo(nullptr), m_creatureData(nullptr), m_detectionDistance(20.0f), m_waypointID(0), m_path_id(0), m_formation(nullptr), _lastDamagedTime(nullptr), m_cannotReachTimer(0), - _isMissingSwimmingFlagOutOfCombat(false), m_assistanceTimer(0), _playerDamageReq(0), _damagedByPlayer(false) + _isMissingSwimmingFlagOutOfCombat(false), m_assistanceTimer(0), _playerDamageReq(0), _damagedByPlayer(false), _isCombatMovementAllowed(true) { m_regenTimer = CREATURE_REGEN_INTERVAL; m_valuesCount = UNIT_END; @@ -877,7 +877,7 @@ bool Creature::IsFreeToMove() { uint32 moveFlags = m_movementInfo.GetMovementFlags(); // Do not reposition ourself when we are not allowed to move - if ((IsMovementPreventedByCasting() || isMoving() || !CanFreeMove()) && + if ((IsMovementPreventedByCasting() || isMoving() || !CanFreeMove() || !IsCombatMovementAllowed()) && (GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE || moveFlags & MOVEMENTFLAG_SPLINE_ENABLED)) { @@ -3738,6 +3738,11 @@ bool Creature::CanCastSpell(uint32 spellID) const return true; } +void Creature::SetCombatMovement(bool allowMovement) +{ + _isCombatMovementAllowed = allowMovement; +} + ObjectGuid Creature::GetSummonerGUID() const { if (TempSummon const* temp = ToTempSummon()) diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index cfe079ef3..c4e067a56 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -413,6 +413,14 @@ public: * */ [[nodiscard]] ObjectGuid GetSummonerGUID() const; + // Used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims + // NOTE: If you use SetCombatMovement while the creature is in combat, it will do NOTHING - This only affects AttackStart + // You should make the necessary to make it happen so. + // Remember that if you modified _isCombatMovementAllowed (e.g: using SetCombatMovement) it will not be reset at Reset(). + // It will keep the last value you set. + void SetCombatMovement(bool allowMovement); + bool IsCombatMovementAllowed() const { return _isCombatMovementAllowed; } + std::string GetDebugInfo() const override; protected: @@ -501,6 +509,7 @@ private: uint32 _playerDamageReq; bool _damagedByPlayer; + bool _isCombatMovementAllowed; }; class AssistDelayEvent : public BasicEvent diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp index 631ce29ed..45e6502eb 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -45,7 +45,7 @@ struct boss_quartermaster_zigris : public BossAI void Reset() override { _Reset(); - SetCombatMovement(false); + me->SetCombatMovement(false); _hasDrunkPotion = false; } @@ -120,11 +120,11 @@ struct boss_quartermaster_zigris : public BossAI { DoCastVictim(SPELL_SHOOT); me->GetMotionMaster()->Clear(); - SetCombatMovement(false); + me->SetCombatMovement(false); } else if (!me->IsWithinLOSInMap(me->GetVictim())) { - SetCombatMovement(true); + me->SetCombatMovement(true); me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveChase(me->GetVictim()); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index bbc8a0f48..264dc81c3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -359,7 +359,7 @@ public: Talk(SAY_GAMESBEGIN_2); DoCast(me, SPELL_NEFARIANS_BARRIER); - SetCombatMovement(false); + me->SetCombatMovement(false); me->SetImmuneToPC(false); AttackStart(SelectTarget(SelectTargetMethod::Random, 0, 200.f, true)); events.ScheduleEvent(EVENT_SHADOWBLINK, 500ms); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 42af93dd6..6de5d782e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -159,7 +159,7 @@ struct boss_dorothee : public ScriptedAI { boss_dorothee(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); //this is kinda a big no-no. but it will prevent her from moving to chase targets. she should just cast her spells. in this case, since there is not really something to LOS her with or get out of range this would work. but a more elegant solution would be better instance = creature->GetInstanceScript(); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index 89e4b1c96..f8423179e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -123,7 +123,7 @@ struct boss_jeklik : public BossAI me->SetDisableGravity(false); me->SetReactState(REACT_PASSIVE); - BossAI::SetCombatMovement(false); + BossAI::me->SetCombatMovement(false); batRidersCount = 0; DoCastSelf(SPELL_GREEN_CHANNELING, true); @@ -148,7 +148,7 @@ struct boss_jeklik : public BossAI BossAI::PathEndReached(pathId); me->SetDisableGravity(false); - SetCombatMovement(true); + me->SetCombatMovement(true); me->SetReactState(REACT_AGGRESSIVE); // diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index b53a079bd..8a67b19fc 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -2168,7 +2168,7 @@ public: { boss_blight_wormAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void Reset() override diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index aedde8f42..6e888f622 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -134,7 +134,7 @@ public: { npc_andorhal_towerAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void MoveInLineOfSight(Unit* who) override diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp index e883f1c20..3aeaa0737 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp @@ -1411,7 +1411,7 @@ public: { alliance_riflemanAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } uint32 ExplodeTimer; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp index cb0991cb9..663805fd9 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ayamiss.cpp @@ -84,7 +84,7 @@ struct boss_ayamiss : public BossAI void Reset() override { BossAI::Reset(); - SetCombatMovement(false); + me->SetCombatMovement(false); me->SetReactState(REACT_AGGRESSIVE); ScheduleHealthCheckEvent(70, [&] { @@ -127,7 +127,7 @@ struct boss_ayamiss : public BossAI } else if (type == WAYPOINT_MOTION_TYPE && id == POINT_GROUND) { - SetCombatMovement(true); + me->SetCombatMovement(true); me->SetDisableGravity(false); me->m_Events.AddEventAtOffset([this]() diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index bcfc28540..94311442c 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -188,7 +188,7 @@ struct npc_buru_egg : public ScriptedAI npc_buru_egg(Creature* creature) : ScriptedAI(creature) { _instance = me->GetInstanceScript(); - SetCombatMovement(false); + me->SetCombatMovement(false); me->SetReactState(REACT_PASSIVE); me->SetControlled(true, UNIT_STATE_STUNNED); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 5555b1538..2bbbc4bc5 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -147,7 +147,7 @@ struct boss_eye_of_cthun : public BossAI { boss_eye_of_cthun(Creature* creature) : BossAI(creature, DATA_CTHUN) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->m_SightDistance = 90.f; } @@ -377,7 +377,7 @@ struct boss_cthun : public BossAI { boss_cthun(Creature* creature) : BossAI(creature, DATA_CTHUN) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void Reset() override @@ -597,7 +597,7 @@ struct npc_eye_tentacle : public ScriptedAI } } - SetCombatMovement(false); + me->SetCombatMovement(false); } void JustDied(Unit* /*killer*/) override @@ -651,7 +651,7 @@ struct npc_claw_tentacle : public ScriptedAI { npc_claw_tentacle(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); if (Creature* portal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN)) { @@ -720,7 +720,7 @@ struct npc_giant_claw_tentacle : public ScriptedAI { npc_giant_claw_tentacle(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); if (Creature* portal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN)) { @@ -870,7 +870,7 @@ struct npc_giant_eye_tentacle : public ScriptedAI { npc_giant_eye_tentacle(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); if (Creature* portal = me->SummonCreature(NPC_GIANT_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN)) { diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp index 4468cab45..2f28174f8 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp @@ -106,7 +106,7 @@ struct boss_ouro : public BossAI { boss_ouro(Creature* creature) : BossAI(creature, DATA_OURO) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->SetControlled(true, UNIT_STATE_ROOT); } diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index 3f813297c..c2cff4eba 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -366,7 +366,7 @@ struct npc_toxic_slime : public ScriptedAI void InitializeAI() override { - SetCombatMovement(false); + me->SetCombatMovement(false); DoCastSelf(SPELL_TOXIN); InstanceScript* instance = me->GetInstanceScript(); diff --git a/src/server/scripts/Kalimdor/zone_durotar.cpp b/src/server/scripts/Kalimdor/zone_durotar.cpp index ffca73f50..2747801a9 100644 --- a/src/server/scripts/Kalimdor/zone_durotar.cpp +++ b/src/server/scripts/Kalimdor/zone_durotar.cpp @@ -99,7 +99,7 @@ public: { npc_tiger_matriarch_creditAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); events.ScheduleEvent(EVENT_CHECK_SUMMON_AURA, 2s); } diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp index 32f6dbd8f..f0e2a6858 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_amanitar.cpp @@ -235,7 +235,7 @@ struct npc_amanitar_mushrooms : public ScriptedAI { npc_amanitar_mushrooms(Creature* pCreature) : ScriptedAI(pCreature) { - SetCombatMovement(false); + me->SetCombatMovement(false); //TODO: this prolly needs to be done in database pCreature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp index 0f706defe..6e105c38a 100644 --- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -295,7 +295,7 @@ struct boss_jedoga_shadowseeker : public BossAI { if (!ritualTriggered && me->HealthBelowPctDamaged(55, damage) && events.IsInPhase(PHASE_NORMAL)) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->InterruptNonMeleeSpells(false); me->AttackStop(); me->SetReactState(REACT_PASSIVE); @@ -368,7 +368,7 @@ struct boss_jedoga_shadowseeker : public BossAI me->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL); me->RemoveAurasDueToSpell(SPELL_LIGHTNING_BOLTS); me->RemoveAurasDueToSpell(SPELL_HOVER_FALL); - SetCombatMovement(true); + me->SetCombatMovement(true); me->SetDisableGravity(false); me->SetHover(false); diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 0beb019b3..dd88510df 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -606,14 +606,14 @@ struct boss_jormungarAI : public ScriptedAI if( bIsStationary ) { me->SetNativeDisplayId(_MODEL_MOBILE); - SetCombatMovement(true); + me->SetCombatMovement(true); if( Unit* victim = me->GetVictim() ) me->GetMotionMaster()->MoveChase(victim); } else { me->SetNativeDisplayId(_MODEL_STATIONARY); - SetCombatMovement(false); + me->SetCombatMovement(false); } me->RemoveAurasDueToSpell(SPELL_SUBMERGE_0); me->CastSpell(me, SPELL_EMERGE_0, false); @@ -692,7 +692,7 @@ public: _MODEL_STATIONARY = MODEL_ACIDMAW_STATIONARY; _MODEL_MOBILE = MODEL_ACIDMAW_MOBILE; _TYPE_OTHER = TYPE_DREADSCALE; - SetCombatMovement(false); + me->SetCombatMovement(false); } }; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index e0f2c14ee..a064933e3 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -1525,7 +1525,7 @@ public: { boss_yoggsaron_crusher_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->CastSpell(me, SPELL_CRUSH, true); me->CastSpell(me, SPELL_FOCUSED_ANGER, true); me->CastSpell(me, SPELL_DIMINISH_POWER, false); @@ -1587,7 +1587,7 @@ public: { boss_yoggsaron_corruptor_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void DoAction(int32 param) override @@ -1644,7 +1644,7 @@ public: { boss_yoggsaron_constrictor_tentacleAI(Creature* pCreature) : ScriptedAI(pCreature) { - SetCombatMovement(false); + me->SetCombatMovement(false); _checkTimer = 1; _playerGUID.Clear(); } diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp index 43deb22d0..a681ab4ef 100644 --- a/src/server/scripts/Northrend/zone_borean_tundra.cpp +++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp @@ -1049,7 +1049,7 @@ public: { npc_warmage_coldarraAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } uint32 m_uiTimer; //Timer until recast diff --git a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp index 1b190b461..a211b2202 100644 --- a/src/server/scripts/Northrend/zone_crystalsong_forest.cpp +++ b/src/server/scripts/Northrend/zone_crystalsong_forest.cpp @@ -147,7 +147,7 @@ struct npc_warmage_violetstand : public ScriptedAI { npc_warmage_violetstand(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } ObjectGuid targetGUID; diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp index 6810c369d..da3e762d1 100644 --- a/src/server/scripts/Northrend/zone_icecrown.cpp +++ b/src/server/scripts/Northrend/zone_icecrown.cpp @@ -1532,7 +1532,7 @@ public: { npc_guardian_pavilionAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void MoveInLineOfSight(Unit* who) override @@ -1596,7 +1596,7 @@ public: { npc_tournament_training_dummyAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); } @@ -1816,7 +1816,7 @@ public: PhaseCount = 0; Summons.DespawnAll(); - SetCombatMovement(false); + me->SetCombatMovement(false); } EventMap events; diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp index 3024cc6d9..54888d53e 100644 --- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp +++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_murmur.cpp @@ -57,7 +57,7 @@ struct boss_murmur : public BossAI { boss_murmur(Creature* creature) : BossAI(creature, DATA_MURMUR) { - SetCombatMovement(false); + me->SetCombatMovement(false); scheduler.SetValidator([this] { return !me->HasUnitState(UNIT_STATE_CASTING); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp index 3ecf8123e..6a536ddea 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SlavePens/boss_ahune.cpp @@ -98,7 +98,7 @@ struct boss_ahune : public ScriptedAI { boss_ahune(Creature* c) : ScriptedAI(c), summons(me) { - SetCombatMovement(false); + me->SetCombatMovement(false); SetEquipmentSlots(false, 54806, EQUIP_UNEQUIP, EQUIP_UNEQUIP); me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE); InvokerGUID.Clear(); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index ac1c47f95..18dda706a 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -41,7 +41,7 @@ struct boss_omor_the_unscarred : public BossAI { boss_omor_the_unscarred(Creature* creature) : BossAI(creature, DATA_OMOR_THE_UNSCARRED) { - SetCombatMovement(false); + me->SetCombatMovement(false); scheduler.SetValidator([this] { return !me->HasUnitState(UNIT_STATE_CASTING); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index a2dc7fde3..7329b6de6 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -90,7 +90,7 @@ struct boss_alar : public BossAI boss_alar(Creature* creature) : BossAI(creature, DATA_ALAR) { - SetCombatMovement(false); + me->SetCombatMovement(false); } void JustReachedHome() override diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 025c42916..f02e4a58e 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -334,7 +334,7 @@ public: { npc_training_dummyAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); //imune to knock aways like blast wave } @@ -392,7 +392,7 @@ public: { npc_target_dummyAI(Creature* creature) : ScriptedAI(creature) { - SetCombatMovement(false); + me->SetCombatMovement(false); deathTimer = 15000; me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); //imune to knock aways like blast wave }