|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <InstanceSaveMgr.h>
Public Types | |
| typedef std::list< Group * > | GroupListType |
| typedef std::list< Player * > | PlayerListType |
Public Member Functions | |
| void | AddGroup (Group *group) |
| void | AddPlayer (Player *player) |
| bool | CanReset () const |
| void | DeleteFromDB () |
| DifficultyID | GetDifficulty () const |
| uint8 | GetGroupCount () const |
| uint32 | GetInstanceId () const |
| MapEntry const * | GetMapEntry () |
| uint32 | GetMapId () const |
| uint8 | GetPlayerCount () const |
| time_t | GetResetTime () const |
| time_t | GetResetTimeForDB () |
| InstanceTemplate const * | GetTemplate () |
| InstanceSave (uint16 MapId, uint32 InstanceId, DifficultyID difficulty, time_t resetTime, bool canReset) | |
| bool | RemoveGroup (Group *group) |
| bool | RemovePlayer (Player *player) |
| void | SaveToDB () |
| void | SetCanReset (bool canReset) |
| void | SetResetTime (time_t resetTime) |
| void | SetToDelete (bool toDelete) |
| ~InstanceSave () | |
Private Member Functions | |
| bool | UnloadIfEmpty () |
Private Attributes | |
| std::mutex | _lock |
| bool | m_canReset |
| DifficultyID | m_difficulty |
| GroupListType | m_groupList |
| uint32 | m_instanceid |
| uint32 | m_mapid |
| PlayerListType | m_playerList |
| time_t | m_resetTime |
| bool | m_toDelete |
Friends | |
| class | InstanceSaveManager |
Definition at line 31 of file InstanceSaveMgr.h.
| typedef std::list<Group*> InstanceSave::GroupListType |
Definition at line 112 of file InstanceSaveMgr.h.
| typedef std::list<Player*> InstanceSave::PlayerListType |
Definition at line 111 of file InstanceSaveMgr.h.
| InstanceSave::InstanceSave | ( | uint16 | MapId, |
| uint32 | InstanceId, | ||
| DifficultyID | difficulty, | ||
| time_t | resetTime, | ||
| bool | canReset ) |
Definition at line 151 of file InstanceSaveMgr.cpp.
References m_canReset, m_difficulty, m_instanceid, m_mapid, m_resetTime, and m_toDelete.
| InstanceSave::~InstanceSave | ( | ) |
Definition at line 155 of file InstanceSaveMgr.cpp.
References ASSERT, m_groupList, and m_playerList.
|
inline |
Definition at line 85 of file InstanceSaveMgr.h.
References m_groupList.
Referenced by Group::BindToInstance().
|
inline |
Definition at line 70 of file InstanceSaveMgr.h.
References _lock, and m_playerList.
Referenced by Player::BindToInstance().
|
inline |
Definition at line 98 of file InstanceSaveMgr.h.
References m_canReset.
Referenced by InstanceMap::AddPlayerToMap(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), Group::ResetInstances(), and Player::ResetInstances().
| void InstanceSave::DeleteFromDB | ( | ) |
Definition at line 212 of file InstanceSaveMgr.cpp.
References InstanceSaveManager::DeleteInstanceFromDB(), and GetInstanceId().
Referenced by Group::ResetInstances(), and Player::ResetInstances().
|
inline |
Definition at line 103 of file InstanceSaveMgr.h.
References m_difficulty.
Referenced by InstanceMap::AddPlayerToMap(), Group::BindToInstance(), Player::BindToInstance(), MapInstanced::CreateInstanceForPlayer(), GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), InstanceMap::PermBindAllPlayers(), SaveToDB(), WorldSession::SendCalendarRaidLockout(), WorldSession::SendCalendarRaidLockoutUpdated(), Player::SendRaidInfo(), and InstanceSaveManager::~InstanceSaveManager().
|
inline |
Definition at line 46 of file InstanceSaveMgr.h.
References m_groupList.
Referenced by InstanceMap::AddPlayerToMap().
|
inline |
Definition at line 51 of file InstanceSaveMgr.h.
References m_instanceid.
Referenced by Group::AddMember(), InstanceMap::AddPlayerToMap(), Group::BindToInstance(), Player::BindToInstance(), MapManager::CanPlayerEnter(), MapInstanced::CreateInstanceForPlayer(), DeleteFromDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), Group::ResetInstances(), Player::ResetInstances(), WorldSession::SendCalendarRaidLockout(), Player::SendRaidInfo(), and UnloadIfEmpty().
| MapEntry const * InstanceSave::GetMapEntry | ( | ) |
Definition at line 207 of file InstanceSaveMgr.cpp.
|
inline |
Definition at line 52 of file InstanceSaveMgr.h.
References m_mapid.
Referenced by InstanceMap::AddPlayerToMap(), Group::BindToInstance(), Player::BindToInstance(), GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), InstanceMap::PermBindAllPlayers(), Group::ResetInstances(), Player::ResetInstances(), SaveToDB(), WorldSession::SendCalendarRaidLockout(), WorldSession::SendCalendarRaidLockoutUpdated(), Player::SendRaidInfo(), and InstanceSaveManager::~InstanceSaveManager().
|
inline |
Definition at line 45 of file InstanceSaveMgr.h.
References m_playerList.
Referenced by InstanceMap::AddPlayerToMap().
|
inline |
Definition at line 61 of file InstanceSaveMgr.h.
References m_resetTime.
Referenced by GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), WorldSession::SendCalendarRaidLockout(), WorldSession::SendCalendarRaidLockoutUpdated(), and Player::SendRaidInfo().
| time_t InstanceSave::GetResetTimeForDB | ( | ) |
Definition at line 191 of file InstanceSaveMgr.cpp.
References DIFFICULTY_HEROIC, GetDifficulty(), GetMapId(), GetResetTime(), MAP_RAID, MapEntry::map_type, and sMapStore.
Referenced by SaveToDB().
| InstanceTemplate const * InstanceSave::GetTemplate | ( | ) |
Definition at line 202 of file InstanceSaveMgr.cpp.
References m_mapid, and sObjectMgr.
|
inline |
Definition at line 86 of file InstanceSaveMgr.h.
References m_groupList, m_toDelete, and UnloadIfEmpty().
Referenced by Group::BindToInstance(), and Group::ResetInstances().
|
inline |
Definition at line 71 of file InstanceSaveMgr.h.
References _lock, m_playerList, m_toDelete, and UnloadIfEmpty().
Referenced by Player::BindToInstance(), and Player::ResetInstances().
| void InstanceSave::SaveToDB | ( | ) |
Definition at line 164 of file InstanceSaveMgr.cpp.
References ASSERT, CHAR_INS_INSTANCE_SAVE, CharacterDatabase, GetDifficulty(), GetMapId(), GetResetTimeForDB(), Map::IsInstance(), m_instanceid, PreparedStatement::setString(), PreparedStatement::setUInt16(), PreparedStatement::setUInt32(), PreparedStatement::setUInt8(), and sMapMgr.
Referenced by InstanceSaveManager::AddInstanceSave().
|
inline |
Definition at line 99 of file InstanceSaveMgr.h.
References m_canReset.
Referenced by Player::BindToInstance().
|
inline |
Definition at line 62 of file InstanceSaveMgr.h.
References m_resetTime.
|
inline |
Definition at line 106 of file InstanceSaveMgr.h.
References m_toDelete.
|
private |
Definition at line 218 of file InstanceSaveMgr.cpp.
References GetInstanceId(), m_groupList, m_playerList, and sInstanceSaveMgr.
Referenced by RemoveGroup(), and RemovePlayer().
|
friend |
Definition at line 33 of file InstanceSaveMgr.h.
References InstanceSaveManager.
Referenced by InstanceSaveManager.
|
private |
Definition at line 127 of file InstanceSaveMgr.h.
Referenced by AddPlayer(), and RemovePlayer().
|
private |
Definition at line 124 of file InstanceSaveMgr.h.
Referenced by CanReset(), InstanceSave(), and SetCanReset().
|
private |
Definition at line 123 of file InstanceSaveMgr.h.
Referenced by GetDifficulty(), and InstanceSave().
|
private |
Definition at line 119 of file InstanceSaveMgr.h.
Referenced by AddGroup(), GetGroupCount(), RemoveGroup(), UnloadIfEmpty(), ~InstanceSave(), and InstanceSaveManager::~InstanceSaveManager().
|
private |
Definition at line 121 of file InstanceSaveMgr.h.
Referenced by GetInstanceId(), InstanceSave(), and SaveToDB().
|
private |
Definition at line 122 of file InstanceSaveMgr.h.
Referenced by GetMapEntry(), GetMapId(), GetTemplate(), and InstanceSave().
|
private |
Definition at line 118 of file InstanceSaveMgr.h.
Referenced by AddPlayer(), GetPlayerCount(), RemovePlayer(), UnloadIfEmpty(), ~InstanceSave(), and InstanceSaveManager::~InstanceSaveManager().
|
private |
Definition at line 120 of file InstanceSaveMgr.h.
Referenced by GetResetTime(), InstanceSave(), and SetResetTime().
|
private |
Definition at line 125 of file InstanceSaveMgr.h.
Referenced by InstanceSave(), RemoveGroup(), RemovePlayer(), and SetToDelete().