Core/Creature: Add new db field InteractionPauseTimer
Port From (https://github.com/TrinityCore/TrinityCore/commit/5180abfb19b9c1c4f2df2fbfa918a62f1c4ae995)
This commit is contained in:
@@ -39,7 +39,9 @@ namespace Game
|
||||
return;
|
||||
|
||||
// Stop the npc if moving
|
||||
unit.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
uint pause = unit.GetMovementTemplate().GetInteractionPauseTimer();
|
||||
if (pause != 0)
|
||||
unit.PauseMovement(pause);
|
||||
unit.SetHomePosition(unit.GetPosition());
|
||||
|
||||
BattlegroundTypeId bgTypeId = Global.BattlegroundMgr.GetBattleMasterBG(unit.GetEntry());
|
||||
|
||||
@@ -144,7 +144,9 @@ namespace Game
|
||||
GetPlayer().RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Interacting);
|
||||
|
||||
// Stop the npc if moving
|
||||
unit.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
uint pause = unit.GetMovementTemplate().GetInteractionPauseTimer();
|
||||
if (pause != 0)
|
||||
unit.PauseMovement(pause);
|
||||
unit.SetHomePosition(unit.GetPosition());
|
||||
|
||||
// If spiritguide, no need for gossip menu, just put player into resurrect queue
|
||||
@@ -601,7 +603,9 @@ namespace Game
|
||||
GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
|
||||
|
||||
// Stop the npc if moving
|
||||
vendor.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
uint pause = vendor.GetMovementTemplate().GetInteractionPauseTimer();
|
||||
if (pause != 0)
|
||||
vendor.PauseMovement(pause);
|
||||
vendor.SetHomePosition(vendor.GetPosition());
|
||||
|
||||
VendorItemData vendorItems = vendor.GetVendorItems();
|
||||
|
||||
@@ -73,7 +73,9 @@ namespace Game
|
||||
GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
|
||||
|
||||
// Stop the npc if moving
|
||||
creature.PauseMovement(WorldConfig.GetUIntValue(WorldCfg.CreatureStopForPlayer));
|
||||
uint pause = creature.GetMovementTemplate().GetInteractionPauseTimer();
|
||||
if (pause != 0)
|
||||
creature.PauseMovement(pause);
|
||||
creature.SetHomePosition(creature.GetPosition());
|
||||
|
||||
_player.PlayerTalkClass.ClearMenus();
|
||||
|
||||
Reference in New Issue
Block a user