aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/ItemHandler.cpp
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2021-01-22 19:48:50 +0100
committerGitHub <noreply@github.com>2021-01-22 19:48:50 +0100
commita22bc236ebc038c723774e5b38cd93e814ccc43d (patch)
tree13776e3ab391e2ab12a7901c8393a2016a2850f7 /src/server/game/Handlers/ItemHandler.cpp
parentbbbf607fe7ab0b58e4d0611d3bff78cfc8a511d0 (diff)
Core/Creature: Add new db field InteractionPauseTimer (#25880)
* Core/Creature: Add new db field InteractionPauseTimer Add new db field InteractionPauseTimer to allow to define different interaction pause timers for each creature (the previous system was a global setting in worldserver.conf Creature.MovingStopTimeForPlayer) * Set all columns in creature_template_movement as optional (can be NULL, default NULL). Fill only the columns that should override the default C++ value * Use the InteractionPauseTimer value throughout the code instead of Creature.MovingStopTimeForPlayer * Handle InteractionPauseTimer set to 0 as "don't stop at all" * Implement InteractionPauseTimer in creature_movement_override creature_movement_override allows NULL values, in which case the values from creature_template_movement will be used for those columns that are NULL, falling back to default C++ values if creature_template_movement has NULL values too (or no rows for the creature) * Read default InteractionPauseTimer from worldserver.conf * Rename 2021_99_99_99_world.sql to 2021_01_22_00_world.sql
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index b813798b219..be942a06389 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -619,7 +619,8 @@ void WorldSession::SendListInventory(ObjectGuid vendorGuid)
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
// Stop the npc if moving
- vendor->PauseMovement(sWorld->getIntConfig(CONFIG_CREATURE_STOP_FOR_PLAYER));
+ if (uint32 pause = vendor->GetMovementTemplate().GetInteractionPauseTimer())
+ vendor->PauseMovement(pause);
vendor->SetHomePosition(vendor->GetPosition());
VendorItemData const* items = vendor->GetVendorItems();