![]() |
TrinityCore
|
#include <InstanceSaveMgr.h>
Public Types | |
| typedef std::list< Player * > | PlayerListType |
| typedef std::list< Group * > | GroupListType |
Public Member Functions | |
| InstanceSave (uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset) | |
| ~InstanceSave () | |
| uint8 | GetPlayerCount () const |
| uint8 | GetGroupCount () const |
| uint32 | GetInstanceId () const |
| uint32 | GetMapId () const |
| void | SaveToDB () |
| void | DeleteFromDB () |
| time_t | GetResetTime () const |
| void | SetResetTime (time_t resetTime) |
| time_t | GetResetTimeForDB () |
| InstanceTemplate const * | GetTemplate () |
| MapEntry const * | GetMapEntry () |
| void | AddPlayer (Player *player) |
| bool | RemovePlayer (Player *player) |
| void | AddGroup (Group *group) |
| bool | RemoveGroup (Group *group) |
| bool | CanReset () const |
| void | SetCanReset (bool canReset) |
| Difficulty | GetDifficultyID () const |
Private Member Functions | |
| bool | UnloadIfEmpty () |
| void | SetToDelete (bool toDelete) |
Private Attributes | |
| PlayerListType | m_playerList |
| GroupListType | m_groupList |
| time_t | m_resetTime |
| uint32 | m_instanceid |
| uint32 | m_mapid |
| Difficulty | m_difficulty |
| bool | m_canReset |
| bool | m_toDelete |
| std::mutex | _playerListLock |
Friends | |
| class | InstanceSaveManager |
Definition at line 43 of file InstanceSaveMgr.h.
| typedef std::list<Group*> InstanceSave::GroupListType |
Definition at line 123 of file InstanceSaveMgr.h.
| typedef std::list<Player*> InstanceSave::PlayerListType |
Definition at line 122 of file InstanceSaveMgr.h.
| InstanceSave::InstanceSave | ( | uint16 | MapId, |
| uint32 | InstanceId, | ||
| Difficulty | difficulty, | ||
| time_t | resetTime, | ||
| bool | canReset | ||
| ) |
Definition at line 181 of file InstanceSaveMgr.cpp.
| InstanceSave::~InstanceSave | ( | ) |
Definition at line 185 of file InstanceSaveMgr.cpp.
References ASSERT, m_groupList, and m_playerList.
|
inline |
Definition at line 102 of file InstanceSaveMgr.h.
Referenced by Group::BindToInstance().
|
inline |
Definition at line 82 of file InstanceSaveMgr.h.
Referenced by Player::BindToInstance().
|
inline |
Definition at line 115 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), Player::ResetInstances(), and Group::ResetInstances().
| void InstanceSave::DeleteFromDB | ( | ) |
Definition at line 242 of file InstanceSaveMgr.cpp.
References InstanceSaveManager::DeleteInstanceFromDB(), and GetInstanceId().
Referenced by Player::ResetInstances(), and Group::ResetInstances().
|
inline |
Definition at line 120 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap(), Player::BindToInstance(), Group::BindToInstance(), MapInstanced::CreateInstanceForPlayer(), GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), InstanceMap::PermBindAllPlayers(), SaveToDB(), WorldSession::SendCalendarRaidLockoutAdded(), WorldSession::SendCalendarRaidLockoutRemoved(), WorldSession::SendCalendarRaidLockoutUpdated(), Player::SendRaidInfo(), and InstanceSaveManager::Unload().
|
inline |
Definition at line 58 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap().
|
inline |
Definition at line 63 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap(), Player::BindToInstance(), Group::BindToInstance(), Player::CheckInstanceValidity(), MapInstanced::CreateInstanceForPlayer(), DeleteFromDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), InstanceMap::PermBindAllPlayers(), MapManager::PlayerCannotEnter(), InstanceMap::Reset(), Player::ResetInstances(), Group::ResetInstances(), WorldSession::SendCalendarRaidLockoutAdded(), WorldSession::SendCalendarRaidLockoutRemoved(), Player::SendRaidInfo(), and UnloadIfEmpty().
| MapEntry const * InstanceSave::GetMapEntry | ( | ) |
Definition at line 237 of file InstanceSaveMgr.cpp.
|
inline |
Definition at line 64 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap(), Player::BindToInstance(), Group::BindToInstance(), GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), InstanceMap::PermBindAllPlayers(), Player::ResetInstances(), Group::ResetInstances(), SaveToDB(), WorldSession::SendCalendarRaidLockoutAdded(), WorldSession::SendCalendarRaidLockoutRemoved(), WorldSession::SendCalendarRaidLockoutUpdated(), Player::SendRaidInfo(), InstanceSaveManager::Unload(), and UnloadIfEmpty().
|
inline |
Definition at line 57 of file InstanceSaveMgr.h.
Referenced by InstanceMap::AddPlayerToMap().
|
inline |
Definition at line 73 of file InstanceSaveMgr.h.
Referenced by GetResetTimeForDB(), WorldSession::HandleCalendarGetCalendar(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), WorldSession::SendCalendarRaidLockoutAdded(), WorldSession::SendCalendarRaidLockoutRemoved(), WorldSession::SendCalendarRaidLockoutUpdated(), and Player::SendRaidInfo().
| time_t InstanceSave::GetResetTimeForDB | ( | ) |
Definition at line 221 of file InstanceSaveMgr.cpp.
References DUNGEON_DIFFICULTY_HEROIC, GetDifficultyID(), GetMapId(), GetResetTime(), MapEntry::InstanceType, MAP_RAID, and sMapStore.
Referenced by SaveToDB().
| InstanceTemplate const * InstanceSave::GetTemplate | ( | ) |
Definition at line 232 of file InstanceSaveMgr.cpp.
References m_mapid, and sObjectMgr.
|
inline |
Definition at line 103 of file InstanceSaveMgr.h.
Referenced by Group::BindToInstance(), and Group::ResetInstances().
|
inline |
Definition at line 88 of file InstanceSaveMgr.h.
Referenced by Player::BindToInstance(), and Player::ResetInstances().
| void InstanceSave::SaveToDB | ( | ) |
Definition at line 194 of file InstanceSaveMgr.cpp.
References ASSERT, CHAR_INS_INSTANCE_SAVE, CharacterDatabase, GetDifficultyID(), GetMapId(), GetResetTimeForDB(), Map::IsDungeon(), m_instanceid, PreparedStatementBase::setString(), PreparedStatementBase::setUInt16(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), and sMapMgr.
Referenced by InstanceSaveManager::AddInstanceSave().
|
inline |
Definition at line 116 of file InstanceSaveMgr.h.
Referenced by Player::BindToInstance().
|
inline |
Definition at line 74 of file InstanceSaveMgr.h.
|
inlineprivate |
Definition at line 127 of file InstanceSaveMgr.h.
|
private |
Definition at line 248 of file InstanceSaveMgr.cpp.
References GetInstanceId(), GetMapId(), m_groupList, m_playerList, sInstanceSaveMgr, and sMapMgr.
|
friend |
Definition at line 45 of file InstanceSaveMgr.h.
|
private |
Definition at line 144 of file InstanceSaveMgr.h.
|
private |
Definition at line 141 of file InstanceSaveMgr.h.
|
private |
Definition at line 140 of file InstanceSaveMgr.h.
|
private |
Definition at line 136 of file InstanceSaveMgr.h.
Referenced by InstanceSaveManager::Unload(), UnloadIfEmpty(), and ~InstanceSave().
|
private |
Definition at line 138 of file InstanceSaveMgr.h.
Referenced by SaveToDB().
|
private |
Definition at line 139 of file InstanceSaveMgr.h.
Referenced by GetMapEntry(), and GetTemplate().
|
private |
Definition at line 135 of file InstanceSaveMgr.h.
Referenced by InstanceSaveManager::Unload(), UnloadIfEmpty(), and ~InstanceSave().
|
private |
Definition at line 137 of file InstanceSaveMgr.h.
|
private |
Definition at line 142 of file InstanceSaveMgr.h.