TrinityCore
Loading...
Searching...
No Matches
CollectionMgr Class Reference

#include <CollectionMgr.h>

Public Member Functions

 CollectionMgr (WorldSession *owner)
 
 CollectionMgr (CollectionMgr const &)=delete
 
 CollectionMgr (CollectionMgr &&)=delete
 
CollectionMgroperator= (CollectionMgr const &)=delete
 
CollectionMgroperator= (CollectionMgr &&)=delete
 
 ~CollectionMgr ()
 
void LoadCharacterData ()
 
void SaveToDB (LoginDatabaseTransaction trans)
 
void LoadToys ()
 
void LoadAccountToys (PreparedQueryResult result)
 
void SaveAccountToys (LoginDatabaseTransaction trans)
 
void ToySetFavorite (uint32 itemId, bool favorite)
 
void ToyClearFanfare (uint32 itemId)
 
bool AddToy (uint32 itemId, bool isFavourite, bool hasFanfare)
 
bool UpdateAccountToys (uint32 itemId, bool isFavourite, bool hasFanfare)
 
bool HasToy (uint32 itemId) const
 
ToyBoxContainer const & GetAccountToys () const
 
void OnItemAdded (Item *item)
 
void LoadHeirlooms ()
 
void LoadAccountHeirlooms (PreparedQueryResult result)
 
void SaveAccountHeirlooms (LoginDatabaseTransaction trans)
 
void AddHeirloom (uint32 itemId, uint32 flags)
 
bool HasHeirloom (uint32 itemId) const
 
void UpgradeHeirloom (uint32 itemId, int32 castItem)
 
void CheckHeirloomUpgrades (Item *item)
 
bool UpdateAccountHeirlooms (uint32 itemId, uint32 flags)
 
uint32 GetHeirloomBonus (uint32 itemId) const
 
HeirloomContainer const & GetAccountHeirlooms () const
 
void LoadMounts ()
 
void LoadAccountMounts (PreparedQueryResult result)
 
void SaveAccountMounts (LoginDatabaseTransaction trans)
 
bool AddMount (uint32 spellId, MountStatusFlags flags, bool factionMount=false, bool learned=false)
 
void MountSetFavorite (uint32 spellId, bool favorite)
 
void SendSingleMountUpdate (std::pair< uint32, MountStatusFlags > mount)
 
MountContainer const & GetAccountMounts () const
 
void LoadItemAppearances ()
 
void LoadAccountItemAppearances (PreparedQueryResult knownAppearances, PreparedQueryResult favoriteAppearances)
 
void SaveAccountItemAppearances (LoginDatabaseTransaction trans)
 
void AddItemAppearance (Item *item)
 
void AddItemAppearance (uint32 itemId, uint32 appearanceModId=0)
 
void AddTransmogSet (uint32 transmogSetId)
 
bool IsSetCompleted (uint32 transmogSetId) const
 
void RemoveTemporaryAppearance (Item *item)
 
std::pair< bool, bool > HasItemAppearance (uint32 itemModifiedAppearanceId) const
 
std::unordered_set< ObjectGuidGetItemsProvidingTemporaryAppearance (uint32 itemModifiedAppearanceId) const
 
std::unordered_set< uint32GetAppearanceIds () const
 
void SetAppearanceIsFavorite (uint32 itemModifiedAppearanceId, bool apply)
 
void SendFavoriteAppearances () const
 
void LoadTransmogIllusions ()
 
void LoadAccountTransmogIllusions (PreparedQueryResult knownTransmogIllusions)
 
void SaveAccountTransmogIllusions (LoginDatabaseTransaction trans)
 
void AddTransmogIllusion (uint32 transmogIllusionId)
 
bool HasTransmogIllusion (uint32 transmogIllusionId) const
 
void LoadTransmogOutfits ()
 
void LoadAccountTransmogOutfits (PreparedQueryResult unlockedTransmogOutfits)
 
void SaveAccountTransmogOutfits (LoginDatabaseTransaction trans)
 
void AddTransmogOutfit (int32 transmogOutfitId)
 
bool HasTransmogOutfit (int32 transmogOutfitId) const
 
void LoadWarbandScenes ()
 
void LoadAccountWarbandScenes (PreparedQueryResult knownWarbandScenes)
 
void SaveAccountWarbandScenes (LoginDatabaseTransaction trans)
 
void AddWarbandScene (uint32 warbandSceneId)
 
bool HasWarbandScene (uint32 warbandSceneId) const
 
void SetWarbandSceneIsFavorite (uint32 warbandSceneId, bool apply)
 
WarbandSceneCollectionContainer const & GetWarbandScenes () const
 
void SendWarbandSceneCollectionData () const
 

Static Public Member Functions

static void LoadMountDefinitions ()
 
static void LoadWarbandSceneDefinitions ()
 

Private Member Functions

bool CanAddAppearance (ItemModifiedAppearanceEntry const *itemModifiedAppearance) const
 
void AddItemAppearance (ItemModifiedAppearanceEntry const *itemModifiedAppearance)
 
void AddTemporaryAppearance (ObjectGuid const &itemGuid, ItemModifiedAppearanceEntry const *itemModifiedAppearance)
 

Private Attributes

WorldSession_owner
 
ToyBoxContainer _toys
 
HeirloomContainer _heirlooms
 
MountContainer _mounts
 
std::unique_ptr< boost::dynamic_bitset< uint32 > > _appearances
 
std::unordered_map< uint32, std::unordered_set< ObjectGuid > > _temporaryAppearances
 
std::unordered_map< uint32, CollectionItemState_favoriteAppearances
 
std::unique_ptr< boost::dynamic_bitset< uint32 > > _transmogIllusions
 
Trinity::Containers::FlatSet< int32_transmogOutfits
 
WarbandSceneCollectionContainer _warbandScenes
 

Detailed Description

Definition at line 108 of file CollectionMgr.h.

Constructor & Destructor Documentation

◆ CollectionMgr() [1/3]

CollectionMgr::CollectionMgr ( WorldSession owner)
explicit

Definition at line 99 of file CollectionMgr.cpp.

◆ CollectionMgr() [2/3]

CollectionMgr::CollectionMgr ( CollectionMgr const &  )
delete

◆ CollectionMgr() [3/3]

CollectionMgr::CollectionMgr ( CollectionMgr &&  )
delete

◆ ~CollectionMgr()

CollectionMgr::~CollectionMgr ( )
default

Member Function Documentation

◆ AddHeirloom()

void CollectionMgr::AddHeirloom ( uint32  itemId,
uint32  flags 
)

Definition at line 270 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddItemAppearance() [1/3]

void CollectionMgr::AddItemAppearance ( Item item)

Definition at line 611 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddItemAppearance() [2/3]

void CollectionMgr::AddItemAppearance ( ItemModifiedAppearanceEntry const *  itemModifiedAppearance)
private

Definition at line 748 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ AddItemAppearance() [3/3]

void CollectionMgr::AddItemAppearance ( uint32  itemId,
uint32  appearanceModId = 0 
)

Definition at line 629 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ AddMount()

bool CollectionMgr::AddMount ( uint32  spellId,
MountStatusFlags  flags,
bool  factionMount = false,
bool  learned = false 
)

Definition at line 414 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddTemporaryAppearance()

void CollectionMgr::AddTemporaryAppearance ( ObjectGuid const &  itemGuid,
ItemModifiedAppearanceEntry const *  itemModifiedAppearance 
)
private

Definition at line 792 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddToy()

bool CollectionMgr::AddToy ( uint32  itemId,
bool  isFavourite,
bool  hasFanfare 
)

Definition at line 135 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ AddTransmogIllusion()

void CollectionMgr::AddTransmogIllusion ( uint32  transmogIllusionId)

Definition at line 962 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddTransmogOutfit()

void CollectionMgr::AddTransmogOutfit ( int32  transmogOutfitId)

Definition at line 1024 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddTransmogSet()

void CollectionMgr::AddTransmogSet ( uint32  transmogSetId)

Definition at line 638 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddWarbandScene()

void CollectionMgr::AddWarbandScene ( uint32  warbandSceneId)

Definition at line 1116 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanAddAppearance()

bool CollectionMgr::CanAddAppearance ( ItemModifiedAppearanceEntry const *  itemModifiedAppearance) const
private

Definition at line 680 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckHeirloomUpgrades()

void CollectionMgr::CheckHeirloomUpgrades ( Item item)

Definition at line 318 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAccountHeirlooms()

HeirloomContainer const & CollectionMgr::GetAccountHeirlooms ( ) const
inline

Definition at line 150 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ GetAccountMounts()

MountContainer const & CollectionMgr::GetAccountMounts ( ) const
inline

Definition at line 159 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ GetAccountToys()

ToyBoxContainer const & CollectionMgr::GetAccountToys ( ) const
inline

Definition at line 135 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ GetAppearanceIds()

std::unordered_set< uint32 > CollectionMgr::GetAppearanceIds ( ) const

Definition at line 839 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ GetHeirloomBonus()

uint32 CollectionMgr::GetHeirloomBonus ( uint32  itemId) const

Definition at line 255 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ GetItemsProvidingTemporaryAppearance()

std::unordered_set< ObjectGuid > CollectionMgr::GetItemsProvidingTemporaryAppearance ( uint32  itemModifiedAppearanceId) const

Definition at line 830 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ GetWarbandScenes()

WarbandSceneCollectionContainer const & CollectionMgr::GetWarbandScenes ( ) const
inline

Definition at line 199 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ HasHeirloom()

bool CollectionMgr::HasHeirloom ( uint32  itemId) const
inline

Definition at line 144 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ HasItemAppearance()

std::pair< bool, bool > CollectionMgr::HasItemAppearance ( uint32  itemModifiedAppearanceId) const

Definition at line 819 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ HasToy()

bool CollectionMgr::HasToy ( uint32  itemId) const
inline

Definition at line 133 of file CollectionMgr.h.

+ Here is the caller graph for this function:

◆ HasTransmogIllusion()

bool CollectionMgr::HasTransmogIllusion ( uint32  transmogIllusionId) const

Definition at line 981 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ HasTransmogOutfit()

bool CollectionMgr::HasTransmogOutfit ( int32  transmogOutfitId) const

Definition at line 1030 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ HasWarbandScene()

bool CollectionMgr::HasWarbandScene ( uint32  warbandSceneId) const

Definition at line 1129 of file CollectionMgr.cpp.

◆ IsSetCompleted()

bool CollectionMgr::IsSetCompleted ( uint32  transmogSetId) const

Definition at line 650 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadAccountHeirlooms()

void CollectionMgr::LoadAccountHeirlooms ( PreparedQueryResult  result)

Definition at line 207 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountItemAppearances()

void CollectionMgr::LoadAccountItemAppearances ( PreparedQueryResult  knownAppearances,
PreparedQueryResult  favoriteAppearances 
)

Definition at line 512 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountMounts()

void CollectionMgr::LoadAccountMounts ( PreparedQueryResult  result)

Definition at line 384 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountToys()

void CollectionMgr::LoadAccountToys ( PreparedQueryResult  result)

Definition at line 146 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountTransmogIllusions()

void CollectionMgr::LoadAccountTransmogIllusions ( PreparedQueryResult  knownTransmogIllusions)

Definition at line 903 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountTransmogOutfits()

void CollectionMgr::LoadAccountTransmogOutfits ( PreparedQueryResult  unlockedTransmogOutfits)

Definition at line 991 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadAccountWarbandScenes()

void CollectionMgr::LoadAccountWarbandScenes ( PreparedQueryResult  knownWarbandScenes)

Definition at line 1042 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ LoadCharacterData()

void CollectionMgr::LoadCharacterData ( )

Definition at line 107 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadHeirlooms()

void CollectionMgr::LoadHeirlooms ( )

Definition at line 264 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadItemAppearances()

void CollectionMgr::LoadItemAppearances ( )

Definition at line 500 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMountDefinitions()

void CollectionMgr::LoadMountDefinitions ( )
static

Definition at line 40 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMounts()

void CollectionMgr::LoadMounts ( )

Definition at line 378 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadToys()

void CollectionMgr::LoadToys ( )

Definition at line 129 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTransmogIllusions()

void CollectionMgr::LoadTransmogIllusions ( )

Definition at line 894 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadTransmogOutfits()

void CollectionMgr::LoadTransmogOutfits ( )

Definition at line 986 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadWarbandSceneDefinitions()

void CollectionMgr::LoadWarbandSceneDefinitions ( )
static

Definition at line 77 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ LoadWarbandScenes()

void CollectionMgr::LoadWarbandScenes ( )

Definition at line 1035 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MountSetFavorite()

void CollectionMgr::MountSetFavorite ( uint32  spellId,
bool  favorite 
)

Definition at line 445 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ OnItemAdded()

void CollectionMgr::OnItemAdded ( Item item)

Definition at line 199 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

CollectionMgr & CollectionMgr::operator= ( CollectionMgr &&  )
delete

◆ operator=() [2/2]

CollectionMgr & CollectionMgr::operator= ( CollectionMgr const &  )
delete

◆ RemoveTemporaryAppearance()

void CollectionMgr::RemoveTemporaryAppearance ( Item item)

Definition at line 801 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAccountHeirlooms()

void CollectionMgr::SaveAccountHeirlooms ( LoginDatabaseTransaction  trans)

Definition at line 237 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAccountItemAppearances()

void CollectionMgr::SaveAccountItemAppearances ( LoginDatabaseTransaction  trans)

Definition at line 566 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ SaveAccountMounts()

void CollectionMgr::SaveAccountMounts ( LoginDatabaseTransaction  trans)

Definition at line 402 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAccountToys()

void CollectionMgr::SaveAccountToys ( LoginDatabaseTransaction  trans)

Definition at line 159 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAccountTransmogIllusions()

void CollectionMgr::SaveAccountTransmogIllusions ( LoginDatabaseTransaction  trans)

Definition at line 944 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ SaveAccountTransmogOutfits()

void CollectionMgr::SaveAccountTransmogOutfits ( LoginDatabaseTransaction  trans)

Definition at line 1013 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveAccountWarbandScenes()

void CollectionMgr::SaveAccountWarbandScenes ( LoginDatabaseTransaction  trans)

Definition at line 1074 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveToDB()

void CollectionMgr::SaveToDB ( LoginDatabaseTransaction  trans)

Definition at line 118 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendFavoriteAppearances()

void CollectionMgr::SendFavoriteAppearances ( ) const

Definition at line 882 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendSingleMountUpdate()

void CollectionMgr::SendSingleMountUpdate ( std::pair< uint32, MountStatusFlags mount)

Definition at line 459 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendWarbandSceneCollectionData()

void CollectionMgr::SendWarbandSceneCollectionData ( ) const

Definition at line 1149 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

◆ SetAppearanceIsFavorite()

void CollectionMgr::SetAppearanceIsFavorite ( uint32  itemModifiedAppearanceId,
bool  apply 
)

Definition at line 852 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetWarbandSceneIsFavorite()

void CollectionMgr::SetWarbandSceneIsFavorite ( uint32  warbandSceneId,
bool  apply 
)

Definition at line 1134 of file CollectionMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToyClearFanfare()

void CollectionMgr::ToyClearFanfare ( uint32  itemId)

Definition at line 190 of file CollectionMgr.cpp.

◆ ToySetFavorite()

void CollectionMgr::ToySetFavorite ( uint32  itemId,
bool  favorite 
)

Definition at line 178 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ UpdateAccountHeirlooms()

bool CollectionMgr::UpdateAccountHeirlooms ( uint32  itemId,
uint32  flags 
)

Definition at line 250 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ UpdateAccountToys()

bool CollectionMgr::UpdateAccountToys ( uint32  itemId,
bool  isFavourite,
bool  hasFanfare 
)

Definition at line 173 of file CollectionMgr.cpp.

+ Here is the caller graph for this function:

◆ UpgradeHeirloom()

void CollectionMgr::UpgradeHeirloom ( uint32  itemId,
int32  castItem 
)

Definition at line 280 of file CollectionMgr.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _appearances

std::unique_ptr<boost::dynamic_bitset<uint32> > CollectionMgr::_appearances
private

Definition at line 213 of file CollectionMgr.h.

◆ _favoriteAppearances

std::unordered_map<uint32, CollectionItemState> CollectionMgr::_favoriteAppearances
private

Definition at line 215 of file CollectionMgr.h.

◆ _heirlooms

HeirloomContainer CollectionMgr::_heirlooms
private

Definition at line 211 of file CollectionMgr.h.

◆ _mounts

MountContainer CollectionMgr::_mounts
private

Definition at line 212 of file CollectionMgr.h.

◆ _owner

WorldSession* CollectionMgr::_owner
private

Definition at line 208 of file CollectionMgr.h.

◆ _temporaryAppearances

std::unordered_map<uint32, std::unordered_set<ObjectGuid> > CollectionMgr::_temporaryAppearances
private

Definition at line 214 of file CollectionMgr.h.

◆ _toys

ToyBoxContainer CollectionMgr::_toys
private

Definition at line 210 of file CollectionMgr.h.

◆ _transmogIllusions

std::unique_ptr<boost::dynamic_bitset<uint32> > CollectionMgr::_transmogIllusions
private

Definition at line 216 of file CollectionMgr.h.

◆ _transmogOutfits

Trinity::Containers::FlatSet<int32> CollectionMgr::_transmogOutfits
private

Definition at line 217 of file CollectionMgr.h.

◆ _warbandScenes

WarbandSceneCollectionContainer CollectionMgr::_warbandScenes
private

Definition at line 218 of file CollectionMgr.h.


The documentation for this class was generated from the following files: