fix(Core/Unit): rework Walk/Run mode (#22988)

Co-authored-by: sudlud <sudlud@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
killerwife
2025-10-14 22:54:19 +02:00
committed by GitHub
parent c28f635408
commit 10d5a3c553
104 changed files with 373 additions and 362 deletions

View File

@@ -258,7 +258,7 @@ public:
{
if (summon->GetEntry() != me->GetEntry())
{
summon->GetMotionMaster()->MovePoint(0, *me, false);
summon->GetMotionMaster()->MovePoint(0, *me, FORCED_MOVEMENT_NONE, 0.f, false);
summon->GetMotionMaster()->MoveFollow(me, 0.1f, 0.0f + M_PI * 0.3f * summons.size());
}
summons.Summon(summon);

View File

@@ -173,7 +173,7 @@ struct boss_jedoga_shadowseeker : public BossAI
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
me->SetDisableGravity(true);
me->SetHover(true);
me->GetMotionMaster()->MovePoint(POINT_INITIAL, JedogaPosition[0], false);
me->GetMotionMaster()->MovePoint(POINT_INITIAL, JedogaPosition[0], FORCED_MOVEMENT_NONE, 0.f, false);
_Reset();
events.SetPhase(PHASE_NORMAL);
@@ -247,7 +247,7 @@ struct boss_jedoga_shadowseeker : public BossAI
DespawnOOCSummons();
DoCastSelf(SPELL_HOVER_FALL);
me->GetMotionMaster()->MoveIdle();
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
if (!combatSummonsSummoned)
{
@@ -397,7 +397,7 @@ struct boss_jedoga_shadowseeker : public BossAI
volunteerWork = false;
me->GetMotionMaster()->Clear();
DoCastSelf(SPELL_HOVER_FALL);
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
}
}
break;
@@ -504,7 +504,7 @@ struct boss_jedoga_shadowseeker : public BossAI
summons.DespawnEntry(NPC_JEDOGA_CONTROLLER);
DoCastSelf(SPELL_HOVER_FALL);
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], false);
me->GetMotionMaster()->MovePoint(POINT_DOWN, JedogaPosition[1], FORCED_MOVEMENT_NONE, 0.f, false);
break;
}
case EVENT_JEDGA_START_RITUAL:
@@ -663,7 +663,7 @@ struct npc_twilight_volunteer : public ScriptedAI
me->GetMotionMaster()->Clear();
me->SetHomePosition(JedogaPosition[2]);
me->SetWalk(true);
me->GetMotionMaster()->MovePoint(POINT_RITUAL, JedogaPosition[2], false);
me->GetMotionMaster()->MovePoint(POINT_RITUAL, JedogaPosition[2], FORCED_MOVEMENT_NONE, 0.f, false);
if (Creature* jedoga = pInstance->GetCreature(DATA_JEDOGA_SHADOWSEEKER))
{

View File

@@ -210,7 +210,8 @@ public:
{
_lavaGoutCount = 0;
AddWaypoints();
Start(true, true);
me->SetWalk(false);
Start(true);
}
void JustEngagedWith(Unit* /*who*/) override

View File

@@ -144,7 +144,7 @@ public:
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
me->SetDisableGravity(true);
me->GetMotionMaster()->MovePoint(POINT_TAKEOFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 6.0f, false);
me->GetMotionMaster()->MovePoint(POINT_TAKEOFF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 6.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
events.ScheduleEvent(EVENT_FLIGHT, 50s);
events.DelayEvents(15s);
events.ScheduleEvent(EVENT_AIR_MOVEMENT, 2s);
@@ -163,10 +163,10 @@ public:
events.ScheduleEvent(EVENT_FLAME_BREATH, 20s, 30s);
break;
case EVENT_AIR_MOVEMENT:
me->GetMotionMaster()->MovePoint(POINT_FLIGHT, 3155.51f, 683.844f, 95.0f, false);
me->GetMotionMaster()->MovePoint(POINT_FLIGHT, 3155.51f, 683.844f, 95.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case EVENT_LAND_BACK:
me->GetMotionMaster()->MovePoint(POINT_LAND, 3151.07f, 636.443f, 80.0f, false);
me->GetMotionMaster()->MovePoint(POINT_LAND, 3151.07f, 636.443f, 80.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
break;
case EVENT_LAND_GROUND:
me->SetReactState(REACT_AGGRESSIVE);

View File

@@ -607,7 +607,8 @@ public:
break;
}
Start(false, true);
me->SetWalk(false);
Start(false);
uiWaypoint = uiType;
}

View File

@@ -339,7 +339,8 @@ public:
void Reset() override
{
Start(false, true, ObjectGuid::Empty, nullptr);
me->SetWalk(false);
Start(false, ObjectGuid::Empty, nullptr);
SetDespawnAtEnd(true);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetImmuneToAll(true);

View File

@@ -549,7 +549,8 @@ public:
return;
}
Start(false, true);
me->SetWalk(false);
Start(false);
}
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override

View File

@@ -571,7 +571,7 @@ public:
pInstance->HandleGameObject(pInstance->GetGuidData(GO_ARTHAS_DOOR), true);
pLichKing->SetVisible(true);
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveMidlelThronePos, false);
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveMidlelThronePos, FORCED_MOVEMENT_NONE, 0.f, false);
}
@@ -618,7 +618,7 @@ public:
if (Creature* pLichKing = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_LICH_KING_EVENT)))
{
pLichKing->SetVisible(true);
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos, false);
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_2_1, 1s);
break;
@@ -709,7 +709,7 @@ public:
case EVENT_INTRO_LK_5_2:
if (Creature* pLichKing = ObjectAccessor::GetCreature(*me, pInstance->GetGuidData(NPC_LICH_KING_EVENT)))
{
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, false);
pLichKing->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, FORCED_MOVEMENT_NONE, 0.f, false);
}
break;
@@ -763,11 +763,11 @@ public:
{
Talk(SAY_SYLVANAS_INTRO_END);
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
me->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, false);
me->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos, FORCED_MOVEMENT_NONE, 0.f, false);
}
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk1, false);
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk1, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_10, 1s + 500ms);
break;
@@ -775,7 +775,7 @@ public:
case EVENT_INTRO_LK_10:
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk2, false);
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk2, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_11, 2s);
@@ -784,7 +784,7 @@ public:
case EVENT_INTRO_LK_11:
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk3, false);
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLk3, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_12, 5s + 500ms);
break;
@@ -796,7 +796,7 @@ public:
}
if (Creature* pLoralen = pInstance->instance->GetCreature(pInstance->GetGuidData(NPC_DARK_RANGER_LORALEN)))
{
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLkFinal, false);
pLoralen->GetMotionMaster()->MovePoint(0, LoralenFollowLkFinal, FORCED_MOVEMENT_NONE, 0.f, false);
}
events.ScheduleEvent(EVENT_INTRO_LK_13, 2s);
break;

View File

@@ -674,14 +674,14 @@ public:
switch (events.ExecuteEvent())
{
case 1:
me->GetMotionMaster()->MovePoint(2, PTSTyrannusWaitPos1, false);
me->GetMotionMaster()->MovePoint(2, PTSTyrannusWaitPos1, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 2:
me->SetFacingTo(PTSTyrannusWaitPos1.GetOrientation());
me->setActive(false);
break;
case 3:
me->GetMotionMaster()->MovePoint(3, PTSTyrannusWaitPos2, false);
me->GetMotionMaster()->MovePoint(3, PTSTyrannusWaitPos2, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 4:
me->SetFacingTo(PTSTyrannusWaitPos2.GetOrientation());
@@ -690,7 +690,7 @@ public:
me->GetMotionMaster()->MoveTakeoff(10, me->GetPositionX() + 2.0f * cos(me->GetOrientation()), me->GetPositionY() + 2.0f * std::sin(me->GetOrientation()), me->GetPositionZ() + 30.0f, 7.0f);
break;
case 6:
me->GetMotionMaster()->MovePoint(4, PTSTyrannusWaitPos3, false);
me->GetMotionMaster()->MovePoint(4, PTSTyrannusWaitPos3, FORCED_MOVEMENT_NONE, 0.f, false);
break;
case 30:
{
@@ -1355,7 +1355,7 @@ public:
}
}
if (minDist < 200.0f * 200.0f)
_owner.GetMotionMaster()->MovePoint(0, slaveFreePos[pointId], true, false);
_owner.GetMotionMaster()->MovePoint(0, slaveFreePos[pointId], FORCED_MOVEMENT_NONE, 0.f, true, false);
return true;
}

View File

@@ -58,7 +58,7 @@ public:
void InitializeAI() override
{
BossAI::InitializeAI();
me->GetMotionMaster()->MovePoint(POINT_START, 1638.55f, 919.76f, 104.95f, false);
me->GetMotionMaster()->MovePoint(POINT_START, 1638.55f, 919.76f, 104.95f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
me->SetHomePosition(1642.712f, 934.646f, 107.205f, 0.767f);
me->SetReactState(REACT_PASSIVE);
}

View File

@@ -583,7 +583,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
me->SetDisableGravity(false);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 539.2917f, FORCED_MOVEMENT_NONE, 10.0f);
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
(*itr)->AI()->DoAction(ACTION_DESPAWN);
@@ -845,7 +845,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
me->SetDisableGravity(false);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 539.2917f, 10.0f);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 539.2917f, FORCED_MOVEMENT_NONE, 10.0f);
for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
(*itr)->AI()->DoAction(ACTION_DESPAWN);

View File

@@ -503,7 +503,7 @@ public:
float x, y, z, o;
_dest.GetPosition(x, y, z, o);
_owner->GetTransport()->CalculatePassengerPosition(x, y, z, &o);
_owner->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, false);
_owner->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
return true;
}
@@ -915,7 +915,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(0, x, y, z, false);
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
else
@@ -1072,7 +1072,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(0, x, y, z, false);
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
}
@@ -1251,7 +1251,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(0, x, y, z, false);
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
else
@@ -1411,7 +1411,7 @@ public:
{
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(0, x, y, z, false);
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}
}
@@ -1518,7 +1518,7 @@ struct gunship_npc_AI : public ScriptedAI
me->SetTransportHomePosition(Slot->TargetPosition);
me->GetTransport()->CalculatePassengerPosition(x, y, z, &o);
me->SetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, false);
me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, x, y, z, FORCED_MOVEMENT_NONE, 0.f, false);
}
}

View File

@@ -2565,7 +2565,7 @@ public:
me->AddUnitState(UNIT_STATE_NO_ENVIRONMENT_UPD);
me->SetCanFly(false);
me->SetDisableGravity(false);
me->GetMotionMaster()->MovePoint(POINT_DROP_PLAYER, _destPoint, false);
me->GetMotionMaster()->MovePoint(POINT_DROP_PLAYER, _destPoint, FORCED_MOVEMENT_NONE, 0.f, false);
me->SetDisableGravity(true, true);
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
break;

View File

@@ -934,7 +934,8 @@ public:
case EVENT_START_PATHING:
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
me->SetImmuneToAll(false);
Start(true, true);
me->SetWalk(false);
Start(true);
break;
case EVENT_SCOURGE_STRIKE:
DoCastVictim(SPELL_SCOURGE_STRIKE);
@@ -3347,7 +3348,7 @@ public:
if (Creature* broodling = me->SummonCreature(NPC_NERUBAR_BROODLING, me->GetPositionX() + cos(o) * dist, me->GetPositionY() + std::sin(o) * dist, 250.0f, Position::NormalizeOrientation(o - M_PI)))
{
broodling->CastSpell(broodling, SPELL_WEB_BEAM2, false);
broodling->GetMotionMaster()->MovePoint(POINT_ENTER_COMBAT, broodling->GetPositionX(), broodling->GetPositionY(), 213.03f, false);
broodling->GetMotionMaster()->MovePoint(POINT_ENTER_COMBAT, broodling->GetPositionX(), broodling->GetPositionY(), 213.03f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false);
}
}

View File

@@ -745,7 +745,7 @@ public:
if (Creature* cr = me->SummonCreature(NPC_LIVING_POISON, entry.Start, TEMPSUMMON_TIMED_DESPAWN, entry.DespawnTime))
{
cr->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
cr->GetMotionMaster()->MovePoint(0, entry.End, false);
cr->GetMotionMaster()->MovePoint(0, entry.End, FORCED_MOVEMENT_NONE, 0.f, false);
}
_events.Repeat(5s);

View File

@@ -521,7 +521,7 @@ public:
}
//pPlayer->ClearUnitState(UNIT_STATE_ONVEHICLE);
Movement::MoveSplineInit init(pPlayer);
Movement::MoveSplineInit init(pPlayer); // TODO: has to be removed and handled with vehicle exit and vehicle enter code
init.MoveTo(CenterPos.GetPositionX(), CenterPos.GetPositionY(), CenterPos.GetPositionZ());
init.SetFacing(pPlayer->GetOrientation());
init.SetTransportExit();
@@ -898,9 +898,9 @@ public:
{
Player* plr = pass->ToPlayer();
float speed = plr->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()) / (1.0f * 0.001f);
plr->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
plr->SetDisableGravity(false); // packet only would lead to issues elsewhere
plr->GetMotionMaster()->MoveCharge(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
plr->RemoveAura(SPELL_FREEZE_ANIM);
plr->SetDisableGravity(false, true);
plr->SetGuidValue(PLAYER_FARSIGHT, ObjectGuid::Empty);
sScriptMgr->AnticheatSetCanFlybyServer(plr, false);
@@ -998,7 +998,7 @@ public:
MoveTimer = 0;
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.05f, 7.0f);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.05f, FORCED_MOVEMENT_NONE, 7.0f);
break;
}
}
@@ -1013,8 +1013,7 @@ public:
MoveTimer = 0;
me->GetMotionMaster()->MoveIdle();
me->DisableSpline();
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), 100.0f);
me->SetPosition(me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), me->GetOrientation());
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), CenterPos.GetPositionZ(), FORCED_MOVEMENT_NONE, 100.0f);
me->ReplaceAllUnitFlags(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_DISABLE_MOVE);
me->RemoveAura(SPELL_POWER_SPARK_VISUAL);
me->CastSpell(me, SPELL_POWER_SPARK_GROUND_BUFF, true);

View File

@@ -138,7 +138,7 @@ public:
AddWaypoint(13, 1281.2f, -26.8f, 33.5f, 0);
AddWaypoint(14, 1262, -26.9f, 33.5f, 0);
Start(true, false, ObjectGuid::Empty, nullptr, false, true);
Start(true, ObjectGuid::Empty, nullptr, false, true);
}
InstanceScript* m_pInstance;

View File

@@ -391,7 +391,8 @@ public:
switch (action)
{
case ACTION_START_ESCORT_EVENT:
Start(false, true, ObjectGuid::Empty, 0, true, false);
me->SetWalk(false);
Start(false, ObjectGuid::Empty, 0, true, false);
Talk(SAY_BRANN_ESCORT_START);
me->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
me->SetReactState(REACT_AGGRESSIVE);
@@ -456,7 +457,8 @@ public:
door->SetGoState(GO_STATE_READY);
break;
case ACTION_OPEN_DOOR:
Start(false, true, ObjectGuid::Empty, 0, true, false);
me->SetWalk(false);
Start(false, ObjectGuid::Empty, 0, true, false);
SetNextWaypoint(34, false);
SetEscortPaused(false);
me->RemoveAura(58506);
@@ -571,7 +573,7 @@ public:
if (speed < tooFarAwaySpeed)
speed = tooFarAwaySpeed;
darkMatterTarget->MonsterMoveWithSpeed(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), speed);
darkMatterTarget->GetMotionMaster()->MovePoint(0, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), FORCED_MOVEMENT_NONE, speed);
if (darkMatterTarget->GetDistance(plr) < 15.0f)
{

View File

@@ -805,7 +805,7 @@ public:
case EVENT_LIGHTNING_LAND:
{
float speed = me->GetDistance(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()) / (1000.0f * 0.001f);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), speed);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), FORCED_MOVEMENT_NONE, speed);
events.ScheduleEvent(EVENT_LAND_LAND, 1s);
break;
}

View File

@@ -381,8 +381,7 @@ public:
{
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
TurnGates(true, false);
me->MonsterMoveWithSpeed(homePos.GetPositionX(), homePos.GetPositionY(), homePos.GetPositionZ(), 100.0f);
me->UpdatePosition(homePos);
me->GetMotionMaster()->MovePoint(0, homePos.GetPositionX(), homePos.GetPositionY(), homePos.GetPositionZ(), FORCED_MOVEMENT_NONE, 100.0f);
_speakTimer = 60000;
}
else if (_speakTimer > 63500)
@@ -1090,7 +1089,7 @@ public:
{
summons.DespawnAll();
_spellTimer = 0;
Start(false, false, ObjectGuid::Empty, nullptr, false, true);
Start(false, ObjectGuid::Empty, nullptr, false, true);
if (Aura* aur = me->AddAura(SPELL_FREYA_DUMMY_YELLOW, me))
{
aur->SetMaxDuration(-1);

View File

@@ -601,7 +601,7 @@ public:
{
me->EnterVehicle(VX001, 4);
float speed = ACU->GetDistance(2737.75f, 2574.22f, 381.34f) / 2.0f;
ACU->MonsterMoveWithSpeed(2737.75f, 2574.22f, 381.34f, speed);
ACU->GetMotionMaster()->MovePoint(0, 2737.75f, 2574.22f, 381.34f, FORCED_MOVEMENT_NONE, speed);
ACU->SetPosition(2737.75f, 2574.22f, 381.34f, M_PI);
events.ScheduleEvent(EVENT_SAY_VX001_DEAD, 2s);
break;
@@ -1681,8 +1681,7 @@ public:
me->InterruptNonMeleeSpells(false);
me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE);
me->MonsterMoveWithSpeed(2744.65f, 2569.46f, 381.34f, me->GetDistance(2744.65f, 2569.46f, 381.34f));
me->UpdatePosition(2744.65f, 2569.46f, 381.34f, M_PI, false);
me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f);
if (Creature* c = GetMimiron())
c->AI()->SetData(0, 3);
@@ -1740,8 +1739,7 @@ public:
}
float speed = me->GetExactDist(x, y, 381.34f);
me->MonsterMoveWithSpeed(x, y, 381.34f, speed);
me->UpdatePosition(x, y, 381.34f, me->GetAngle(victim), false);
me->GetMotionMaster()->MovePoint(0, x, y, 381.34f, FORCED_MOVEMENT_NONE, speed);
if (mc)
{
mc->AI()->SetData(0, 0);
@@ -1793,14 +1791,12 @@ public:
case EVENT_MAGNETIC_CORE_PULL_DOWN:
me->CastSpell(me, SPELL_MAGNETIC_CORE, true);
me->CastSpell(me, SPELL_SPINNING, true);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 365.34f, me->GetExactDist(me->GetPositionX(), me->GetPositionY(), 365.34f));
me->UpdatePosition(me->GetPositionX(), me->GetPositionY(), 365.34f, me->GetOrientation(), false);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 365.34f, FORCED_MOVEMENT_NONE, me->GetExactDist(me->GetPositionX(), me->GetPositionY(), 365.34f));
events.ScheduleEvent(EVENT_MAGNETIC_CORE_FREE, 20s);
break;
case EVENT_MAGNETIC_CORE_FREE:
me->RemoveAura(SPELL_SPINNING);
me->MonsterMoveWithSpeed(me->GetPositionX(), me->GetPositionY(), 381.34f, me->GetDistance(me->GetPositionX(), me->GetPositionY(), 381.34f));
me->UpdatePosition(me->GetPositionX(), me->GetPositionY(), 381.34f, me->GetOrientation(), false);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), 381.34f, FORCED_MOVEMENT_NONE, me->GetDistance(me->GetPositionX(), me->GetPositionY(), 381.34f));
events.ScheduleEvent(EVENT_MAGNETIC_CORE_REMOVE_IMMOBILIZE, 1s);
break;
case EVENT_MAGNETIC_CORE_REMOVE_IMMOBILIZE:
@@ -1960,7 +1956,7 @@ public:
void SetData(uint32 /*id*/, uint32 /*value*/) override
{
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 100.0f, false, true);
me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 100.0f, FORCED_MOVEMENT_NONE, 0.f, false, true);
}
void UpdateAI(uint32 /*diff*/) override

View File

@@ -683,7 +683,7 @@ public:
{
razorscale->AI()->AttackStart(player);
razorscale->GetMotionMaster()->MoveIdle();
razorscale->GetMotionMaster()->MovePoint(POINT_RAZORSCALE_INIT, 588.0f, -178.0f, 490.0f, false, false);
razorscale->GetMotionMaster()->MovePoint(POINT_RAZORSCALE_INIT, 588.0f, -178.0f, 490.0f, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, false);
}
}
}

View File

@@ -934,7 +934,8 @@ public:
{
InitWaypoint();
Reset();
Start(false, true);
me->SetWalk(false);
Start(false);
}
uint32 Timer;
@@ -1020,7 +1021,8 @@ public:
{
InitWaypoint();
Reset();
Start(false, true);
me->SetWalk(false);
Start(false);
SetDespawnAtEnd(false);
}

View File

@@ -937,7 +937,8 @@ public:
{
InitWaypoint();
Reset();
Start(false, true, ObjectGuid::Empty, nullptr, false, true);
me->SetWalk(false);
Start(false, ObjectGuid::Empty, nullptr, false, true);
}
uint32 _checkTimer;

View File

@@ -372,7 +372,8 @@ struct violet_hold_trashAI : public npc_escortAI
break;
}
SetDespawnAtEnd(false);
Start(true, true);
me->SetWalk(false);
Start(true);
}
npc_escortAI::UpdateAI(diff);
@@ -1111,7 +1112,8 @@ public:
break;
}
SetDespawnAtEnd(false);
Start(true, true);
me->SetWalk(false);
Start(true);
}
if (bOpening)

View File

@@ -464,7 +464,7 @@ public:
go->UseDoorOrButton();
if (npc_escortAI* pEscortAI = CAST_AI(npc_lurgglbr::npc_lurgglbrAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
pEscortAI->Start(true, player->GetGUID());
creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE);
return true;
@@ -914,7 +914,7 @@ public:
creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_1, player);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -995,7 +995,8 @@ public:
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_BONKER_2, player);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, player->GetGUID());
creature->SetWalk(false);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -1884,7 +1885,7 @@ public:
if (Creature* leryssa = ObjectAccessor::GetCreature(*me, _leryssaGUID))
{
leryssa->SetWalk(false);
leryssa->MonsterMoveWithSpeed(3726.751f, 3568.1633f, 477.44086f, leryssa->GetSpeed(MOVE_RUN));
leryssa->GetMotionMaster()->MovePoint(0, 3726.751f, 3568.1633f, 477.44086f, FORCED_MOVEMENT_RUN);
}
_events.ScheduleEvent(EVENT_THASSARIAN_SCRIPT_23, 2s);
break;

View File

@@ -117,7 +117,7 @@ struct npc_preparations_for_war_vehicle : public NullCreatureAI
}
}
else
me->GetMotionMaster()->MovePoint(0, x, y, z, false, false);
me->GetMotionMaster()->MovePoint(0, x, y, z, FORCED_MOVEMENT_NONE, 0.f, 0.f, false, false);
break;
}
}

View File

@@ -592,7 +592,7 @@ struct npc_minigob_manabonk : public ScriptedAI
case EVENT_MOVE:
{
Position pos = me->GetRandomNearPosition((urand(15, 40)));
me->GetMotionMaster()->MovePoint(0, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true);
me->GetMotionMaster()->MovePoint(0, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
}
events.ScheduleEvent(EVENT_DESPAWN_VISUAL, 3s);
events.ScheduleEvent(EVENT_DESPAWN, 4s);

View File

@@ -207,7 +207,7 @@ public:
Mrfloppy->GetMotionMaster()->MoveFollow(creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
if (npc_escortAI* pEscortAI = CAST_AI(npc_emily::npc_emilyAI, (creature->AI())))
pEscortAI->Start(true, false, player->GetGUID());
pEscortAI->Start(true, player->GetGUID());
}
return true;
}

View File

@@ -191,7 +191,7 @@ public:
if (quest->GetQuestId() == QUEST_TRAIL_OF_FIRE)
{
creature->SetFaction(player->GetTeamId() == TEAM_ALLIANCE ? FACTION_ESCORTEE_A_PASSIVE : FACTION_ESCORTEE_H_PASSIVE);
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, player->GetGUID());
}
return true;
}
@@ -309,7 +309,7 @@ public:
return;
me->SetWalk(true);
Start(false, false, summonerGUID);
Start(false, summonerGUID);
}
void WaypointReached(uint32 waypointId) override

View File

@@ -523,11 +523,8 @@ public:
{
soul->SetCanFly(true);
soul->SetVisible(true);
Movement::MoveSplineInit init(soul);
init.MoveTo(soul->GetPositionX(), soul->GetPositionY(), soul->GetPositionZ() + 5.0f);
init.SetVelocity(1.0f);
init.Launch();
soul->CastSpell(soul, 64462, true); // Drown
soul->GetMotionMaster()->MovePoint(0, soul->GetPositionX(), soul->GetPositionY(), soul->GetPositionZ() + 5.0f, FORCED_MOVEMENT_NONE, 1.f);
}
events.ScheduleEvent(EVENT_SCENE_1, 6s);
break;
@@ -718,7 +715,7 @@ public:
Talk(0);
events.Reset();
summons.DespawnAll();
Start(false, false);
Start(false);
int8 i = -1;
std::list<Creature*> cList;

View File

@@ -605,7 +605,7 @@ public:
creature->GetMotionMaster()->MoveJumpTo(0, 0.4f, 0.4f);
creature->SetFaction(FACTION_ESCORTEE_N_NEUTRAL_PASSIVE);
pEscortAI->Start(false, false, player->GetGUID());
pEscortAI->Start(false, player->GetGUID());
creature->AI()->Talk(SAY_WP_1);
}
}

View File

@@ -57,7 +57,8 @@ struct npc_frosthound : public npc_escortAI
{
me->SetFaction(who->GetFaction());
me->CastSpell(me, SPELL_SUMMON_PURSUERS_PERIODIC, true);
Start(false, true, who->GetGUID());
me->SetWalk(false);
Start(false, who->GetGUID());
Talk(TALK_EMOTE_FROSTHOUND_SNIFF, me);
}
}
@@ -246,7 +247,8 @@ public:
void RollPath()
{
me->SetEntry(NPC_TIME_LOST_PROTO_DRAKE);
Start(true, true, ObjectGuid::Empty, 0, false, true, true);
me->SetWalk(false);
Start(true, ObjectGuid::Empty, 0, false, true, true);
SetNextWaypoint(urand(0, 250), true);
me->UpdateEntry(roll_chance_i(25) ? NPC_TIME_LOST_PROTO_DRAKE : NPC_VYRAGOSA, 0, false);
}
@@ -912,7 +914,10 @@ public:
if (who->IsPlayer())
{
if (apply)
Start(false, true, who->GetGUID());
{
me->SetWalk(false);
Start(false, who->GetGUID());
}
}
}