feat(Core/Config): make stop time for creatures with WP movement configurable #2715 (#2829)

Original author Stoabrogga
This commit is contained in:
Stefano Borzì
2020-03-31 01:30:39 +02:00
committed by GitHub
parent 633ef83b47
commit 19c3a70d41
5 changed files with 11 additions and 2 deletions

View File

@@ -233,7 +233,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
else
{
if (creature->IsStopped())
Stop(STOP_TIME_FOR_PLAYER);
Stop(sWorld->getIntConfig(CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER) * IN_MILLISECONDS);
else
{
// xinef: code to detect pre-empetively if we should start movement to next waypoint

View File

@@ -19,7 +19,6 @@
#include "Player.h"
#define FLIGHT_TRAVEL_UPDATE 100
#define STOP_TIME_FOR_PLAYER 2 * MINUTE * IN_MILLISECONDS // 3 Minutes
#define TIMEDIFF_NEXT_WP 250
template<class T, class P>

View File

@@ -1367,6 +1367,8 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_PACKET_SPOOF_BANDURATION] = sConfigMgr->GetIntDefault("PacketSpoof.BanDuration", 86400);
m_int_configs[CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER] = sConfigMgr->GetIntDefault("WaypointMovementStopTimeForPlayer", 120);
// call ScriptMgr if we're reloading the configuration
sScriptMgr->OnAfterConfigLoad(reload);
}

View File

@@ -352,6 +352,7 @@ enum WorldIntConfigs
CONFIG_ICC_BUFF_ALLIANCE,
CONFIG_ITEMDELETE_QUALITY,
CONFIG_ITEMDELETE_ITEM_LEVEL,
CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER,
INT_CONFIG_VALUE_COUNT
};

View File

@@ -1920,6 +1920,13 @@ ListenRange.TextEmote = 40
ListenRange.Yell = 300
# WaypointMovementStopTimeForPlayer
# Description: Specifies the time (in seconds) that a creature with waypoint
# movement will wait after a player interacts with it.
# default: 120
WaypointMovementStopTimeForPlayer = 120
#
###################################################################################################