Core/Misc: Move STOP_TIME_FOR_PLAYER value to config. (#17024)

(cherry picked from commit d5f04f5a38)
This commit is contained in:
Mikhail Redko
2016-04-26 00:33:26 +03:00
committed by DDuarte
parent 4da8ff95e6
commit c273248ad5
5 changed files with 12 additions and 2 deletions

View File

@@ -213,7 +213,7 @@ bool WaypointMovementGenerator<Creature>::DoUpdate(Creature* creature, uint32 di
creature->SetHomePosition(creature->GetPosition());
if (creature->IsStopped())
Stop(STOP_TIME_FOR_PLAYER);
Stop(sWorld->getIntConfig(CONFIG_CREATURE_STOP_FOR_PLAYER));
else if (creature->movespline->Finalized())
{
OnArrived(creature);

View File

@@ -28,9 +28,9 @@
#include "MovementGenerator.h"
#include "WaypointManager.h"
#include "Player.h"
#include "World.h"
#define FLIGHT_TRAVEL_UPDATE 100
#define STOP_TIME_FOR_PLAYER 3 * MINUTE * IN_MILLISECONDS // 3 Minutes
#define TIMEDIFF_NEXT_WP 250
template<class T, class P>

View File

@@ -1183,6 +1183,7 @@ void World::LoadConfigSettings(bool reload)
m_bool_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfigMgr->GetBoolDefault("OffhandCheckAtSpellUnlearn", true);
m_int_configs[CONFIG_CREATURE_PICKPOCKET_REFILL] = sConfigMgr->GetIntDefault("Creature.PickPocketRefillDelay", 10 * MINUTE);
m_int_configs[CONFIG_CREATURE_STOP_FOR_PLAYER] = sConfigMgr->GetIntDefault("Creature.MovingStopTimeForPlayer", 3 * MINUTE * IN_MILLISECONDS);
if (int32 clientCacheId = sConfigMgr->GetIntDefault("ClientCacheVersion", 0))
{

View File

@@ -376,6 +376,7 @@ enum WorldIntConfigs
CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST,
CONFIG_BG_REWARD_WINNER_CONQUEST_LAST,
CONFIG_CREATURE_PICKPOCKET_REFILL,
CONFIG_CREATURE_STOP_FOR_PLAYER,
CONFIG_AHBOT_UPDATE_INTERVAL,
CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_COOLDOWN,
CONFIG_CHARTER_COST_GUILD,

View File

@@ -1670,6 +1670,14 @@ ListenRange.TextEmote = 40
ListenRange.Yell = 300
#
# Creature.MovingStopTimeForPlayer
# Description: Time (in milliseconds) during which creature will not move after
# interaction with player.
# Default: 180000
Creature.MovingStopTimeForPlayer = 180000
#
###################################################################################################