mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 22:15:15 +00:00
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:
@@ -678,19 +678,19 @@ public:
|
||||
me->SummonCreature(NPC_JAINA, EventPos[EVENT_SRC_JAINA], TEMPSUMMON_DEAD_DESPAWN, 180000);
|
||||
if (Creature* uther = me->SummonCreature(NPC_UTHER, EventPos[EVENT_SRC_UTHER], TEMPSUMMON_DEAD_DESPAWN, 180000))
|
||||
{
|
||||
uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_UTHER], false);
|
||||
uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_UTHER], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
uther->SetTarget(me->GetGUID());
|
||||
me->SetTarget(uther->GetGUID());
|
||||
}
|
||||
for (int i = 0; i < 3; ++i)
|
||||
if (Creature* horse = me->SummonCreature(NPC_HORSE_ESCORT, EventPos[EVENT_SRC_HORSE1 + i], TEMPSUMMON_DEAD_DESPAWN, 180000))
|
||||
horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], false);
|
||||
horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
|
||||
ScheduleNextEvent(currentEvent, 4s);
|
||||
break;
|
||||
case EVENT_ACTION_PHASE1+1:
|
||||
// Start Event
|
||||
Start(true, false);
|
||||
Start(true);
|
||||
SetDespawnAtEnd(false);
|
||||
SetDespawnAtFar(false);
|
||||
|
||||
@@ -782,7 +782,7 @@ public:
|
||||
{
|
||||
Creature* summon = ObjectAccessor::GetCreature(*me, *i);
|
||||
if (summon && summon->GetEntry() == NPC_HORSE_ESCORT)
|
||||
summon->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
|
||||
summon->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}
|
||||
|
||||
ScheduleNextEvent(currentEvent, 1s);
|
||||
@@ -792,7 +792,7 @@ public:
|
||||
{
|
||||
uther->SetTarget();
|
||||
uther->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
|
||||
uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}
|
||||
ScheduleNextEvent(currentEvent, 1s);
|
||||
break;
|
||||
@@ -801,7 +801,7 @@ public:
|
||||
{
|
||||
jaina->SetTarget();
|
||||
jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
|
||||
jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}
|
||||
Talk(SAY_PHASE116);
|
||||
ScheduleNextEvent(currentEvent, 2s);
|
||||
@@ -819,7 +819,7 @@ public:
|
||||
if (Creature* jaina = GetEventNpc(NPC_JAINA))
|
||||
{
|
||||
jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
|
||||
jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
|
||||
}
|
||||
summons.DespawnEntry(NPC_HORSE_ESCORT);
|
||||
ScheduleNextEvent(currentEvent, 4s);
|
||||
@@ -1242,7 +1242,8 @@ void npc_arthas::npc_arthasAI::JustEngagedWith(Unit* /*who*/)
|
||||
|
||||
void npc_arthas::npc_arthasAI::ReorderInstance(uint32 data)
|
||||
{
|
||||
Start(true, true);
|
||||
me->SetWalk(false);
|
||||
Start(true);
|
||||
SetEscortPaused(true);
|
||||
SetDespawnAtEnd(false);
|
||||
|
||||
|
||||
@@ -566,7 +566,8 @@ public:
|
||||
me->SummonCreature(NPC_DURNHOLDE_MAGE, 2108.4856f, 189.93457f, 66.30494f, 2.6878f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30 * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_START_WP:
|
||||
Start(true, true);
|
||||
me->SetWalk(false);
|
||||
Start(true);
|
||||
SetDespawnAtEnd(false);
|
||||
break;
|
||||
case EVENT_SET_FACING:
|
||||
@@ -809,7 +810,7 @@ public:
|
||||
if (Creature* epoch = summons.GetCreatureWithEntry(NPC_EPOCH_HUNTER))
|
||||
{
|
||||
epoch->SetImmuneToAll(false);
|
||||
epoch->GetMotionMaster()->MovePoint(0, *me, false, true);
|
||||
epoch->GetMotionMaster()->MovePoint(0, *me, FORCED_MOVEMENT_NONE, 0.f, false, true);
|
||||
}
|
||||
break;
|
||||
case EVENT_THRALL_FACE_TARETHA:
|
||||
@@ -922,7 +923,8 @@ public:
|
||||
|
||||
void ReorderInstance(uint32 data)
|
||||
{
|
||||
Start(true, true);
|
||||
me->SetWalk(false);
|
||||
Start(true);
|
||||
SetEscortPaused(true);
|
||||
SetDespawnAtEnd(false);
|
||||
|
||||
@@ -1008,7 +1010,8 @@ public:
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->RemoveAllAuras();
|
||||
Start(false, true);
|
||||
me->SetWalk(false);
|
||||
Start(false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
|
||||
@@ -118,7 +118,7 @@ struct npc_medivh_bm : public ScriptedAI
|
||||
summon->CastSpell(summon, SPELL_BLACK_CRYSTAL, true);
|
||||
Movement::MoveSplineInit init(summon);
|
||||
init.MovebyPath(_groundArray);
|
||||
init.SetCyclic();
|
||||
init.SetCyclic(); // TODO: Add support for cyclic paths in motion master
|
||||
init.Launch();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user