#include <InstanceLockMgr.h>
|
void | Load () |
|
void | Unload () |
|
TransferAbortReason | CanJoinInstanceLock (ObjectGuid const &playerGuid, MapDb2Entries const &entries, InstanceLock const *instanceLock) const |
| Checks if player is allowed to enter instance map. More...
|
|
InstanceLock * | FindActiveInstanceLock (ObjectGuid const &playerGuid, MapDb2Entries const &entries) const |
| Attempts to find InstanceLock for given instance owner. This will also find expired but extended locks. More...
|
|
std::vector< InstanceLock const * > | GetInstanceLocksForPlayer (ObjectGuid const &playerGuid) const |
| Retrieves all existing instance locks for a player. More...
|
|
InstanceLock * | CreateInstanceLockForNewInstance (ObjectGuid const &playerGuid, MapDb2Entries const &entries, uint32 instanceId) |
| Creates new InstanceLock when instance map is created. More...
|
|
InstanceLock * | UpdateInstanceLockForPlayer (CharacterDatabaseTransaction trans, ObjectGuid const &playerGuid, MapDb2Entries const &entries, InstanceLockUpdateEvent &&updateEvent) |
| Updates existing instance lock for player with new completed encounter and instance state. More...
|
|
void | UpdateSharedInstanceLock (CharacterDatabaseTransaction trans, InstanceLockUpdateEvent &&updateEvent) |
| Updates existing instance id based lock shared state with new completed encounter and instance state. More...
|
|
void | OnSharedInstanceLockDataDelete (uint32 instanceId) |
| Handles last reference to shared instance state being removed to clean up leftover database data. More...
|
|
std::pair< InstanceResetTimePoint, InstanceResetTimePoint > | UpdateInstanceLockExtensionForPlayer (ObjectGuid const &playerGuid, MapDb2Entries const &entries, bool extended) |
| Updates existing instance lock for player with requested extension state. More...
|
|
void | ResetInstanceLocksForPlayer (ObjectGuid const &playerGuid, Optional< uint32 > mapId, Optional< Difficulty > difficulty, std::vector< InstanceLock const * > *locksReset, std::vector< InstanceLock const * > *locksFailedToReset) |
| Resets instances that match given filter - for use in GM commands. More...
|
|
InstanceLocksStatistics | GetStatistics () const |
| Retrieves instance lock statistics - for use in GM commands. More...
|
|
Definition at line 204 of file InstanceLockMgr.h.
◆ LockMap
◆ PlayerLockMap
◆ InstanceLockMgr() [1/3]
InstanceLockMgr::InstanceLockMgr |
( |
| ) |
|
|
privatedefault |
◆ InstanceLockMgr() [2/3]
◆ InstanceLockMgr() [3/3]
◆ ~InstanceLockMgr()
InstanceLockMgr::~InstanceLockMgr |
( |
| ) |
|
|
privatedefault |
◆ CanJoinInstanceLock()
Checks if player is allowed to enter instance map.
- Parameters
-
playerGuid | Guid of player who is trying to enter instance map |
entries | Map.db2 + MapDifficulty.db2 data for instance |
instanceLock | InstanceLock used during map creation |
- Returns
- Failure reason to show in client or TRANSFER_ABORT_NONE when player is allowed to enter
Definition at line 176 of file InstanceLockMgr.cpp.
◆ CreateInstanceLockForNewInstance()
Creates new InstanceLock when instance map is created.
- Parameters
-
playerGuid | Guid of player owning instance. Player's own guid if not in group, otherwise group leader's |
entries | Map.db2 + MapDifficulty.db2 data for instance |
instanceId | Persistent instance id |
- Returns
- New InstanceLock with clear state and _instanceId not set
Definition at line 250 of file InstanceLockMgr.cpp.
◆ FindActiveInstanceLock() [1/2]
Attempts to find InstanceLock for given instance owner. This will also find expired but extended locks.
- Parameters
-
playerGuid | Guid of player owning instance. Player's own guid if not in group, otherwise group leader's |
entries | Map.db2 + MapDifficulty.db2 data for instance |
- Returns
- InstanceLock previously loaded from database
Definition at line 210 of file InstanceLockMgr.cpp.
◆ FindActiveInstanceLock() [2/2]
◆ FindInstanceLock()
◆ GetInstanceLocksForPlayer()
std::vector< InstanceLock const * > InstanceLockMgr::GetInstanceLocksForPlayer |
( |
ObjectGuid const & |
playerGuid | ) |
const |
Retrieves all existing instance locks for a player.
- Parameters
-
playerGuid | Guid of player whose locks are requested |
- Returns
- All locks (current and expired) for player
Definition at line 235 of file InstanceLockMgr.cpp.
◆ GetNextResetTime()
◆ GetStatistics()
Retrieves instance lock statistics - for use in GM commands.
- Returns
- Statistics info
Definition at line 526 of file InstanceLockMgr.cpp.
◆ Instance()
◆ Load()
void InstanceLockMgr::Load |
( |
| ) |
|
◆ OnSharedInstanceLockDataDelete()
void InstanceLockMgr::OnSharedInstanceLockDataDelete |
( |
uint32 |
instanceId | ) |
|
Handles last reference to shared instance state being removed to clean up leftover database data.
- Parameters
-
instanceId | Id of the instance being deleted |
Definition at line 431 of file InstanceLockMgr.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ResetInstanceLocksForPlayer()
Resets instances that match given filter - for use in GM commands.
- Parameters
-
playerGuid | Guid of player whose locks will be removed |
mapId | (Optional) Map id of instance locks to reset |
difficulty | (Optional) Difficulty of instance locks to reset |
locksReset | All locks that were reset |
locksFailedToReset | Locks that could not be reset because they are used by existing instance map |
Definition at line 477 of file InstanceLockMgr.cpp.
◆ Unload()
void InstanceLockMgr::Unload |
( |
| ) |
|
◆ UpdateInstanceLockExtensionForPlayer()
Updates existing instance lock for player with requested extension state.
- Parameters
-
playerGuid | Guid of player whose lock is extended |
entries | Map.db2 + MapDifficulty.db2 data for instance |
extended | New instance lock extension state |
- Returns
- pair<OldExpirationTime, NewExpirationTime>
Definition at line 451 of file InstanceLockMgr.cpp.
◆ UpdateInstanceLockForPlayer()
Updates existing instance lock for player with new completed encounter and instance state.
- Parameters
-
trans | Database transaction |
playerGuid | Guid of player who will become locked to instance |
entries | Map.db2 + MapDifficulty.db2 data for instance |
updateEvent | New instance lock data |
- Returns
- Updated InstanceLock for player
Definition at line 277 of file InstanceLockMgr.cpp.
◆ UpdateSharedInstanceLock()
Updates existing instance id based lock shared state with new completed encounter and instance state.
- Parameters
-
trans | Database transaction |
updateEvent | New instance lock data |
Definition at line 400 of file InstanceLockMgr.cpp.
◆ _instanceLockDataById
◆ _instanceLocksByPlayer
LockMap InstanceLockMgr::_instanceLocksByPlayer |
|
private |
◆ _locksMutex
std::shared_mutex InstanceLockMgr::_locksMutex |
|
mutableprivate |
◆ _temporaryInstanceLocksByPlayer
LockMap InstanceLockMgr::_temporaryInstanceLocksByPlayer |
|
private |
◆ _unloading
bool InstanceLockMgr::_unloading = false |
|
private |
The documentation for this class was generated from the following files: