AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "WorldState.h"
Public Member Functions | |
WorldState () | |
virtual | ~WorldState () |
void | HandlePlayerEnterZone (Player *player, WorldStateZoneId zoneId) |
void | HandlePlayerLeaveZone (Player *player, WorldStateZoneId zoneId) |
bool | IsConditionFulfilled (WorldStateCondition conditionId, WorldStateConditionState state=WORLD_STATE_CONDITION_STATE_NONE) const |
void | HandleConditionStateChange (WorldStateCondition conditionId, WorldStateConditionState state) |
void | HandleExternalEvent (WorldStateEvent eventId, uint32 param) |
void | Update (uint32 diff) |
Static Public Member Functions | |
static WorldState * | instance () |
Private Member Functions | |
void | BuffAdalsSongOfBattle () |
void | DispelAdalsSongOfBattle () |
void | BuffMagtheridonTeam (TeamId team) |
void | DispelMagtheridonTeam (TeamId team) |
Private Attributes | |
uint32 | _adalSongOfBattleTimer |
bool | _isMagtheridonHeadSpawnedHorde |
bool | _isMagtheridonHeadSpawnedAlliance |
std::map< WorldStateCondition, std::atomic< WorldStateConditionState > > | _transportStates |
std::mutex | _mutex |
WorldState::WorldState | ( | ) |
References _transportStates, WORLD_STATE_CONDITION_STATE_NONE, WORLD_STATE_CONDITION_THE_IRON_EAGLE, WORLD_STATE_CONDITION_THE_PURPLE_PRINCESS, and WORLD_STATE_CONDITION_THE_THUNDERCALLER.
|
virtual |
|
private |
References Unit::CastSpell(), Map::DoForAllPlayers(), Map::GetId(), sMapMgr, and SPELL_ADAL_SONG_OF_BATTLE.
Referenced by HandleExternalEvent().
|
private |
References Unit::CastSpell(), Map::DoForAllPlayers(), Map::GetId(), Player::GetTeamId(), sMapMgr, SPELL_NAZGRELS_FAVOR, SPELL_TROLLBANES_COMMAND, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by HandleExternalEvent().
|
private |
References Map::DoForAllPlayers(), Map::GetId(), Unit::RemoveAurasDueToSpell(), sMapMgr, and SPELL_ADAL_SONG_OF_BATTLE.
Referenced by Update().
|
private |
References Map::DoForAllPlayers(), Map::GetId(), Player::GetTeamId(), Unit::RemoveAurasDueToSpell(), sMapMgr, SPELL_NAZGRELS_FAVOR, SPELL_TROLLBANES_COMMAND, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by HandleExternalEvent().
void WorldState::HandleConditionStateChange | ( | WorldStateCondition | conditionId, |
WorldStateConditionState | state | ||
) |
References _transportStates.
void WorldState::HandleExternalEvent | ( | WorldStateEvent | eventId, |
uint32 | param | ||
) |
References _adalSongOfBattleTimer, _isMagtheridonHeadSpawnedAlliance, _isMagtheridonHeadSpawnedHorde, _mutex, BuffAdalsSongOfBattle(), BuffMagtheridonTeam(), DispelMagtheridonTeam(), IN_MILLISECONDS, MINUTE, TEAM_ALLIANCE, TEAM_HORDE, WORLD_STATE_CUSTOM_EVENT_ON_ADALS_SONG_OF_BATTLE, WORLD_STATE_CUSTOM_EVENT_ON_MAGTHERIDON_HEAD_DESPAWN, and WORLD_STATE_CUSTOM_EVENT_ON_MAGTHERIDON_HEAD_SPAWN.
void WorldState::HandlePlayerEnterZone | ( | Player * | player, |
WorldStateZoneId | zoneId | ||
) |
References _adalSongOfBattleTimer, _isMagtheridonHeadSpawnedAlliance, _isMagtheridonHeadSpawnedHorde, _mutex, Unit::CastSpell(), Player::GetTeamId(), SPELL_ADAL_SONG_OF_BATTLE, SPELL_NAZGRELS_FAVOR, SPELL_TROLLBANES_COMMAND, TEAM_ALLIANCE, TEAM_HORDE, ZONEID_ARCATRAZ, ZONEID_BLOOD_FURNACE, ZONEID_BOTANICA, ZONEID_HELLFIRE_CITADEL, ZONEID_HELLFIRE_PENINSULA, ZONEID_HELLFIRE_RAMPARTS, ZONEID_MAGTHERIDON_LAIR, ZONEID_MECHANAR, ZONEID_SHATTERED_HALLS, and ZONEID_SHATTRATH.
void WorldState::HandlePlayerLeaveZone | ( | Player * | player, |
WorldStateZoneId | zoneId | ||
) |
References _adalSongOfBattleTimer, _mutex, Player::GetTeamId(), Unit::RemoveAurasDueToSpell(), SPELL_ADAL_SONG_OF_BATTLE, SPELL_NAZGRELS_FAVOR, SPELL_TROLLBANES_COMMAND, TEAM_ALLIANCE, TEAM_HORDE, ZONEID_ARCATRAZ, ZONEID_BLOOD_FURNACE, ZONEID_BOTANICA, ZONEID_HELLFIRE_CITADEL, ZONEID_HELLFIRE_PENINSULA, ZONEID_HELLFIRE_RAMPARTS, ZONEID_MAGTHERIDON_LAIR, ZONEID_MECHANAR, ZONEID_SHATTERED_HALLS, and ZONEID_SHATTRATH.
|
static |
bool WorldState::IsConditionFulfilled | ( | WorldStateCondition | conditionId, |
WorldStateConditionState | state = WORLD_STATE_CONDITION_STATE_NONE |
||
) | const |
References _isMagtheridonHeadSpawnedAlliance, _isMagtheridonHeadSpawnedHorde, _transportStates, LOG_ERROR, WORLD_STATE_CONDITION_NAZGRELS_FAVOR, WORLD_STATE_CONDITION_THE_IRON_EAGLE, WORLD_STATE_CONDITION_THE_PURPLE_PRINCESS, WORLD_STATE_CONDITION_THE_THUNDERCALLER, and WORLD_STATE_CONDITION_TROLLBANES_COMMAND.
void WorldState::Update | ( | uint32 | diff | ) |
References _adalSongOfBattleTimer, and DispelAdalsSongOfBattle().
|
private |
Referenced by HandleExternalEvent(), HandlePlayerEnterZone(), HandlePlayerLeaveZone(), and Update().
|
private |
Referenced by HandleExternalEvent(), HandlePlayerEnterZone(), and IsConditionFulfilled().
|
private |
Referenced by HandleExternalEvent(), HandlePlayerEnterZone(), and IsConditionFulfilled().
|
private |
Referenced by HandleExternalEvent(), HandlePlayerEnterZone(), and HandlePlayerLeaveZone().
|
private |
Referenced by HandleConditionStateChange(), IsConditionFulfilled(), and WorldState().