Core/Movement: waypoint movement
Port From (https://github.com/TrinityCore/TrinityCore/commit/97585597f0b1aff93873fe4d757556731bc0c1b2)
This commit is contained in:
@@ -39,7 +39,7 @@ namespace Game
|
||||
return;
|
||||
|
||||
// Stop the npc if moving
|
||||
unit.StopMoving();
|
||||
unit.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
|
||||
BattlegroundTypeId bgTypeId = Global.BattlegroundMgr.GetBattleMasterBG(unit.GetEntry());
|
||||
|
||||
|
||||
@@ -340,8 +340,8 @@ namespace Game
|
||||
if (!seamlessTeleport)
|
||||
{
|
||||
// short preparations to continue flight
|
||||
FlightPathMovementGenerator flight = (FlightPathMovementGenerator)GetPlayer().GetMotionMaster().Top();
|
||||
flight.Initialize(GetPlayer());
|
||||
IMovementGenerator movementGenerator = GetPlayer().GetMotionMaster().Top();
|
||||
movementGenerator.Initialize(GetPlayer());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -143,9 +143,8 @@ namespace Game
|
||||
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Talk);
|
||||
|
||||
// and if he has pure gossip or is banker and moves or is tabard designer?
|
||||
//if (unit->IsArmorer() || unit->IsCivilian() || unit->IsQuestGiver() || unit->IsServiceProvider() || unit->IsGuard())
|
||||
unit.StopMoving();
|
||||
// Stop the npc if moving
|
||||
unit.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
|
||||
// If spiritguide, no need for gossip menu, just put player into resurrect queue
|
||||
if (unit.IsSpiritGuide())
|
||||
@@ -464,8 +463,7 @@ namespace Game
|
||||
GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
|
||||
|
||||
// Stop the npc if moving
|
||||
if (vendor.HasUnitState(UnitState.Moving))
|
||||
vendor.StopMoving();
|
||||
vendor.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
|
||||
VendorItemData vendorItems = vendor.GetVendorItems();
|
||||
int rawItemCount = vendorItems != null ? vendorItems.GetItemCount() : 0;
|
||||
|
||||
@@ -71,8 +71,9 @@ namespace Game
|
||||
// remove fake death
|
||||
if (GetPlayer().HasUnitState(UnitState.Died))
|
||||
GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
|
||||
|
||||
// Stop the npc if moving
|
||||
creature.StopMoving();
|
||||
creature.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
|
||||
_player.PlayerTalkClass.ClearMenus();
|
||||
if (creature.GetAI().GossipHello(_player))
|
||||
|
||||
@@ -130,8 +130,7 @@ namespace Game
|
||||
if (GetPlayer().HasUnitState(UnitState.Died))
|
||||
GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
|
||||
|
||||
while (GetPlayer().GetMotionMaster().GetCurrentMovementGeneratorType() == MovementGeneratorType.Flight)
|
||||
GetPlayer().GetMotionMaster().MovementExpired(false);
|
||||
GetPlayer().GetMotionMaster().Clear(MovementSlot.Controlled);
|
||||
|
||||
if (mountDisplayId != 0)
|
||||
GetPlayer().Mount(mountDisplayId);
|
||||
|
||||
Reference in New Issue
Block a user