![]() |
AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "PetitionMgr.h"
Static Public Member Functions | |
static PetitionMgr * | instance () |
Protected Attributes | |
PetitionContainer | PetitionStore |
SignatureContainer | SignatureStore |
std::unordered_map< uint32, ObjectGuid > | PetitionIdToItemGuid |
uint32 | _nextPetitionId = 1 |
Private Member Functions | |
PetitionMgr () | |
~PetitionMgr () | |
|
private |
|
private |
void PetitionMgr::AddPetition | ( | ObjectGuid | petitionGUID, |
ObjectGuid | ownerGuid, | ||
std::string const & | name, | ||
uint8 | type, | ||
uint32 | petitionId | ||
) |
References Petition::ownerGuid, Petition::petitionGuid, Signatures::petitionGuid, Petition::petitionId, Petition::petitionName, PetitionStore, Petition::petitionType, Signatures::signatureMap, and SignatureStore.
Referenced by LoadPetitions().
void PetitionMgr::AddSignature | ( | ObjectGuid | petitionGUID, |
uint32 | accountId, | ||
ObjectGuid | playerGuid | ||
) |
References Signatures::signatureMap, and SignatureStore.
Referenced by LoadSignatures().
uint32 PetitionMgr::GeneratePetitionId | ( | ) |
References _nextPetitionId, and PetitionIdToItemGuid.
ObjectGuid PetitionMgr::GetItemGuidByPetitionId | ( | uint32 | petitionId | ) | const |
References ObjectGuid::Empty, and PetitionIdToItemGuid.
Petition const * PetitionMgr::GetPetition | ( | ObjectGuid | petitionGUID | ) | const |
References PetitionStore.
Referenced by GetPetitionById(), and GetPetitionIdByItemGuid().
References GetPetition(), and PetitionIdToItemGuid.
Petition const * PetitionMgr::GetPetitionByOwnerWithType | ( | ObjectGuid | ownerGuid, |
uint8 | type | ||
) | const |
References PetitionStore.
uint32 PetitionMgr::GetPetitionIdByItemGuid | ( | ObjectGuid | petitionItemGuid | ) | const |
References GetPetition(), and Petition::petitionId.
|
inline |
References PetitionStore.
Signatures const * PetitionMgr::GetSignature | ( | ObjectGuid | petitionGUID | ) | const |
References SignatureStore.
|
inline |
References SignatureStore.
|
static |
void PetitionMgr::LoadPetitions | ( | ) |
References _nextPetitionId, AddPetition(), CharacterDatabase, Field::Get(), getMSTime(), GetMSTimeDiffToNow(), LOG_INFO, LOG_WARN, PetitionIdToItemGuid, and PetitionStore.
void PetitionMgr::LoadSignatures | ( | ) |
References AddSignature(), CharacterDatabase, Field::Get(), getMSTime(), GetMSTimeDiffToNow(), LOG_INFO, LOG_WARN, PetitionIdToItemGuid, and SignatureStore.
void PetitionMgr::RemovePetition | ( | ObjectGuid | petitionGUID | ) |
References PetitionIdToItemGuid, PetitionStore, and SignatureStore.
void PetitionMgr::RemovePetitionByOwnerAndType | ( | ObjectGuid | ownerGuid, |
uint8 | type | ||
) |
References ObjectAccessor::FindConnectedPlayer(), PetitionStore, and SignatureStore.
void PetitionMgr::RemoveSignaturesByPlayer | ( | ObjectGuid | playerGuid | ) |
References Signatures::signatureMap, and SignatureStore.
void PetitionMgr::RemoveSignaturesByPlayerAndType | ( | ObjectGuid | playerGuid, |
uint8 | type | ||
) |
References Petition::petitionType, SignatureStore, and sPetitionMgr.
|
protected |
Referenced by GeneratePetitionId(), and LoadPetitions().
|
protected |
Referenced by GeneratePetitionId(), GetItemGuidByPetitionId(), GetPetitionById(), LoadPetitions(), LoadSignatures(), and RemovePetition().
|
protected |
|
protected |