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

@@ -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);
}
}