TrinityCore
The World

Files

file  Weather.cpp
 
file  WeatherMgr.cpp
 
file  World.cpp
 

Namespaces

 WeatherMgr
 

Classes

struct  WeatherSeasonChances
 
struct  WeatherData
 
class  Weather
 Weather for one zone. More...
 
struct  CliCommandHolder
 Storage class for commands issued for delayed execution. More...
 
class  World
 The World. More...
 

Macros

#define WEATHER_SEASONS   4
 
#define sWorld   World::instance()
 

Typedefs

typedef std::unordered_map< uint32, WorldSession * > SessionMap
 

Enumerations

enum  WeatherState : uint32 {
  WEATHER_STATE_FINE = 0, WEATHER_STATE_FOG = 1, WEATHER_STATE_LIGHT_RAIN = 3, WEATHER_STATE_MEDIUM_RAIN = 4,
  WEATHER_STATE_HEAVY_RAIN = 5, WEATHER_STATE_LIGHT_SNOW = 6, WEATHER_STATE_MEDIUM_SNOW = 7, WEATHER_STATE_HEAVY_SNOW = 8,
  WEATHER_STATE_LIGHT_SANDSTORM = 22, WEATHER_STATE_MEDIUM_SANDSTORM = 41, WEATHER_STATE_HEAVY_SANDSTORM = 42, WEATHER_STATE_THUNDERS = 86,
  WEATHER_STATE_BLACKRAIN = 90, WEATHER_STATE_BLACKSNOW = 106
}
 
enum  ServerMessageType {
  SERVER_MSG_SHUTDOWN_TIME = 1, SERVER_MSG_RESTART_TIME = 2, SERVER_MSG_STRING = 3, SERVER_MSG_SHUTDOWN_CANCELLED = 4,
  SERVER_MSG_RESTART_CANCELLED = 5, SERVER_MSG_BG_SHUTDOWN_TIME = 6, SERVER_MSG_BG_RESTART_TIME = 7, SERVER_MSG_INSTANCE_SHUTDOWN_TIME = 8,
  SERVER_MSG_INSTANCE_RESTART_TIME = 9, SERVER_MSG_CONTENT_READY = 10, SERVER_MSG_TICKET_SERVICED_SOON = 11, SERVER_MSG_WAIT_TIME_UNAVAILABLE = 12,
  SERVER_MSG_TICKET_WAIT_TIME = 13
}
 
enum  ShutdownMask : uint32 { SHUTDOWN_MASK_RESTART = 1, SHUTDOWN_MASK_IDLE = 2, SHUTDOWN_MASK_FORCE = 4 }
 
enum  ShutdownExitCode : uint32 { SHUTDOWN_EXIT_CODE = 0, ERROR_EXIT_CODE = 1, RESTART_EXIT_CODE = 2 }
 
enum  WorldTimers {
  WUPDATE_AUCTIONS, WUPDATE_AUCTIONS_PENDING, WUPDATE_UPTIME, WUPDATE_CORPSES,
  WUPDATE_EVENTS, WUPDATE_CLEANDB, WUPDATE_AUTOBROADCAST, WUPDATE_MAILBOXQUEUE,
  WUPDATE_DELETECHARS, WUPDATE_AHBOT, WUPDATE_PINGDB, WUPDATE_GUILDSAVE,
  WUPDATE_BLACKMARKET, WUPDATE_CHECK_FILECHANGES, WUPDATE_WHO_LIST, WUPDATE_COUNT
}
 Timers for different object refresh rates. More...
 
enum  WorldBoolConfigs {
  CONFIG_DURABILITY_LOSS_IN_PVP = 0, CONFIG_ADDON_CHANNEL, CONFIG_CLEAN_CHARACTER_DB, CONFIG_GRID_UNLOAD,
  CONFIG_STATS_SAVE_ONLY_ON_LOGOUT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR, CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL, CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP,
  CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD, CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION, CONFIG_ALLOW_TWO_SIDE_TRADE, CONFIG_ALL_TAXI_PATHS,
  CONFIG_INSTANT_TAXI, CONFIG_INSTANCE_IGNORE_LEVEL, CONFIG_INSTANCE_IGNORE_RAID, CONFIG_CAST_UNSTUCK,
  CONFIG_ALLOW_GM_GROUP, CONFIG_GM_LOWER_SECURITY, CONFIG_SKILL_PROSPECTING, CONFIG_SKILL_MILLING,
  CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY, CONFIG_WEATHER, CONFIG_QUEST_IGNORE_RAID, CONFIG_CHAT_PARTY_RAID_WARNINGS,
  CONFIG_DETECT_POS_COLLISION, CONFIG_RESTRICTED_LFG_CHANNEL, CONFIG_CHAT_FAKE_MESSAGE_PREVENTING, CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP,
  CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE, CONFIG_DEATH_BONES_WORLD, CONFIG_DEATH_BONES_BG_OR_ARENA, CONFIG_DIE_COMMAND_MODE,
  CONFIG_DECLINED_NAMES_USED, CONFIG_BATTLEGROUND_CAST_DESERTER, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY,
  CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE, CONFIG_BG_XP_FOR_KILL, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, CONFIG_ARENA_SEASON_IN_PROGRESS,
  CONFIG_ARENA_LOG_EXTENDED_INFO, CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN, CONFIG_VMAP_INDOOR_CHECK, CONFIG_START_ALL_SPELLS,
  CONFIG_START_ALL_EXPLORED, CONFIG_START_ALL_REP, CONFIG_PVP_TOKEN_ENABLE, CONFIG_NO_RESET_TALENT_COST,
  CONFIG_SHOW_KICK_IN_WORLD, CONFIG_SHOW_MUTE_IN_WORLD, CONFIG_SHOW_BAN_IN_WORLD, CONFIG_AUTOBROADCAST,
  CONFIG_SUPPORT_ENABLED, CONFIG_SUPPORT_TICKETS_ENABLED, CONFIG_SUPPORT_BUGS_ENABLED, CONFIG_SUPPORT_COMPLAINTS_ENABLED,
  CONFIG_SUPPORT_SUGGESTIONS_ENABLED, CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES, CONFIG_PRESERVE_CUSTOM_CHANNELS, CONFIG_PDUMP_NO_PATHS,
  CONFIG_PDUMP_NO_OVERWRITE, CONFIG_QUEST_IGNORE_AUTO_ACCEPT, CONFIG_QUEST_IGNORE_AUTO_COMPLETE, CONFIG_QUEST_ENABLE_QUEST_TRACKER,
  CONFIG_WARDEN_ENABLED, CONFIG_ENABLE_MMAPS, CONFIG_WINTERGRASP_ENABLE, CONFIG_TOLBARAD_ENABLE,
  CONFIG_EVENT_ANNOUNCE, CONFIG_STATS_LIMITS_ENABLE, CONFIG_INSTANCES_RESET_ANNOUNCE, CONFIG_IP_BASED_ACTION_LOGGING,
  CONFIG_ALLOW_TRACK_BOTH_RESOURCES, CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA, CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA, CONFIG_FEATURE_SYSTEM_BPAY_STORE_ENABLED,
  CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_ENABLED, CONFIG_RESET_DUEL_COOLDOWNS, CONFIG_RESET_DUEL_HEALTH_MANA, CONFIG_BASEMAP_LOAD_GRIDS,
  CONFIG_INSTANCEMAP_LOAD_GRIDS, CONFIG_BLACKMARKET_ENABLED, CONFIG_HOTSWAP_ENABLED, CONFIG_HOTSWAP_RECOMPILER_ENABLED,
  CONFIG_HOTSWAP_EARLY_TERMINATION_ENABLED, CONFIG_HOTSWAP_BUILD_FILE_RECREATION_ENABLED, CONFIG_HOTSWAP_INSTALL_ENABLED, CONFIG_HOTSWAP_PREFIX_CORRECTION_ENABLED,
  CONFIG_PREVENT_RENAME_CUSTOMIZATION, CONFIG_CACHE_DATA_QUERIES, CONFIG_CREATURE_CHECK_INVALID_POSITION, CONFIG_GAME_OBJECT_CHECK_INVALID_POSITION,
  CONFIG_CHECK_GOBJECT_LOS, CONFIG_RESPAWN_DYNAMIC_ESCORTNPC, BOOL_CONFIG_VALUE_COUNT
}
 Configuration elements. More...
 
enum  WorldFloatConfigs {
  CONFIG_GROUP_XP_DISTANCE = 0, CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE, CONFIG_SIGHT_MONSTER, CONFIG_LISTEN_RANGE_SAY,
  CONFIG_LISTEN_RANGE_TEXTEMOTE, CONFIG_LISTEN_RANGE_YELL, CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS,
  CONFIG_THREAT_RADIUS, CONFIG_STATS_LIMITS_DODGE, CONFIG_STATS_LIMITS_PARRY, CONFIG_STATS_LIMITS_BLOCK,
  CONFIG_STATS_LIMITS_CRIT, CONFIG_ARENA_WIN_RATING_MODIFIER_1, CONFIG_ARENA_WIN_RATING_MODIFIER_2, CONFIG_ARENA_LOSE_RATING_MODIFIER,
  CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER, CONFIG_RESPAWN_DYNAMICRATE_CREATURE, CONFIG_RESPAWN_DYNAMICRATE_GAMEOBJECT, FLOAT_CONFIG_VALUE_COUNT
}
 
enum  WorldIntConfigs {
  CONFIG_COMPRESSION = 0, CONFIG_INTERVAL_SAVE, CONFIG_INTERVAL_GRIDCLEAN, CONFIG_INTERVAL_MAPUPDATE,
  CONFIG_INTERVAL_CHANGEWEATHER, CONFIG_INTERVAL_DISCONNECT_TOLERANCE, CONFIG_PORT_WORLD, CONFIG_PORT_INSTANCE,
  CONFIG_SOCKET_TIMEOUTTIME, CONFIG_SESSION_ADD_DELAY, CONFIG_GAME_TYPE, CONFIG_REALM_ZONE,
  CONFIG_STRICT_PLAYER_NAMES, CONFIG_STRICT_CHARTER_NAMES, CONFIG_STRICT_PET_NAMES, CONFIG_MIN_PLAYER_NAME,
  CONFIG_MIN_CHARTER_NAME, CONFIG_MIN_PET_NAME, CONFIG_CHARACTER_CREATING_DISABLED, CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK,
  CONFIG_CHARACTERS_PER_ACCOUNT, CONFIG_CHARACTERS_PER_REALM, CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER, CONFIG_SKIP_CINEMATICS,
  CONFIG_MAX_PLAYER_LEVEL, CONFIG_MIN_DUALSPEC_LEVEL, CONFIG_START_PLAYER_LEVEL, CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL,
  CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL, CONFIG_START_ALLIED_RACE_LEVEL, CONFIG_START_PLAYER_MONEY, CONFIG_CURRENCY_START_APEXIS_CRYSTALS,
  CONFIG_CURRENCY_MAX_APEXIS_CRYSTALS, CONFIG_CURRENCY_START_JUSTICE_POINTS, CONFIG_CURRENCY_MAX_JUSTICE_POINTS, CONFIG_CURRENCY_RESET_HOUR,
  CONFIG_CURRENCY_RESET_DAY, CONFIG_CURRENCY_RESET_INTERVAL, CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL, CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE,
  CONFIG_INSTANCE_RESET_TIME_HOUR, CONFIG_INSTANCE_UNLOAD_DELAY, CONFIG_DAILY_QUEST_RESET_TIME_HOUR, CONFIG_MAX_PRIMARY_TRADE_SKILL,
  CONFIG_MIN_PETITION_SIGNS, CONFIG_MIN_QUEST_SCALED_XP_RATIO, CONFIG_MIN_CREATURE_SCALED_XP_RATIO, CONFIG_MIN_DISCOVERED_SCALED_XP_RATIO,
  CONFIG_GM_LOGIN_STATE, CONFIG_GM_VISIBLE_STATE, CONFIG_GM_CHAT, CONFIG_GM_WHISPERING_TO,
  CONFIG_GM_FREEZE_DURATION, CONFIG_GM_LEVEL_IN_GM_LIST, CONFIG_GM_LEVEL_IN_WHO_LIST, CONFIG_START_GM_LEVEL,
  CONFIG_FORCE_SHUTDOWN_THRESHOLD, CONFIG_GROUP_VISIBILITY, CONFIG_MAIL_DELIVERY_DELAY, CONFIG_CLEAN_OLD_MAIL_TIME,
  CONFIG_UPTIME_UPDATE, CONFIG_SKILL_CHANCE_ORANGE, CONFIG_SKILL_CHANCE_YELLOW, CONFIG_SKILL_CHANCE_GREEN,
  CONFIG_SKILL_CHANCE_GREY, CONFIG_SKILL_CHANCE_MINING_STEPS, CONFIG_SKILL_CHANCE_SKINNING_STEPS, CONFIG_SKILL_GAIN_CRAFTING,
  CONFIG_SKILL_GAIN_GATHERING, CONFIG_MAX_OVERSPEED_PINGS, CONFIG_EXPANSION, CONFIG_CHATFLOOD_MESSAGE_COUNT,
  CONFIG_CHATFLOOD_MESSAGE_DELAY, CONFIG_CHATFLOOD_MUTE_TIME, CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY, CONFIG_CREATURE_FAMILY_FLEE_DELAY,
  CONFIG_WORLD_BOSS_LEVEL_DIFF, CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF, CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF, CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY,
  CONFIG_CHAT_STRICT_LINK_CHECKING_KICK, CONFIG_CHAT_CHANNEL_LEVEL_REQ, CONFIG_CHAT_WHISPER_LEVEL_REQ, CONFIG_CHAT_EMOTE_LEVEL_REQ,
  CONFIG_CHAT_SAY_LEVEL_REQ, CONFIG_CHAT_YELL_LEVEL_REQ, CONFIG_PARTY_LEVEL_REQ, CONFIG_TRADE_LEVEL_REQ,
  CONFIG_AUCTION_LEVEL_REQ, CONFIG_MAIL_LEVEL_REQ, CONFIG_CORPSE_DECAY_NORMAL, CONFIG_CORPSE_DECAY_RARE,
  CONFIG_CORPSE_DECAY_ELITE, CONFIG_CORPSE_DECAY_RAREELITE, CONFIG_CORPSE_DECAY_WORLDBOSS, CONFIG_DEATH_SICKNESS_LEVEL,
  CONFIG_INSTANT_LOGOUT, CONFIG_DISABLE_BREATHING, CONFIG_BATTLEGROUND_INVITATION_TYPE, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER,
  CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, CONFIG_BATTLEGROUND_REPORT_AFK, CONFIG_ARENA_MAX_RATING_DIFFERENCE, CONFIG_ARENA_RATING_DISCARD_TIMER,
  CONFIG_ARENA_RATED_UPDATE_TIMER, CONFIG_ARENA_SEASON_ID, CONFIG_ARENA_START_RATING, CONFIG_ARENA_START_PERSONAL_RATING,
  CONFIG_ARENA_START_MATCHMAKER_RATING, CONFIG_MAX_WHO, CONFIG_HONOR_AFTER_DUEL, CONFIG_PVP_TOKEN_MAP_TYPE,
  CONFIG_PVP_TOKEN_ID, CONFIG_PVP_TOKEN_COUNT, CONFIG_ENABLE_SINFO_LOGIN, CONFIG_PLAYER_ALLOW_COMMANDS,
  CONFIG_NUMTHREADS, CONFIG_LOGDB_CLEARINTERVAL, CONFIG_LOGDB_CLEARTIME, CONFIG_CLIENTCACHE_VERSION,
  CONFIG_GUILD_NEWS_LOG_COUNT, CONFIG_GUILD_EVENT_LOG_COUNT, CONFIG_GUILD_BANK_EVENT_LOG_COUNT, CONFIG_MIN_LEVEL_STAT_SAVE,
  CONFIG_RANDOM_BG_RESET_HOUR, CONFIG_GUILD_RESET_HOUR, CONFIG_CHARDELETE_KEEP_DAYS, CONFIG_CHARDELETE_METHOD,
  CONFIG_CHARDELETE_MIN_LEVEL, CONFIG_CHARDELETE_DEATH_KNIGHT_MIN_LEVEL, CONFIG_CHARDELETE_DEMON_HUNTER_MIN_LEVEL, CONFIG_AUTOBROADCAST_CENTER,
  CONFIG_AUTOBROADCAST_INTERVAL, CONFIG_MAX_RESULTS_LOOKUP_COMMANDS, CONFIG_DB_PING_INTERVAL, CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION,
  CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS, CONFIG_LFG_OPTIONSMASK, CONFIG_MAX_INSTANCES_PER_HOUR, CONFIG_WARDEN_CLIENT_RESPONSE_DELAY,
  CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF, CONFIG_WARDEN_CLIENT_FAIL_ACTION, CONFIG_WARDEN_CLIENT_BAN_DURATION, CONFIG_WARDEN_NUM_MEM_CHECKS,
  CONFIG_WARDEN_NUM_OTHER_CHECKS, CONFIG_WINTERGRASP_PLR_MAX, CONFIG_WINTERGRASP_PLR_MIN, CONFIG_WINTERGRASP_PLR_MIN_LVL,
  CONFIG_WINTERGRASP_BATTLETIME, CONFIG_WINTERGRASP_NOBATTLETIME, CONFIG_WINTERGRASP_RESTART_AFTER_CRASH, CONFIG_TOLBARAD_PLR_MAX,
  CONFIG_TOLBARAD_PLR_MIN, CONFIG_TOLBARAD_PLR_MIN_LVL, CONFIG_TOLBARAD_BATTLETIME, CONFIG_TOLBARAD_BONUSTIME,
  CONFIG_TOLBARAD_NOBATTLETIME, CONFIG_TOLBARAD_RESTART_AFTER_CRASH, CONFIG_GUILD_SAVE_INTERVAL, CONFIG_PACKET_SPOOF_POLICY,
  CONFIG_PACKET_SPOOF_BANMODE, CONFIG_PACKET_SPOOF_BANDURATION, CONFIG_ACC_PASSCHANGESEC, CONFIG_BG_REWARD_WINNER_HONOR_FIRST,
  CONFIG_BG_REWARD_WINNER_HONOR_LAST, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, 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, CONFIG_CHARTER_COST_ARENA_2v2, CONFIG_CHARTER_COST_ARENA_3v3,
  CONFIG_CHARTER_COST_ARENA_5v5, CONFIG_NO_GRAY_AGGRO_ABOVE, CONFIG_NO_GRAY_AGGRO_BELOW, CONFIG_AUCTION_REPLICATE_DELAY,
  CONFIG_AUCTION_SEARCH_DELAY, CONFIG_AUCTION_TAINTED_SEARCH_DELAY, CONFIG_TALENTS_INSPECTING, CONFIG_RESPAWN_MINCHECKINTERVALMS,
  CONFIG_RESPAWN_DYNAMICMODE, CONFIG_RESPAWN_GUIDWARNLEVEL, CONFIG_RESPAWN_GUIDALERTLEVEL, CONFIG_RESPAWN_RESTARTQUIETTIME,
  CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE, CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT, CONFIG_RESPAWN_GUIDWARNING_FREQUENCY, CONFIG_SOCKET_TIMEOUTTIME_ACTIVE,
  CONFIG_BLACKMARKET_MAXAUCTIONS, CONFIG_BLACKMARKET_UPDATE_PERIOD, INT_CONFIG_VALUE_COUNT
}
 
enum  WorldInt64Configs { CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK, INT64_CONFIT_VALUE_COUNT }
 
enum  Rates {
  RATE_HEALTH = 0, RATE_POWER_MANA, RATE_POWER_RAGE_INCOME, RATE_POWER_RAGE_LOSS,
  RATE_POWER_FOCUS, RATE_POWER_ENERGY, RATE_POWER_COMBO_POINTS_LOSS, RATE_POWER_RUNIC_POWER_INCOME,
  RATE_POWER_RUNIC_POWER_LOSS, RATE_POWER_SOUL_SHARDS, RATE_POWER_LUNAR_POWER, RATE_POWER_HOLY_POWER,
  RATE_POWER_MAELSTROM, RATE_POWER_CHI, RATE_POWER_INSANITY, RATE_POWER_ARCANE_CHARGES,
  RATE_POWER_FURY, RATE_POWER_PAIN, RATE_SKILL_DISCOVERY, RATE_DROP_ITEM_POOR,
  RATE_DROP_ITEM_NORMAL, RATE_DROP_ITEM_UNCOMMON, RATE_DROP_ITEM_RARE, RATE_DROP_ITEM_EPIC,
  RATE_DROP_ITEM_LEGENDARY, RATE_DROP_ITEM_ARTIFACT, RATE_DROP_ITEM_REFERENCED, RATE_DROP_ITEM_REFERENCED_AMOUNT,
  RATE_DROP_MONEY, RATE_XP_KILL, RATE_XP_BG_KILL, RATE_XP_QUEST,
  RATE_XP_GUILD_MODIFIER, RATE_XP_EXPLORE, RATE_REPAIRCOST, RATE_REPUTATION_GAIN,
  RATE_REPUTATION_LOWLEVEL_KILL, RATE_REPUTATION_LOWLEVEL_QUEST, RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS, RATE_CREATURE_NORMAL_HP,
  RATE_CREATURE_ELITE_ELITE_HP, RATE_CREATURE_ELITE_RAREELITE_HP, RATE_CREATURE_ELITE_WORLDBOSS_HP, RATE_CREATURE_ELITE_RARE_HP,
  RATE_CREATURE_NORMAL_DAMAGE, RATE_CREATURE_ELITE_ELITE_DAMAGE, RATE_CREATURE_ELITE_RAREELITE_DAMAGE, RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE,
  RATE_CREATURE_ELITE_RARE_DAMAGE, RATE_CREATURE_NORMAL_SPELLDAMAGE, RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE, RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE,
  RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE, RATE_CREATURE_ELITE_RARE_SPELLDAMAGE, RATE_CREATURE_AGGRO, RATE_REST_INGAME,
  RATE_REST_OFFLINE_IN_TAVERN_OR_CITY, RATE_REST_OFFLINE_IN_WILDERNESS, RATE_DAMAGE_FALL, RATE_AUCTION_TIME,
  RATE_AUCTION_DEPOSIT, RATE_AUCTION_CUT, RATE_HONOR, RATE_TALENT,
  RATE_CORPSE_DECAY_LOOTED, RATE_INSTANCE_RESET_TIME, RATE_DURABILITY_LOSS_ON_DEATH, RATE_DURABILITY_LOSS_DAMAGE,
  RATE_DURABILITY_LOSS_PARRY, RATE_DURABILITY_LOSS_ABSORB, RATE_DURABILITY_LOSS_BLOCK, RATE_MOVESPEED,
  RATE_MONEY_QUEST, RATE_MONEY_MAX_LEVEL_QUEST, MAX_RATES
}
 Server rates. More...
 
enum  RealmZone {
  REALM_ZONE_UNKNOWN = 0, REALM_ZONE_DEVELOPMENT = 1, REALM_ZONE_UNITED_STATES = 2, REALM_ZONE_OCEANIC = 3,
  REALM_ZONE_LATIN_AMERICA = 4, REALM_ZONE_TOURNAMENT_5 = 5, REALM_ZONE_KOREA = 6, REALM_ZONE_TOURNAMENT_7 = 7,
  REALM_ZONE_ENGLISH = 8, REALM_ZONE_GERMAN = 9, REALM_ZONE_FRENCH = 10, REALM_ZONE_SPANISH = 11,
  REALM_ZONE_RUSSIAN = 12, REALM_ZONE_TOURNAMENT_13 = 13, REALM_ZONE_TAIWAN = 14, REALM_ZONE_TOURNAMENT_15 = 15,
  REALM_ZONE_CHINA = 16, REALM_ZONE_CN1 = 17, REALM_ZONE_CN2 = 18, REALM_ZONE_CN3 = 19,
  REALM_ZONE_CN4 = 20, REALM_ZONE_CN5 = 21, REALM_ZONE_CN6 = 22, REALM_ZONE_CN7 = 23,
  REALM_ZONE_CN8 = 24, REALM_ZONE_TOURNAMENT_25 = 25, REALM_ZONE_TEST_SERVER = 26, REALM_ZONE_TOURNAMENT_27 = 27,
  REALM_ZONE_QA_SERVER = 28, REALM_ZONE_CN9 = 29, REALM_ZONE_TEST_SERVER_2 = 30, REALM_ZONE_CN10 = 31,
  REALM_ZONE_CTC = 32, REALM_ZONE_CNC = 33, REALM_ZONE_CN1_4 = 34, REALM_ZONE_CN2_6_9 = 35,
  REALM_ZONE_CN3_7 = 36, REALM_ZONE_CN5_8 = 37
}
 
enum  WorldStates {
  WS_CURRENCY_RESET_TIME = 20001, WS_WEEKLY_QUEST_RESET_TIME = 20002, WS_BG_DAILY_RESET_TIME = 20003, WS_CLEANING_FLAGS = 20004,
  WS_GUILD_DAILY_RESET_TIME = 20006, WS_MONTHLY_QUEST_RESET_TIME = 20007, WS_GUILD_WEEKLY_RESET_TIME = 20050
}
 

Functions

 Weather::Weather (uint32 zone, WeatherData const *weatherChances)
 Create the Weather object. More...
 
 Weather::~Weather ()
 
bool Weather::Update (uint32 diff)
 Launch a weather update. More...
 
bool Weather::ReGenerate ()
 Calculate the new weather. More...
 
bool Weather::UpdateWeather ()
 Send the new weather to all players in the zone. More...
 
void Weather::SendWeatherUpdateToPlayer (Player *player)
 
static void Weather::SendFineWeatherUpdateToPlayer (Player *player)
 
void Weather::SetWeather (WeatherType type, float grade)
 Set the weather. More...
 
WeatherState Weather::GetWeatherState () const
 Get the sound number associated with the current weather. More...
 
uint32 Weather::GetZone () const
 For which zone is this weather? More...
 
uint32 Weather::GetScriptId () const
 
void WeatherMgr::LoadWeatherData ()
 
WeatherData const * WeatherMgr::GetWeatherData (uint32 zone_id)
 
TC_GAME_API uint32 GetVirtualRealmAddress ()
 

Variables

uint32 WeatherSeasonChances::rainChance
 
uint32 WeatherSeasonChances::snowChance
 
uint32 WeatherSeasonChances::stormChance
 
WeatherSeasonChances WeatherData::data [WEATHER_SEASONS]
 
uint32 WeatherData::ScriptId
 
uint32 Weather::m_zone
 
WeatherType Weather::m_type
 
float Weather::m_grade
 
IntervalTimer Weather::m_timer
 
WeatherData const * Weather::m_weatherChances
 
TC_GAME_API Realm realm
 

Detailed Description

Macro Definition Documentation

◆ sWorld

#define sWorld   World::instance()

◆ WEATHER_SEASONS

#define WEATHER_SEASONS   4

Typedef Documentation

◆ SessionMap

typedef std::unordered_map<uint32, WorldSession*> SessionMap

Enumeration Type Documentation

◆ Rates

enum Rates

Server rates.

Enumerator
RATE_HEALTH 
RATE_POWER_MANA 
RATE_POWER_RAGE_INCOME 
RATE_POWER_RAGE_LOSS 
RATE_POWER_FOCUS 
RATE_POWER_ENERGY 
RATE_POWER_COMBO_POINTS_LOSS 
RATE_POWER_RUNIC_POWER_INCOME 
RATE_POWER_RUNIC_POWER_LOSS 
RATE_POWER_SOUL_SHARDS 
RATE_POWER_LUNAR_POWER 
RATE_POWER_HOLY_POWER 
RATE_POWER_MAELSTROM 
RATE_POWER_CHI 
RATE_POWER_INSANITY 
RATE_POWER_ARCANE_CHARGES 
RATE_POWER_FURY 
RATE_POWER_PAIN 
RATE_SKILL_DISCOVERY 
RATE_DROP_ITEM_POOR 
RATE_DROP_ITEM_NORMAL 
RATE_DROP_ITEM_UNCOMMON 
RATE_DROP_ITEM_RARE 
RATE_DROP_ITEM_EPIC 
RATE_DROP_ITEM_LEGENDARY 
RATE_DROP_ITEM_ARTIFACT 
RATE_DROP_ITEM_REFERENCED 
RATE_DROP_ITEM_REFERENCED_AMOUNT 
RATE_DROP_MONEY 
RATE_XP_KILL 
RATE_XP_BG_KILL 
RATE_XP_QUEST 
RATE_XP_GUILD_MODIFIER 
RATE_XP_EXPLORE 
RATE_REPAIRCOST 
RATE_REPUTATION_GAIN 
RATE_REPUTATION_LOWLEVEL_KILL 
RATE_REPUTATION_LOWLEVEL_QUEST 
RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS 
RATE_CREATURE_NORMAL_HP 
RATE_CREATURE_ELITE_ELITE_HP 
RATE_CREATURE_ELITE_RAREELITE_HP 
RATE_CREATURE_ELITE_WORLDBOSS_HP 
RATE_CREATURE_ELITE_RARE_HP 
RATE_CREATURE_NORMAL_DAMAGE 
RATE_CREATURE_ELITE_ELITE_DAMAGE 
RATE_CREATURE_ELITE_RAREELITE_DAMAGE 
RATE_CREATURE_ELITE_WORLDBOSS_DAMAGE 
RATE_CREATURE_ELITE_RARE_DAMAGE 
RATE_CREATURE_NORMAL_SPELLDAMAGE 
RATE_CREATURE_ELITE_ELITE_SPELLDAMAGE 
RATE_CREATURE_ELITE_RAREELITE_SPELLDAMAGE 
RATE_CREATURE_ELITE_WORLDBOSS_SPELLDAMAGE 
RATE_CREATURE_ELITE_RARE_SPELLDAMAGE 
RATE_CREATURE_AGGRO 
RATE_REST_INGAME 
RATE_REST_OFFLINE_IN_TAVERN_OR_CITY 
RATE_REST_OFFLINE_IN_WILDERNESS 
RATE_DAMAGE_FALL 
RATE_AUCTION_TIME 
RATE_AUCTION_DEPOSIT 
RATE_AUCTION_CUT 
RATE_HONOR 
RATE_TALENT 
RATE_CORPSE_DECAY_LOOTED 
RATE_INSTANCE_RESET_TIME 
RATE_DURABILITY_LOSS_ON_DEATH 
RATE_DURABILITY_LOSS_DAMAGE 
RATE_DURABILITY_LOSS_PARRY 
RATE_DURABILITY_LOSS_ABSORB 
RATE_DURABILITY_LOSS_BLOCK 
RATE_MOVESPEED 
RATE_MONEY_QUEST 
RATE_MONEY_MAX_LEVEL_QUEST 
MAX_RATES 
430 {
431  RATE_HEALTH = 0,
460  RATE_XP_KILL,
493  RATE_HONOR,
494  RATE_TALENT,
505  MAX_RATES
506 };
Definition: World.h:497
Definition: World.h:441
Definition: World.h:450
Definition: World.h:451
Definition: World.h:474
Definition: World.h:485
Definition: World.h:443
Definition: World.h:470
Definition: World.h:479
Definition: World.h:461
Definition: World.h:473
Definition: World.h:468
Definition: World.h:433
Definition: World.h:498
Definition: World.h:495
Definition: World.h:434
Definition: World.h:492
Definition: World.h:456
Definition: World.h:455
Definition: World.h:437
Definition: World.h:471
Definition: World.h:465
Definition: World.h:458
Definition: World.h:438
Definition: World.h:452
Definition: World.h:459
Definition: World.h:447
Definition: World.h:457
Definition: World.h:503
Definition: World.h:502
Definition: World.h:494
Definition: World.h:500
Definition: World.h:436
Definition: World.h:493
Definition: World.h:439
Definition: World.h:460
Definition: World.h:464
Definition: World.h:491
Definition: World.h:490
Definition: World.h:466
Definition: World.h:432
Definition: World.h:442
Definition: World.h:462
Definition: World.h:475
Definition: World.h:499
Definition: World.h:486
Definition: World.h:454
Definition: World.h:472
Definition: World.h:444
Definition: World.h:496
Definition: World.h:453
Definition: World.h:431
Definition: World.h:463
Definition: World.h:449
Definition: World.h:504
Definition: World.h:448
Definition: World.h:505
Definition: World.h:488
Definition: World.h:445
Definition: World.h:467
Definition: World.h:476
Definition: World.h:440
Definition: World.h:446
Definition: World.h:435
Definition: World.h:480
Definition: World.h:501
Definition: World.h:489

◆ RealmZone

enum RealmZone
Enumerator
REALM_ZONE_UNKNOWN 
REALM_ZONE_DEVELOPMENT 
REALM_ZONE_UNITED_STATES 
REALM_ZONE_OCEANIC 
REALM_ZONE_LATIN_AMERICA 
REALM_ZONE_TOURNAMENT_5 
REALM_ZONE_KOREA 
REALM_ZONE_TOURNAMENT_7 
REALM_ZONE_ENGLISH 
REALM_ZONE_GERMAN 
REALM_ZONE_FRENCH 
REALM_ZONE_SPANISH 
REALM_ZONE_RUSSIAN 
REALM_ZONE_TOURNAMENT_13 
REALM_ZONE_TAIWAN 
REALM_ZONE_TOURNAMENT_15 
REALM_ZONE_CHINA 
REALM_ZONE_CN1 
REALM_ZONE_CN2 
REALM_ZONE_CN3 
REALM_ZONE_CN4 
REALM_ZONE_CN5 
REALM_ZONE_CN6 
REALM_ZONE_CN7 
REALM_ZONE_CN8 
REALM_ZONE_TOURNAMENT_25 
REALM_ZONE_TEST_SERVER 
REALM_ZONE_TOURNAMENT_27 
REALM_ZONE_QA_SERVER 
REALM_ZONE_CN9 
REALM_ZONE_TEST_SERVER_2 
REALM_ZONE_CN10 
REALM_ZONE_CTC 
REALM_ZONE_CNC 
REALM_ZONE_CN1_4 
REALM_ZONE_CN2_6_9 
REALM_ZONE_CN3_7 
REALM_ZONE_CN5_8 
509 {
510  REALM_ZONE_UNKNOWN = 0, // any language
511  REALM_ZONE_DEVELOPMENT = 1, // any language
512  REALM_ZONE_UNITED_STATES = 2, // extended-Latin
513  REALM_ZONE_OCEANIC = 3, // extended-Latin
514  REALM_ZONE_LATIN_AMERICA = 4, // extended-Latin
515  REALM_ZONE_TOURNAMENT_5 = 5, // basic-Latin at create, any at login
516  REALM_ZONE_KOREA = 6, // East-Asian
517  REALM_ZONE_TOURNAMENT_7 = 7, // basic-Latin at create, any at login
518  REALM_ZONE_ENGLISH = 8, // extended-Latin
519  REALM_ZONE_GERMAN = 9, // extended-Latin
520  REALM_ZONE_FRENCH = 10, // extended-Latin
521  REALM_ZONE_SPANISH = 11, // extended-Latin
522  REALM_ZONE_RUSSIAN = 12, // Cyrillic
523  REALM_ZONE_TOURNAMENT_13 = 13, // basic-Latin at create, any at login
524  REALM_ZONE_TAIWAN = 14, // East-Asian
525  REALM_ZONE_TOURNAMENT_15 = 15, // basic-Latin at create, any at login
526  REALM_ZONE_CHINA = 16, // East-Asian
527  REALM_ZONE_CN1 = 17, // basic-Latin at create, any at login
528  REALM_ZONE_CN2 = 18, // basic-Latin at create, any at login
529  REALM_ZONE_CN3 = 19, // basic-Latin at create, any at login
530  REALM_ZONE_CN4 = 20, // basic-Latin at create, any at login
531  REALM_ZONE_CN5 = 21, // basic-Latin at create, any at login
532  REALM_ZONE_CN6 = 22, // basic-Latin at create, any at login
533  REALM_ZONE_CN7 = 23, // basic-Latin at create, any at login
534  REALM_ZONE_CN8 = 24, // basic-Latin at create, any at login
535  REALM_ZONE_TOURNAMENT_25 = 25, // basic-Latin at create, any at login
536  REALM_ZONE_TEST_SERVER = 26, // any language
537  REALM_ZONE_TOURNAMENT_27 = 27, // basic-Latin at create, any at login
538  REALM_ZONE_QA_SERVER = 28, // any language
539  REALM_ZONE_CN9 = 29, // basic-Latin at create, any at login
540  REALM_ZONE_TEST_SERVER_2 = 30, // any language
541  REALM_ZONE_CN10 = 31, // basic-Latin at create, any at login
542  REALM_ZONE_CTC = 32,
543  REALM_ZONE_CNC = 33,
544  REALM_ZONE_CN1_4 = 34, // basic-Latin at create, any at login
545  REALM_ZONE_CN2_6_9 = 35, // basic-Latin at create, any at login
546  REALM_ZONE_CN3_7 = 36, // basic-Latin at create, any at login
547  REALM_ZONE_CN5_8 = 37 // basic-Latin at create, any at login
548 };
Definition: World.h:530
Definition: World.h:539
Definition: World.h:533
Definition: World.h:545
Definition: World.h:510
Definition: World.h:535
Definition: World.h:514
Definition: World.h:513
Definition: World.h:538
Definition: World.h:534
Definition: World.h:515
Definition: World.h:522
Definition: World.h:541
Definition: World.h:543
Definition: World.h:547
Definition: World.h:518
Definition: World.h:542
Definition: World.h:520
Definition: World.h:537
Definition: World.h:512
Definition: World.h:511
Definition: World.h:536
Definition: World.h:525
Definition: World.h:517
Definition: World.h:524
Definition: World.h:540
Definition: World.h:544
Definition: World.h:531
Definition: World.h:529
Definition: World.h:521
Definition: World.h:516
Definition: World.h:526
Definition: World.h:519
Definition: World.h:523
Definition: World.h:546
Definition: World.h:528
Definition: World.h:532
Definition: World.h:527

◆ ServerMessageType

Enumerator
SERVER_MSG_SHUTDOWN_TIME 
SERVER_MSG_RESTART_TIME 
SERVER_MSG_STRING 
SERVER_MSG_SHUTDOWN_CANCELLED 
SERVER_MSG_RESTART_CANCELLED 
SERVER_MSG_BG_SHUTDOWN_TIME 
SERVER_MSG_BG_RESTART_TIME 
SERVER_MSG_INSTANCE_SHUTDOWN_TIME 
SERVER_MSG_INSTANCE_RESTART_TIME 
SERVER_MSG_CONTENT_READY 
SERVER_MSG_TICKET_SERVICED_SOON 
SERVER_MSG_WAIT_TIME_UNAVAILABLE 
SERVER_MSG_TICKET_WAIT_TIME 

◆ ShutdownExitCode

Enumerator
SHUTDOWN_EXIT_CODE 
ERROR_EXIT_CODE 
RESTART_EXIT_CODE 
71  : uint32
72 {
74  ERROR_EXIT_CODE = 1,
76 };
Definition: World.h:73
uint32_t uint32
Definition: Define.h:152
Definition: World.h:74
Definition: World.h:75

◆ ShutdownMask

Enumerator
SHUTDOWN_MASK_RESTART 
SHUTDOWN_MASK_IDLE 
SHUTDOWN_MASK_FORCE 
64  : uint32
65 {
69 };
Definition: World.h:66
Definition: World.h:67
uint32_t uint32
Definition: Define.h:152
Definition: World.h:68

◆ WeatherState

Enumerator
WEATHER_STATE_FINE 
WEATHER_STATE_FOG 
WEATHER_STATE_LIGHT_RAIN 
WEATHER_STATE_MEDIUM_RAIN 
WEATHER_STATE_HEAVY_RAIN 
WEATHER_STATE_LIGHT_SNOW 
WEATHER_STATE_MEDIUM_SNOW 
WEATHER_STATE_HEAVY_SNOW 
WEATHER_STATE_LIGHT_SANDSTORM 
WEATHER_STATE_MEDIUM_SANDSTORM 
WEATHER_STATE_HEAVY_SANDSTORM 
WEATHER_STATE_THUNDERS 
WEATHER_STATE_BLACKRAIN 
WEATHER_STATE_BLACKSNOW 
45  : uint32
46 {
48  WEATHER_STATE_FOG = 1, // Used in some instance encounters.
61 };
Definition: Weather.h:48
Definition: Weather.h:59
Definition: Weather.h:56
Definition: Weather.h:52
Definition: Weather.h:58
Definition: Weather.h:54
Definition: Weather.h:51
Definition: Weather.h:47
uint32_t uint32
Definition: Define.h:152
Definition: Weather.h:53
Definition: Weather.h:60
Definition: Weather.h:50
Definition: Weather.h:49
Definition: Weather.h:55
Definition: Weather.h:57

◆ WorldBoolConfigs

Configuration elements.

Enumerator
CONFIG_DURABILITY_LOSS_IN_PVP 
CONFIG_ADDON_CHANNEL 
CONFIG_CLEAN_CHARACTER_DB 
CONFIG_GRID_UNLOAD 
CONFIG_STATS_SAVE_ONLY_ON_LOGOUT 
CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR 
CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL 
CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP 
CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD 
CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION 
CONFIG_ALLOW_TWO_SIDE_TRADE 
CONFIG_ALL_TAXI_PATHS 
CONFIG_INSTANT_TAXI 
CONFIG_INSTANCE_IGNORE_LEVEL 
CONFIG_INSTANCE_IGNORE_RAID 
CONFIG_CAST_UNSTUCK 
CONFIG_ALLOW_GM_GROUP 
CONFIG_GM_LOWER_SECURITY 
CONFIG_SKILL_PROSPECTING 
CONFIG_SKILL_MILLING 
CONFIG_SAVE_RESPAWN_TIME_IMMEDIATELY 
CONFIG_WEATHER 
CONFIG_QUEST_IGNORE_RAID 
CONFIG_CHAT_PARTY_RAID_WARNINGS 
CONFIG_DETECT_POS_COLLISION 
CONFIG_RESTRICTED_LFG_CHANNEL 
CONFIG_CHAT_FAKE_MESSAGE_PREVENTING 
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP 
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE 
CONFIG_DEATH_BONES_WORLD 
CONFIG_DEATH_BONES_BG_OR_ARENA 
CONFIG_DIE_COMMAND_MODE 
CONFIG_DECLINED_NAMES_USED 
CONFIG_BATTLEGROUND_CAST_DESERTER 
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE 
CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY 
CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE 
CONFIG_BG_XP_FOR_KILL 
CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE 
CONFIG_ARENA_SEASON_IN_PROGRESS 
CONFIG_ARENA_LOG_EXTENDED_INFO 
CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN 
CONFIG_VMAP_INDOOR_CHECK 
CONFIG_START_ALL_SPELLS 
CONFIG_START_ALL_EXPLORED 
CONFIG_START_ALL_REP 
CONFIG_PVP_TOKEN_ENABLE 
CONFIG_NO_RESET_TALENT_COST 
CONFIG_SHOW_KICK_IN_WORLD 
CONFIG_SHOW_MUTE_IN_WORLD 
CONFIG_SHOW_BAN_IN_WORLD 
CONFIG_AUTOBROADCAST 
CONFIG_SUPPORT_ENABLED 
CONFIG_SUPPORT_TICKETS_ENABLED 
CONFIG_SUPPORT_BUGS_ENABLED 
CONFIG_SUPPORT_COMPLAINTS_ENABLED 
CONFIG_SUPPORT_SUGGESTIONS_ENABLED 
CONFIG_DBC_ENFORCE_ITEM_ATTRIBUTES 
CONFIG_PRESERVE_CUSTOM_CHANNELS 
CONFIG_PDUMP_NO_PATHS 
CONFIG_PDUMP_NO_OVERWRITE 
CONFIG_QUEST_IGNORE_AUTO_ACCEPT 
CONFIG_QUEST_IGNORE_AUTO_COMPLETE 
CONFIG_QUEST_ENABLE_QUEST_TRACKER 
CONFIG_WARDEN_ENABLED 
CONFIG_ENABLE_MMAPS 
CONFIG_WINTERGRASP_ENABLE 
CONFIG_TOLBARAD_ENABLE 
CONFIG_EVENT_ANNOUNCE 
CONFIG_STATS_LIMITS_ENABLE 
CONFIG_INSTANCES_RESET_ANNOUNCE 
CONFIG_IP_BASED_ACTION_LOGGING 
CONFIG_ALLOW_TRACK_BOTH_RESOURCES 
CONFIG_CALCULATE_CREATURE_ZONE_AREA_DATA 
CONFIG_CALCULATE_GAMEOBJECT_ZONE_AREA_DATA 
CONFIG_FEATURE_SYSTEM_BPAY_STORE_ENABLED 
CONFIG_FEATURE_SYSTEM_CHARACTER_UNDELETE_ENABLED 
CONFIG_RESET_DUEL_COOLDOWNS 
CONFIG_RESET_DUEL_HEALTH_MANA 
CONFIG_BASEMAP_LOAD_GRIDS 
CONFIG_INSTANCEMAP_LOAD_GRIDS 
CONFIG_BLACKMARKET_ENABLED 
CONFIG_HOTSWAP_ENABLED 
CONFIG_HOTSWAP_RECOMPILER_ENABLED 
CONFIG_HOTSWAP_EARLY_TERMINATION_ENABLED 
CONFIG_HOTSWAP_BUILD_FILE_RECREATION_ENABLED 
CONFIG_HOTSWAP_INSTALL_ENABLED 
CONFIG_HOTSWAP_PREFIX_CORRECTION_ENABLED 
CONFIG_PREVENT_RENAME_CUSTOMIZATION 
CONFIG_CACHE_DATA_QUERIES 
CONFIG_CREATURE_CHECK_INVALID_POSITION 
CONFIG_GAME_OBJECT_CHECK_INVALID_POSITION 
CONFIG_CHECK_GOBJECT_LOS 
CONFIG_RESPAWN_DYNAMIC_ESCORTNPC 
BOOL_CONFIG_VALUE_COUNT 
101 {
197 };
Definition: World.h:123
Definition: World.h:157
Definition: World.h:112
Definition: World.h:118
Definition: World.h:145
Definition: World.h:195
Definition: World.h:166
Definition: World.h:159
Definition: World.h:153
Definition: World.h:144
Definition: World.h:134
Definition: World.h:183
Definition: World.h:149
Definition: World.h:139
Definition: World.h:155
Definition: World.h:152
Definition: World.h:162
Definition: World.h:194
Definition: World.h:180
Definition: World.h:105
Definition: World.h:124
Definition: World.h:141
Definition: World.h:114
Definition: World.h:135
Definition: World.h:163
Definition: World.h:168
Definition: World.h:126
Definition: World.h:174
Definition: World.h:113
Definition: World.h:131
Definition: World.h:165
Definition: World.h:170
Definition: World.h:160
Definition: World.h:150
Definition: World.h:106
Definition: World.h:120
Definition: World.h:116
Definition: World.h:151
Definition: World.h:171
Definition: World.h:196
Definition: World.h:158
Definition: World.h:104
Definition: World.h:161
Definition: World.h:115
Definition: World.h:172
Definition: World.h:146
Definition: World.h:119
Definition: World.h:167
Definition: World.h:127
Definition: World.h:188
Definition: World.h:121
Definition: World.h:148
Definition: World.h:117
Definition: World.h:173
Definition: World.h:142
Definition: World.h:181
Definition: World.h:182
Definition: World.h:133
Definition: World.h:103
Definition: World.h:169
Definition: World.h:102
Definition: World.h:184
Definition: World.h:179
Definition: World.h:164
Definition: World.h:132
Definition: World.h:154
Definition: World.h:125
Definition: World.h:191
Definition: World.h:185
Definition: World.h:147
Definition: World.h:156

◆ WorldFloatConfigs

Enumerator
CONFIG_GROUP_XP_DISTANCE 
CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE 
CONFIG_SIGHT_MONSTER 
CONFIG_LISTEN_RANGE_SAY 
CONFIG_LISTEN_RANGE_TEXTEMOTE 
CONFIG_LISTEN_RANGE_YELL 
CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS 
CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS 
CONFIG_THREAT_RADIUS 
CONFIG_STATS_LIMITS_DODGE 
CONFIG_STATS_LIMITS_PARRY 
CONFIG_STATS_LIMITS_BLOCK 
CONFIG_STATS_LIMITS_CRIT 
CONFIG_ARENA_WIN_RATING_MODIFIER_1 
CONFIG_ARENA_WIN_RATING_MODIFIER_2 
CONFIG_ARENA_LOSE_RATING_MODIFIER 
CONFIG_ARENA_MATCHMAKER_RATING_MODIFIER 
CONFIG_RESPAWN_DYNAMICRATE_CREATURE 
CONFIG_RESPAWN_DYNAMICRATE_GAMEOBJECT 
FLOAT_CONFIG_VALUE_COUNT 
200 {
221 };
Definition: World.h:201
Definition: World.h:204
Definition: World.h:203
Definition: World.h:211
Definition: World.h:216
Definition: World.h:212
Definition: World.h:215
Definition: World.h:220
Definition: World.h:209
Definition: World.h:210
Definition: World.h:205
Definition: World.h:206
Definition: World.h:213
Definition: World.h:214

◆ WorldInt64Configs

Enumerator
CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK 
INT64_CONFIT_VALUE_COUNT 

◆ WorldIntConfigs

Enumerator
CONFIG_COMPRESSION 
CONFIG_INTERVAL_SAVE 
CONFIG_INTERVAL_GRIDCLEAN 
CONFIG_INTERVAL_MAPUPDATE 
CONFIG_INTERVAL_CHANGEWEATHER 
CONFIG_INTERVAL_DISCONNECT_TOLERANCE 
CONFIG_PORT_WORLD 
CONFIG_PORT_INSTANCE 
CONFIG_SOCKET_TIMEOUTTIME 
CONFIG_SESSION_ADD_DELAY 
CONFIG_GAME_TYPE 
CONFIG_REALM_ZONE 
CONFIG_STRICT_PLAYER_NAMES 
CONFIG_STRICT_CHARTER_NAMES 
CONFIG_STRICT_PET_NAMES 
CONFIG_MIN_PLAYER_NAME 
CONFIG_MIN_CHARTER_NAME 
CONFIG_MIN_PET_NAME 
CONFIG_CHARACTER_CREATING_DISABLED 
CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK 
CONFIG_CHARACTERS_PER_ACCOUNT 
CONFIG_CHARACTERS_PER_REALM 
CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_DEMON_HUNTER 
CONFIG_SKIP_CINEMATICS 
CONFIG_MAX_PLAYER_LEVEL 
CONFIG_MIN_DUALSPEC_LEVEL 
CONFIG_START_PLAYER_LEVEL 
CONFIG_START_DEATH_KNIGHT_PLAYER_LEVEL 
CONFIG_START_DEMON_HUNTER_PLAYER_LEVEL 
CONFIG_START_ALLIED_RACE_LEVEL 
CONFIG_START_PLAYER_MONEY 
CONFIG_CURRENCY_START_APEXIS_CRYSTALS 
CONFIG_CURRENCY_MAX_APEXIS_CRYSTALS 
CONFIG_CURRENCY_START_JUSTICE_POINTS 
CONFIG_CURRENCY_MAX_JUSTICE_POINTS 
CONFIG_CURRENCY_RESET_HOUR 
CONFIG_CURRENCY_RESET_DAY 
CONFIG_CURRENCY_RESET_INTERVAL 
CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL 
CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE 
CONFIG_INSTANCE_RESET_TIME_HOUR 
CONFIG_INSTANCE_UNLOAD_DELAY 
CONFIG_DAILY_QUEST_RESET_TIME_HOUR 
CONFIG_MAX_PRIMARY_TRADE_SKILL 
CONFIG_MIN_PETITION_SIGNS 
CONFIG_MIN_QUEST_SCALED_XP_RATIO 
CONFIG_MIN_CREATURE_SCALED_XP_RATIO 
CONFIG_MIN_DISCOVERED_SCALED_XP_RATIO 
CONFIG_GM_LOGIN_STATE 
CONFIG_GM_VISIBLE_STATE 
CONFIG_GM_CHAT 
CONFIG_GM_WHISPERING_TO 
CONFIG_GM_FREEZE_DURATION 
CONFIG_GM_LEVEL_IN_GM_LIST 
CONFIG_GM_LEVEL_IN_WHO_LIST 
CONFIG_START_GM_LEVEL 
CONFIG_FORCE_SHUTDOWN_THRESHOLD 
CONFIG_GROUP_VISIBILITY 
CONFIG_MAIL_DELIVERY_DELAY 
CONFIG_CLEAN_OLD_MAIL_TIME 
CONFIG_UPTIME_UPDATE 
CONFIG_SKILL_CHANCE_ORANGE 
CONFIG_SKILL_CHANCE_YELLOW 
CONFIG_SKILL_CHANCE_GREEN 
CONFIG_SKILL_CHANCE_GREY 
CONFIG_SKILL_CHANCE_MINING_STEPS 
CONFIG_SKILL_CHANCE_SKINNING_STEPS 
CONFIG_SKILL_GAIN_CRAFTING 
CONFIG_SKILL_GAIN_GATHERING 
CONFIG_MAX_OVERSPEED_PINGS 
CONFIG_EXPANSION 
CONFIG_CHATFLOOD_MESSAGE_COUNT 
CONFIG_CHATFLOOD_MESSAGE_DELAY 
CONFIG_CHATFLOOD_MUTE_TIME 
CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY 
CONFIG_CREATURE_FAMILY_FLEE_DELAY 
CONFIG_WORLD_BOSS_LEVEL_DIFF 
CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF 
CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF 
CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY 
CONFIG_CHAT_STRICT_LINK_CHECKING_KICK 
CONFIG_CHAT_CHANNEL_LEVEL_REQ 
CONFIG_CHAT_WHISPER_LEVEL_REQ 
CONFIG_CHAT_EMOTE_LEVEL_REQ 
CONFIG_CHAT_SAY_LEVEL_REQ 
CONFIG_CHAT_YELL_LEVEL_REQ 
CONFIG_PARTY_LEVEL_REQ 
CONFIG_TRADE_LEVEL_REQ 
CONFIG_AUCTION_LEVEL_REQ 
CONFIG_MAIL_LEVEL_REQ 
CONFIG_CORPSE_DECAY_NORMAL 
CONFIG_CORPSE_DECAY_RARE 
CONFIG_CORPSE_DECAY_ELITE 
CONFIG_CORPSE_DECAY_RAREELITE 
CONFIG_CORPSE_DECAY_WORLDBOSS 
CONFIG_DEATH_SICKNESS_LEVEL 
CONFIG_INSTANT_LOGOUT 
CONFIG_DISABLE_BREATHING 
CONFIG_BATTLEGROUND_INVITATION_TYPE 
CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER 
CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH 
CONFIG_BATTLEGROUND_REPORT_AFK 
CONFIG_ARENA_MAX_RATING_DIFFERENCE 
CONFIG_ARENA_RATING_DISCARD_TIMER 
CONFIG_ARENA_RATED_UPDATE_TIMER 
CONFIG_ARENA_SEASON_ID 
CONFIG_ARENA_START_RATING 
CONFIG_ARENA_START_PERSONAL_RATING 
CONFIG_ARENA_START_MATCHMAKER_RATING 
CONFIG_MAX_WHO 
CONFIG_HONOR_AFTER_DUEL 
CONFIG_PVP_TOKEN_MAP_TYPE 
CONFIG_PVP_TOKEN_ID 
CONFIG_PVP_TOKEN_COUNT 
CONFIG_ENABLE_SINFO_LOGIN 
CONFIG_PLAYER_ALLOW_COMMANDS 
CONFIG_NUMTHREADS 
CONFIG_LOGDB_CLEARINTERVAL 
CONFIG_LOGDB_CLEARTIME 
CONFIG_CLIENTCACHE_VERSION 
CONFIG_GUILD_NEWS_LOG_COUNT 
CONFIG_GUILD_EVENT_LOG_COUNT 
CONFIG_GUILD_BANK_EVENT_LOG_COUNT 
CONFIG_MIN_LEVEL_STAT_SAVE 
CONFIG_RANDOM_BG_RESET_HOUR 
CONFIG_GUILD_RESET_HOUR 
CONFIG_CHARDELETE_KEEP_DAYS 
CONFIG_CHARDELETE_METHOD 
CONFIG_CHARDELETE_MIN_LEVEL 
CONFIG_CHARDELETE_DEATH_KNIGHT_MIN_LEVEL 
CONFIG_CHARDELETE_DEMON_HUNTER_MIN_LEVEL 
CONFIG_AUTOBROADCAST_CENTER 
CONFIG_AUTOBROADCAST_INTERVAL 
CONFIG_MAX_RESULTS_LOOKUP_COMMANDS 
CONFIG_DB_PING_INTERVAL 
CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION 
CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS 
CONFIG_LFG_OPTIONSMASK 
CONFIG_MAX_INSTANCES_PER_HOUR 
CONFIG_WARDEN_CLIENT_RESPONSE_DELAY 
CONFIG_WARDEN_CLIENT_CHECK_HOLDOFF 
CONFIG_WARDEN_CLIENT_FAIL_ACTION 
CONFIG_WARDEN_CLIENT_BAN_DURATION 
CONFIG_WARDEN_NUM_MEM_CHECKS 
CONFIG_WARDEN_NUM_OTHER_CHECKS 
CONFIG_WINTERGRASP_PLR_MAX 
CONFIG_WINTERGRASP_PLR_MIN 
CONFIG_WINTERGRASP_PLR_MIN_LVL 
CONFIG_WINTERGRASP_BATTLETIME 
CONFIG_WINTERGRASP_NOBATTLETIME 
CONFIG_WINTERGRASP_RESTART_AFTER_CRASH 
CONFIG_TOLBARAD_PLR_MAX 
CONFIG_TOLBARAD_PLR_MIN 
CONFIG_TOLBARAD_PLR_MIN_LVL 
CONFIG_TOLBARAD_BATTLETIME 
CONFIG_TOLBARAD_BONUSTIME 
CONFIG_TOLBARAD_NOBATTLETIME 
CONFIG_TOLBARAD_RESTART_AFTER_CRASH 
CONFIG_GUILD_SAVE_INTERVAL 
CONFIG_PACKET_SPOOF_POLICY 
CONFIG_PACKET_SPOOF_BANMODE 
CONFIG_PACKET_SPOOF_BANDURATION 
CONFIG_ACC_PASSCHANGESEC 
CONFIG_BG_REWARD_WINNER_HONOR_FIRST 
CONFIG_BG_REWARD_WINNER_HONOR_LAST 
CONFIG_BG_REWARD_LOSER_HONOR_FIRST 
CONFIG_BG_REWARD_LOSER_HONOR_LAST 
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 
CONFIG_CHARTER_COST_ARENA_2v2 
CONFIG_CHARTER_COST_ARENA_3v3 
CONFIG_CHARTER_COST_ARENA_5v5 
CONFIG_NO_GRAY_AGGRO_ABOVE 
CONFIG_NO_GRAY_AGGRO_BELOW 
CONFIG_AUCTION_REPLICATE_DELAY 
CONFIG_AUCTION_SEARCH_DELAY 
CONFIG_AUCTION_TAINTED_SEARCH_DELAY 
CONFIG_TALENTS_INSPECTING 
CONFIG_RESPAWN_MINCHECKINTERVALMS 
CONFIG_RESPAWN_DYNAMICMODE 
CONFIG_RESPAWN_GUIDWARNLEVEL 
CONFIG_RESPAWN_GUIDALERTLEVEL 
CONFIG_RESPAWN_RESTARTQUIETTIME 
CONFIG_RESPAWN_DYNAMICMINIMUM_CREATURE 
CONFIG_RESPAWN_DYNAMICMINIMUM_GAMEOBJECT 
CONFIG_RESPAWN_GUIDWARNING_FREQUENCY 
CONFIG_SOCKET_TIMEOUTTIME_ACTIVE 
CONFIG_BLACKMARKET_MAXAUCTIONS 
CONFIG_BLACKMARKET_UPDATE_PERIOD 
INT_CONFIG_VALUE_COUNT 
224 {
225  CONFIG_COMPRESSION = 0,
420 };
Definition: World.h:328
Definition: World.h:331
Definition: World.h:266
Definition: World.h:267
Definition: World.h:294
Definition: World.h:268
Definition: World.h:336
Definition: World.h:316
Definition: World.h:248
Definition: World.h:292
Definition: World.h:349
Definition: World.h:314
Definition: World.h:357
Definition: World.h:389
Definition: World.h:346
Definition: World.h:370
Definition: World.h:265
Definition: World.h:334
Definition: World.h:280
Definition: World.h:384
Definition: World.h:394
Definition: World.h:383
Definition: World.h:411
Definition: World.h:298
Definition: World.h:402
Definition: World.h:351
Definition: World.h:369
Definition: World.h:376
Definition: World.h:232
Definition: World.h:348
Definition: World.h:340
Definition: World.h:366
Definition: World.h:284
Definition: World.h:288
Definition: World.h:379
Definition: World.h:240
Definition: World.h:377
Definition: World.h:235
Definition: World.h:236
Definition: World.h:282
Definition: World.h:310
Definition: World.h:398
Definition: World.h:254
Definition: World.h:269
Definition: World.h:302
Definition: World.h:303
Definition: World.h:241
Definition: World.h:390
Definition: World.h:273
Definition: World.h:353
Definition: World.h:277
Definition: World.h:301
Definition: World.h:408
Definition: World.h:419
Definition: World.h:345
Definition: World.h:399
Definition: World.h:229
Definition: World.h:381
Definition: World.h:417
Definition: World.h:356
Definition: World.h:287
Definition: World.h:418
Definition: World.h:378
Definition: World.h:358
Definition: World.h:317
Definition: World.h:359
Definition: World.h:270
Definition: World.h:337
Definition: World.h:242
Definition: World.h:261
Definition: World.h:307
Definition: World.h:347
Definition: World.h:368
Definition: World.h:403
Definition: World.h:274
Definition: World.h:362
Definition: World.h:259
Definition: World.h:350
Definition: World.h:338
Definition: World.h:300
Definition: World.h:330
Definition: World.h:332
Definition: World.h:326
Definition: World.h:322
Definition: World.h:296
Definition: World.h:327
Definition: World.h:342
Definition: World.h:311
Definition: World.h:293
Definition: World.h:291
Definition: World.h:245
Definition: World.h:320
Definition: World.h:373
Definition: World.h:283
Definition: World.h:290
Definition: World.h:308
Definition: World.h:276
Definition: World.h:344
Definition: World.h:318
Definition: World.h:239
Definition: World.h:363
Definition: World.h:391
Definition: World.h:380
Definition: World.h:231
Definition: World.h:234
Definition: World.h:262
Definition: World.h:251
Definition: World.h:260
Definition: World.h:243
Definition: World.h:313
Definition: World.h:279
Definition: World.h:295
Definition: World.h:343
Definition: World.h:286
Definition: World.h:396
Definition: World.h:365
Definition: World.h:255
Definition: World.h:297
Definition: World.h:352
Definition: World.h:404
Definition: World.h:400
Definition: World.h:309
Definition: World.h:410
Definition: World.h:281
Definition: World.h:409
Definition: World.h:226
Definition: World.h:237
Definition: World.h:329
Definition: World.h:416
Definition: World.h:401
Definition: World.h:233
Definition: World.h:412
Definition: World.h:367
Definition: World.h:339
Definition: World.h:315
Definition: World.h:238
Definition: World.h:285
Definition: World.h:371
Definition: World.h:227
Definition: World.h:312
Definition: World.h:405
Definition: World.h:246
Definition: World.h:374
Definition: World.h:289
Definition: World.h:335
Definition: World.h:249
Definition: World.h:319
Definition: World.h:407
Definition: World.h:385
Definition: World.h:278
Definition: World.h:395
Definition: World.h:386
Definition: World.h:306
Definition: World.h:225
Definition: World.h:372
Definition: World.h:321
Definition: World.h:250
Definition: World.h:228
Definition: World.h:341
Definition: World.h:387
Definition: World.h:275

◆ WorldStates

Enumerator
WS_CURRENCY_RESET_TIME 
WS_WEEKLY_QUEST_RESET_TIME 
WS_BG_DAILY_RESET_TIME 
WS_CLEANING_FLAGS 
WS_GUILD_DAILY_RESET_TIME 
WS_MONTHLY_QUEST_RESET_TIME 
WS_GUILD_WEEKLY_RESET_TIME 
551 {
552  WS_CURRENCY_RESET_TIME = 20001, // Next currency reset time
553  WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
554  WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time
555  WS_CLEANING_FLAGS = 20004, // Cleaning Flags
556  WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time
557  WS_MONTHLY_QUEST_RESET_TIME = 20007, // Next monthly reset time
558  // Cata specific custom worldstates
559  WS_GUILD_WEEKLY_RESET_TIME = 20050, // Next guild week reset time
560 };
Definition: World.h:557
Definition: World.h:552
Definition: World.h:554
Definition: World.h:553
Definition: World.h:556
Definition: World.h:559
Definition: World.h:555

◆ WorldTimers

Timers for different object refresh rates.

Enumerator
WUPDATE_AUCTIONS 
WUPDATE_AUCTIONS_PENDING 
WUPDATE_UPTIME 
WUPDATE_CORPSES 
WUPDATE_EVENTS 
WUPDATE_CLEANDB 
WUPDATE_AUTOBROADCAST 
WUPDATE_MAILBOXQUEUE 
WUPDATE_DELETECHARS 
WUPDATE_AHBOT 
WUPDATE_PINGDB 
WUPDATE_GUILDSAVE 
WUPDATE_BLACKMARKET 
WUPDATE_CHECK_FILECHANGES 
WUPDATE_WHO_LIST 
WUPDATE_COUNT 
80 {
97 };
Definition: World.h:91
Definition: World.h:88
Definition: World.h:92
Definition: World.h:81
Definition: World.h:93
Definition: World.h:90
Definition: World.h:87
Definition: World.h:86
Definition: World.h:89
Definition: World.h:84
Definition: World.h:96
Definition: World.h:95
Definition: World.h:83
Definition: World.h:85
Definition: World.h:82
Definition: World.h:94

Function Documentation

◆ GetScriptId()

uint32 Weather::GetScriptId ( ) const
inline
82 { return m_weatherChances->ScriptId; }
uint32 ScriptId
Definition: Weather.h:42
WeatherData const * m_weatherChances
Definition: Weather.h:89
+ Here is the caller graph for this function:

◆ GetVirtualRealmAddress()

TC_GAME_API uint32 GetVirtualRealmAddress ( )
3733 {
3734  return realm.Id.GetAddress();
3735 }
Realm realm
Definition: World.cpp:3730
uint32 GetAddress() const
Definition: Realm.h:55
Battlenet::RealmHandle Id
Definition: Realm.h:79
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWeatherData()

TC_GAME_API WeatherData const * WeatherMgr::GetWeatherData ( uint32  zone_id)
39 {
40  return Trinity::Containers::MapGetValuePtr(_weatherData, zone_id);
41 }
auto MapGetValuePtr(M &map, typename M::key_type const &key) -> decltype(AddressOrSelf(map.find(key) ->second))
Definition: Containers.h:226
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWeatherState()

WeatherState Weather::GetWeatherState ( ) const

Get the sound number associated with the current weather.

286 {
287  if (m_grade<0.27f)
288  return WEATHER_STATE_FINE;
289 
290  switch (m_type)
291  {
292  case WEATHER_TYPE_RAIN:
293  if (m_grade<0.40f)
295  else if (m_grade<0.70f)
297  else
299  case WEATHER_TYPE_SNOW:
300  if (m_grade<0.40f)
302  else if (m_grade<0.70f)
304  else
306  case WEATHER_TYPE_STORM:
307  if (m_grade<0.40f)
309  else if (m_grade<0.70f)
311  else
316  return WEATHER_STATE_THUNDERS;
317  case WEATHER_TYPE_FINE:
318  default:
319  return WEATHER_STATE_FINE;
320  }
321 }
Definition: SharedDefines.h:5533
Definition: Weather.h:59
Definition: Weather.h:56
Definition: Weather.h:52
Definition: Weather.h:58
Definition: Weather.h:54
Definition: SharedDefines.h:5535
Definition: Weather.h:51
WeatherType m_type
Definition: Weather.h:86
Definition: SharedDefines.h:5536
Definition: SharedDefines.h:5534
float m_grade
Definition: Weather.h:87
Definition: Weather.h:47
Definition: SharedDefines.h:5532
Definition: Weather.h:53
Definition: Weather.h:50
Definition: Weather.h:49
Definition: Weather.h:55
Definition: Weather.h:57
Definition: SharedDefines.h:5531
+ Here is the caller graph for this function:

◆ GetZone()

uint32 Weather::GetZone ( ) const
inline

For which zone is this weather?

81 { return m_zone; };
uint32 m_zone
Definition: Weather.h:85

◆ LoadWeatherData()

TC_GAME_API void WeatherMgr::LoadWeatherData ( )
44 {
45  uint32 oldMSTime = getMSTime();
46 
47  uint32 count = 0;
48 
49  QueryResult result = WorldDatabase.Query("SELECT "
50  "zone, spring_rain_chance, spring_snow_chance, spring_storm_chance,"
51  "summer_rain_chance, summer_snow_chance, summer_storm_chance,"
52  "fall_rain_chance, fall_snow_chance, fall_storm_chance,"
53  "winter_rain_chance, winter_snow_chance, winter_storm_chance,"
54  "ScriptName FROM game_weather");
55 
56  if (!result)
57  {
58  TC_LOG_INFO("server.loading", ">> Loaded 0 weather definitions. DB table `game_weather` is empty.");
59  return;
60  }
61 
62  do
63  {
64  Field* fields = result->Fetch();
65 
66  uint32 zone_id = fields[0].GetUInt32();
67 
68  WeatherData& wzc = _weatherData[zone_id];
69 
70  for (uint8 season = 0; season < WEATHER_SEASONS; ++season)
71  {
72  wzc.data[season].rainChance = fields[season * (MAX_WEATHER_TYPE-1) + 1].GetUInt8();
73  wzc.data[season].snowChance = fields[season * (MAX_WEATHER_TYPE-1) + 2].GetUInt8();
74  wzc.data[season].stormChance = fields[season * (MAX_WEATHER_TYPE-1) + 3].GetUInt8();
75 
76  if (wzc.data[season].rainChance > 100)
77  {
78  wzc.data[season].rainChance = 25;
79  TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong rain chance > 100%%", zone_id, season);
80  }
81 
82  if (wzc.data[season].snowChance > 100)
83  {
84  wzc.data[season].snowChance = 25;
85  TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong snow chance > 100%%", zone_id, season);
86  }
87 
88  if (wzc.data[season].stormChance > 100)
89  {
90  wzc.data[season].stormChance = 25;
91  TC_LOG_ERROR("sql.sql", "Weather for zone %u season %u has wrong storm chance > 100%%", zone_id, season);
92  }
93  }
94 
95  wzc.ScriptId = sObjectMgr->GetScriptId(fields[13].GetString());
96 
97  ++count;
98  }
99  while (result->NextRow());
100 
101  TC_LOG_INFO("server.loading", ">> Loaded %u weather definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
102 }
#define MAX_WEATHER_TYPE
Definition: SharedDefines.h:5539
WeatherSeasonChances data[WEATHER_SEASONS]
Definition: Weather.h:41
Class used to access individual fields of database query result.
Definition: Field.h:81
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:186
uint32 getMSTime()
Definition: Timer.h:24
uint32 ScriptId
Definition: Weather.h:42
#define sObjectMgr
Definition: ObjectMgr.h:1847
uint32 GetUInt32() const
Definition: Field.cpp:105
uint32_t uint32
Definition: Define.h:152
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
std::shared_ptr< ResultSet > QueryResult
Definition: DatabaseEnvFwd.h:28
uint32 snowChance
Definition: Weather.h:35
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
uint8_t uint8
Definition: Define.h:154
uint32 stormChance
Definition: Weather.h:36
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
Definition: DatabaseEnv.cpp:20
uint32 rainChance
Definition: Weather.h:34
#define WEATHER_SEASONS
Definition: Weather.h:31
Definition: Weather.h:39
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReGenerate()

bool Weather::ReGenerate ( )

Calculate the new weather.

Weather statistics:

  • 30% - no change
  • 30% - weather gets better (if not fine) or change weather type
  • 30% - weather worsens (if not fine)
  • 10% - radical change (if not fine)

    Radical change:

  • if light -> heavy
  • if medium -> change weather type
  • if heavy -> 50% light, 50% change weather type

    New weather statistics (if not fine):

  • 85% light
  • 7% medium
  • 7% heavy If fine 100% sun (no fog)
70 {
71  if (!m_weatherChances)
72  {
74  m_grade = 0.0f;
75  return false;
76  }
77 
83  uint32 u = urand(0, 99);
84 
85  if (u < 30)
86  return false;
87 
88  // remember old values
89  WeatherType old_type = m_type;
90  float old_grade = m_grade;
91 
92  //78 days between January 1st and March 20nd; 365/4=91 days by season
93  // season source http://aa.usno.navy.mil/data/docs/EarthSeasons.html
94  time_t gtime = GameTime::GetGameTime();
95  struct tm ltime;
96  localtime_r(&gtime, &ltime);
97  uint32 season = ((ltime.tm_yday - 78 + 365) / 91) % 4;
98 
99  static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
100 
101  TC_LOG_INFO("misc", "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
102 
103  if ((u < 60) && (m_grade < 0.33333334f)) // Get fair
104  {
106  m_grade = 0.0f;
107  }
108 
109  if ((u < 60) && (m_type != WEATHER_TYPE_FINE)) // Get better
110  {
111  m_grade -= 0.33333334f;
112  return true;
113  }
114 
115  if ((u < 90) && (m_type != WEATHER_TYPE_FINE)) // Get worse
116  {
117  m_grade += 0.33333334f;
118  return true;
119  }
120 
121  if (m_type != WEATHER_TYPE_FINE)
122  {
127 
128  if (m_grade < 0.33333334f)
129  {
130  m_grade = 0.9999f; // go nuts
131  return true;
132  }
133  else
134  {
135  if (m_grade > 0.6666667f)
136  {
137  // Severe change, but how severe?
138  uint32 rnd = urand(0, 99);
139  if (rnd < 50)
140  {
141  m_grade -= 0.6666667f;
142  return true;
143  }
144  }
145  m_type = WEATHER_TYPE_FINE; // clear up
146  m_grade = 0;
147  }
148  }
149 
150  // At this point, only weather that isn't doing anything remains but that have weather data
151  uint32 chance1 = m_weatherChances->data[season].rainChance;
152  uint32 chance2 = chance1 + m_weatherChances->data[season].snowChance;
153  uint32 chance3 = chance2 + m_weatherChances->data[season].stormChance;
154 
155  uint32 rnd = urand(1, 100);
156  if (rnd <= chance1)
158  else if (rnd <= chance2)
160  else if (rnd <= chance3)
162  else
164 
170 
171  if (m_type == WEATHER_TYPE_FINE)
172  {
173  m_grade = 0.0f;
174  }
175  else if (u < 90)
176  {
177  m_grade = (float)rand_norm() * 0.3333f;
178  }
179  else
180  {
181  // Severe change, but how severe?
182  rnd = urand(0, 99);
183  if (rnd < 50)
184  m_grade = (float)rand_norm() * 0.3333f + 0.3334f;
185  else
186  m_grade = (float)rand_norm() * 0.3333f + 0.6667f;
187  }
188 
189  // return true only in case weather changes
190  return m_type != old_type || m_grade != old_grade;
191 }
Definition: SharedDefines.h:5533
WeatherSeasonChances data[WEATHER_SEASONS]
Definition: Weather.h:41
TC_COMMON_API struct tm * localtime_r(time_t const *time, struct tm *result)
double rand_norm()
Definition: Random.cpp:78
WeatherType m_type
Definition: Weather.h:86
time_t GetGameTime()
Definition: GameTime.cpp:39
Definition: SharedDefines.h:5534
float m_grade
Definition: Weather.h:87
WeatherData const * m_weatherChances
Definition: Weather.h:89
uint32_t uint32
Definition: Define.h:152
Definition: SharedDefines.h:5532
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
uint32 snowChance
Definition: Weather.h:35
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:46
uint32 stormChance
Definition: Weather.h:36
WeatherType
Definition: SharedDefines.h:5529
uint32 m_zone
Definition: Weather.h:85
uint32 rainChance
Definition: Weather.h:34
Definition: SharedDefines.h:5531
#define WEATHER_SEASONS
Definition: Weather.h:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendFineWeatherUpdateToPlayer()

void Weather::SendFineWeatherUpdateToPlayer ( Player player)
static
200 {
202  player->SendDirectMessage(weather.Write());
203 }
Definition: MiscPackets.h:400
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6123
Definition: Weather.h:47
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendWeatherUpdateToPlayer()

void Weather::SendWeatherUpdateToPlayer ( Player player)
194 {
196  player->SendDirectMessage(weather.Write());
197 }
WeatherState GetWeatherState() const
Get the sound number associated with the current weather.
Definition: Weather.cpp:285
Definition: MiscPackets.h:400
float m_grade
Definition: Weather.h:87
void SendDirectMessage(WorldPacket const *data) const
Definition: Player.cpp:6123
+ Here is the call graph for this function:

◆ SetWeather()

void Weather::SetWeather ( WeatherType  type,
float  grade 
)

Set the weather.

275 {
276  if (m_type == type && m_grade == grade)
277  return;
278 
279  m_type = type;
280  m_grade = grade;
281  UpdateWeather();
282 }
bool UpdateWeather()
Send the new weather to all players in the zone.
Definition: Weather.cpp:206
WeatherType m_type
Definition: Weather.h:86
float m_grade
Definition: Weather.h:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

bool Weather::Update ( uint32  diff)

Launch a weather update.

  • If the timer has passed, ReGenerate the weather
  • Weather will be removed if not updated (no players in zone anymore)
45 {
46  if (m_timer.GetCurrent() >= 0)
47  m_timer.Update(diff);
48  else
50 
52  if (m_timer.Passed())
53  {
54  m_timer.Reset();
55  // update only if Regenerate has changed the weather
56  if (ReGenerate())
57  {
59  if (!UpdateWeather())
60  return false;
61  }
62  }
63 
64  sScriptMgr->OnWeatherUpdate(this, diff);
65  return true;
66 }
bool UpdateWeather()
Send the new weather to all players in the zone.
Definition: Weather.cpp:206
time_t GetCurrent() const
Definition: Timer.h:89
IntervalTimer m_timer
Definition: Weather.h:88
bool Passed()
Definition: Timer.h:63
bool ReGenerate()
Calculate the new weather.
Definition: Weather.cpp:69
void Reset()
Definition: Timer.h:68
void Update(time_t diff)
Definition: Timer.h:56
#define sScriptMgr
Definition: ScriptMgr.h:1221
void SetCurrent(time_t current)
Definition: Timer.h:74
+ Here is the call graph for this function:

◆ UpdateWeather()

bool Weather::UpdateWeather ( )

Send the new weather to all players in the zone.

  • Send the weather packet to all players in this zone
  • Log the event
207 {
209  if (m_grade >= 1)
210  m_grade = 0.9999f;
211  else if (m_grade < 0)
212  m_grade = 0.0001f;
213 
214  WeatherState state = GetWeatherState();
215 
216  WorldPackets::Misc::Weather weather(state, m_grade);
217 
218  //- Returns false if there were no players found to update
219  if (!sWorld->SendZoneMessage(m_zone, weather.Write()))
220  return false;
221 
223  char const* wthstr;
224  switch (state)
225  {
226  case WEATHER_STATE_FOG:
227  wthstr = "fog";
228  break;
230  wthstr = "light rain";
231  break;
233  wthstr = "medium rain";
234  break;
236  wthstr = "heavy rain";
237  break;
239  wthstr = "light snow";
240  break;
242  wthstr = "medium snow";
243  break;
245  wthstr = "heavy snow";
246  break;
248  wthstr = "light sandstorm";
249  break;
251  wthstr = "medium sandstorm";
252  break;
254  wthstr = "heavy sandstorm";
255  break;
257  wthstr = "thunders";
258  break;
260  wthstr = "blackrain";
261  break;
262  case WEATHER_STATE_FINE:
263  default:
264  wthstr = "fine";
265  break;
266  }
267 
268  TC_LOG_INFO("misc", "Change the weather of zone %u to %s.", m_zone, wthstr);
269  sScriptMgr->OnWeatherChange(this, state, m_grade);
270  return true;
271 }
Definition: Weather.h:48
Definition: Weather.h:59
Definition: Weather.h:56
Definition: Weather.h:52
Definition: Weather.h:58
Definition: Weather.h:54
WeatherState GetWeatherState() const
Get the sound number associated with the current weather.
Definition: Weather.cpp:285
Definition: Weather.h:51
#define sWorld
Definition: World.h:925
Definition: MiscPackets.h:400
float m_grade
Definition: Weather.h:87
Definition: Weather.h:47
Definition: Weather.h:53
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
Definition: Weather.h:50
Definition: Weather.h:49
Definition: Weather.h:55
#define sScriptMgr
Definition: ScriptMgr.h:1221
Definition: Weather.h:57
uint32 m_zone
Definition: Weather.h:85
WeatherState
Definition: Weather.h:45
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Weather()

Weather::Weather ( uint32  zone,
WeatherData const *  weatherChances 
)

Create the Weather object.

34  : m_zone(zone), m_weatherChances(weatherChances)
35 {
38  m_grade = 0;
39 
40  TC_LOG_INFO("misc", "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)));
41 }
#define sWorld
Definition: World.h:925
WeatherType m_type
Definition: Weather.h:86
IntervalTimer m_timer
Definition: Weather.h:88
Definition: World.h:229
Definition: Common.h:62
void SetInterval(time_t interval)
Definition: Timer.h:79
float m_grade
Definition: Weather.h:87
Definition: Common.h:68
WeatherData const * m_weatherChances
Definition: Weather.h:89
uint32_t uint32
Definition: Define.h:152
time_t GetInterval() const
Definition: Timer.h:84
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:180
uint32 m_zone
Definition: Weather.h:85
Definition: SharedDefines.h:5531
+ Here is the call graph for this function:

◆ ~Weather()

Weather::~Weather ( )
inline
69 { };

Variable Documentation

◆ data

◆ m_grade

float Weather::m_grade
private

◆ m_timer

IntervalTimer Weather::m_timer
private

◆ m_type

WeatherType Weather::m_type
private

◆ m_weatherChances

WeatherData const* Weather::m_weatherChances
private

◆ m_zone

uint32 Weather::m_zone
private

◆ rainChance

uint32 WeatherSeasonChances::rainChance

◆ realm

◆ ScriptId

uint32 WeatherData::ScriptId

◆ snowChance

uint32 WeatherSeasonChances::snowChance

◆ stormChance

uint32 WeatherSeasonChances::stormChance