mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 16:26:08 +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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user