TrinityCore
GarrisonMgr Class Reference

#include <GarrisonMgr.h>

Public Member Functions

void Initialize ()
 
GarrSiteLevelEntry const * GetGarrSiteLevelEntry (uint32 garrSiteId, uint32 level) const
 
std::vector< GarrSiteLevelPlotInstEntry const * > const * GetGarrPlotInstForSiteLevel (uint32 garrSiteLevelId) const
 
GameObjectsEntry const * GetPlotGameObject (uint32 mapId, uint32 garrPlotInstanceId) const
 
bool IsPlotMatchingBuilding (uint32 garrPlotId, uint32 garrBuildingId) const
 
uint32 GetGarrBuildingPlotInst (uint32 garrBuildingId, uint32 garrSiteLevelPlotInstId) const
 
uint32 GetPreviousLevelBuildingId (uint32 buildingType, uint32 currentLevel) const
 
FinalizeGarrisonPlotGOInfo const * GetPlotFinalizeGOInfo (uint32 garrPlotInstanceID) const
 
uint64 GenerateFollowerDbId ()
 
std::list< GarrAbilityEntry const * > RollFollowerAbilities (uint32 garrFollowerId, GarrFollowerEntry const *follower, uint32 quality, uint32 faction, bool initial) const
 
std::list< GarrAbilityEntry const * > GetClassSpecAbilities (GarrFollowerEntry const *follower, uint32 faction) const
 

Static Public Member Functions

static GarrisonMgrInstance ()
 

Private Member Functions

void InitializeDbIdSequences ()
 
void LoadPlotFinalizeGOInfo ()
 
void LoadFollowerClassSpecAbilities ()
 

Private Attributes

std::unordered_map< uint32, std::vector< GarrSiteLevelPlotInstEntry const * > > _garrisonPlotInstBySiteLevel
 
std::unordered_map< uint32, std::unordered_map< uint32, GameObjectsEntry const * > > _garrisonPlots
 
std::unordered_map< uint32, std::unordered_set< uint32 > > _garrisonBuildingsByPlot
 
std::unordered_map< std::pair< uint32, uint32 >, uint32_garrisonBuildingPlotInstances
 
std::unordered_map< uint32, std::vector< uint32 > > _garrisonBuildingsByType
 
std::unordered_map< uint32, FinalizeGarrisonPlotGOInfo_finalizePlotGOInfo
 
std::unordered_map< uint32, GarrAbilities_garrisonFollowerAbilities [2]
 
std::unordered_map< uint32, std::list< GarrAbilityEntry const * > > _garrisonFollowerClassSpecAbilities
 
std::set< GarrAbilityEntry const * > _garrisonFollowerRandomTraits
 
uint64 _followerDbIdGenerator = UI64LIT(1)
 

Detailed Description

Definition at line 52 of file GarrisonMgr.h.

Member Function Documentation

◆ GenerateFollowerDbId()

uint64 GarrisonMgr::GenerateFollowerDbId ( )

Definition at line 147 of file GarrisonMgr.cpp.

+ Here is the call graph for this function:

◆ GetClassSpecAbilities()

std::list< GarrAbilityEntry const * > GarrisonMgr::GetClassSpecAbilities ( GarrFollowerEntry const *  follower,
uint32  faction 
) const

Definition at line 306 of file GarrisonMgr.cpp.

+ Here is the caller graph for this function:

◆ GetGarrBuildingPlotInst()

uint32 GarrisonMgr::GetGarrBuildingPlotInst ( uint32  garrBuildingId,
uint32  garrSiteLevelPlotInstId 
) const

Definition at line 118 of file GarrisonMgr.cpp.

◆ GetGarrPlotInstForSiteLevel()

std::vector< GarrSiteLevelPlotInstEntry const * > const * GarrisonMgr::GetGarrPlotInstForSiteLevel ( uint32  garrSiteLevelId) const

Definition at line 87 of file GarrisonMgr.cpp.

◆ GetGarrSiteLevelEntry()

GarrSiteLevelEntry const * GarrisonMgr::GetGarrSiteLevelEntry ( uint32  garrSiteId,
uint32  level 
) const

Definition at line 78 of file GarrisonMgr.cpp.

◆ GetPlotFinalizeGOInfo()

FinalizeGarrisonPlotGOInfo const * GarrisonMgr::GetPlotFinalizeGOInfo ( uint32  garrPlotInstanceID) const

Definition at line 138 of file GarrisonMgr.cpp.

◆ GetPlotGameObject()

GameObjectsEntry const * GarrisonMgr::GetPlotGameObject ( uint32  mapId,
uint32  garrPlotInstanceId 
) const

Definition at line 96 of file GarrisonMgr.cpp.

◆ GetPreviousLevelBuildingId()

uint32 GarrisonMgr::GetPreviousLevelBuildingId ( uint32  buildingType,
uint32  currentLevel 
) const

Definition at line 127 of file GarrisonMgr.cpp.

◆ Initialize()

void GarrisonMgr::Initialize ( )

Definition at line 35 of file GarrisonMgr.cpp.

+ Here is the call graph for this function:

◆ InitializeDbIdSequences()

void GarrisonMgr::InitializeDbIdSequences ( )
private

Definition at line 332 of file GarrisonMgr.cpp.

+ Here is the caller graph for this function:

◆ Instance()

GarrisonMgr & GarrisonMgr::Instance ( )
static

Definition at line 29 of file GarrisonMgr.cpp.

◆ IsPlotMatchingBuilding()

bool GarrisonMgr::IsPlotMatchingBuilding ( uint32  garrPlotId,
uint32  garrBuildingId 
) const

Definition at line 109 of file GarrisonMgr.cpp.

◆ LoadFollowerClassSpecAbilities()

void GarrisonMgr::LoadFollowerClassSpecAbilities ( )
private

Definition at line 424 of file GarrisonMgr.cpp.

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

◆ LoadPlotFinalizeGOInfo()

void GarrisonMgr::LoadPlotFinalizeGOInfo ( )
private

Definition at line 338 of file GarrisonMgr.cpp.

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

◆ RollFollowerAbilities()

std::list< GarrAbilityEntry const * > GarrisonMgr::RollFollowerAbilities ( uint32  garrFollowerId,
GarrFollowerEntry const *  follower,
uint32  quality,
uint32  faction,
bool  initial 
) const

Definition at line 169 of file GarrisonMgr.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ _finalizePlotGOInfo

std::unordered_map<uint32 , FinalizeGarrisonPlotGOInfo> GarrisonMgr::_finalizePlotGOInfo
private

Definition at line 80 of file GarrisonMgr.h.

◆ _followerDbIdGenerator

uint64 GarrisonMgr::_followerDbIdGenerator = UI64LIT(1)
private

Definition at line 85 of file GarrisonMgr.h.

◆ _garrisonBuildingPlotInstances

std::unordered_map<std::pair<uint32 , uint32 >, uint32 > GarrisonMgr::_garrisonBuildingPlotInstances
private

Definition at line 78 of file GarrisonMgr.h.

◆ _garrisonBuildingsByPlot

std::unordered_map<uint32 , std::unordered_set<uint32> > GarrisonMgr::_garrisonBuildingsByPlot
private

Definition at line 77 of file GarrisonMgr.h.

◆ _garrisonBuildingsByType

std::unordered_map<uint32 , std::vector<uint32> > GarrisonMgr::_garrisonBuildingsByType
private

Definition at line 79 of file GarrisonMgr.h.

◆ _garrisonFollowerAbilities

std::unordered_map<uint32 , GarrAbilities> GarrisonMgr::_garrisonFollowerAbilities[2]
private

Definition at line 81 of file GarrisonMgr.h.

◆ _garrisonFollowerClassSpecAbilities

std::unordered_map<uint32 , std::list<GarrAbilityEntry const*> > GarrisonMgr::_garrisonFollowerClassSpecAbilities
private

Definition at line 82 of file GarrisonMgr.h.

◆ _garrisonFollowerRandomTraits

std::set<GarrAbilityEntry const*> GarrisonMgr::_garrisonFollowerRandomTraits
private

Definition at line 83 of file GarrisonMgr.h.

◆ _garrisonPlotInstBySiteLevel

std::unordered_map<uint32 , std::vector<GarrSiteLevelPlotInstEntry const*> > GarrisonMgr::_garrisonPlotInstBySiteLevel
private

Definition at line 75 of file GarrisonMgr.h.

◆ _garrisonPlots

std::unordered_map<uint32 , std::unordered_map<uint32 , GameObjectsEntry const*> > GarrisonMgr::_garrisonPlots
private

Definition at line 76 of file GarrisonMgr.h.


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