From 5180abfb19b9c1c4f2df2fbfa918a62f1c4ae995 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Fri, 22 Jan 2021 19:48:50 +0100 Subject: 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 (cherry picked from commit a22bc236ebc038c723774e5b38cd93e814ccc43d) --- .../master/2022_03_05_91_world_2021_01_22_01_world.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sql/updates/world/master/2022_03_05_91_world_2021_01_22_01_world.sql (limited to 'sql') diff --git a/sql/updates/world/master/2022_03_05_91_world_2021_01_22_01_world.sql b/sql/updates/world/master/2022_03_05_91_world_2021_01_22_01_world.sql new file mode 100644 index 00000000000..7b6a52d70ae --- /dev/null +++ b/sql/updates/world/master/2022_03_05_91_world_2021_01_22_01_world.sql @@ -0,0 +1,16 @@ +-- +ALTER TABLE `creature_template_movement` CHANGE `Ground` `Ground` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` CHANGE `Swim` `Swim` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` CHANGE `Flight` `Flight` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` CHANGE `Rooted` `Rooted` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` CHANGE `Chase` `Chase` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` CHANGE `Random` `Random` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_template_movement` ADD COLUMN `InteractionPauseTimer` INT(10) UNSIGNED DEFAULT NULL NULL COMMENT 'Time (in milliseconds) during which creature will not move after interaction with player' AFTER `Random`; + +ALTER TABLE `creature_movement_override` CHANGE `Ground` `Ground` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` CHANGE `Swim` `Swim` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` CHANGE `Flight` `Flight` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` CHANGE `Rooted` `Rooted` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` CHANGE `Chase` `Chase` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` CHANGE `Random` `Random` TINYINT(3) UNSIGNED DEFAULT NULL NULL; +ALTER TABLE `creature_movement_override` ADD COLUMN `InteractionPauseTimer` INT(10) UNSIGNED DEFAULT NULL NULL COMMENT 'Time (in milliseconds) during which creature will not move after interaction with player' AFTER `Random`; -- cgit v1.2.3