![]() |
TrinityCore
|
#include <GarrisonMgr.h>
Static Public Member Functions | |
| static GarrisonMgr & | Instance () |
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) |
Definition at line 52 of file GarrisonMgr.h.
|
default |
|
delete |
|
delete |
|
default |
| uint64 GarrisonMgr::GenerateFollowerDbId | ( | ) |
Definition at line 150 of file GarrisonMgr.cpp.
References _followerDbIdGenerator, ERROR_EXIT_CODE, World::StopNow(), and TC_LOG_ERROR.
| std::list< GarrAbilityEntry const * > GarrisonMgr::GetClassSpecAbilities | ( | GarrFollowerEntry const * | follower, |
| uint32 | faction | ||
| ) | const |
Definition at line 309 of file GarrisonMgr.cpp.
References _garrisonFollowerClassSpecAbilities, GarrFollowerEntry::AllianceGarrClassSpecID, GARRISON_FACTION_INDEX_ALLIANCE, GARRISON_FACTION_INDEX_HORDE, GarrFollowerEntry::HordeGarrClassSpecID, and sGarrClassSpecStore.
Referenced by RollFollowerAbilities().
| uint32 GarrisonMgr::GetGarrBuildingPlotInst | ( | uint32 | garrBuildingId, |
| uint32 | garrSiteLevelPlotInstId | ||
| ) | const |
Definition at line 121 of file GarrisonMgr.cpp.
References _garrisonBuildingPlotInstances.
| std::vector< GarrSiteLevelPlotInstEntry const * > const * GarrisonMgr::GetGarrPlotInstForSiteLevel | ( | uint32 | garrSiteLevelId | ) | const |
Definition at line 90 of file GarrisonMgr.cpp.
References _garrisonPlotInstBySiteLevel.
| GarrSiteLevelEntry const * GarrisonMgr::GetGarrSiteLevelEntry | ( | uint32 | garrSiteId, |
| uint32 | level | ||
| ) | const |
Definition at line 81 of file GarrisonMgr.cpp.
References sGarrSiteLevelStore.
| FinalizeGarrisonPlotGOInfo const * GarrisonMgr::GetPlotFinalizeGOInfo | ( | uint32 | garrPlotInstanceID | ) | const |
Definition at line 141 of file GarrisonMgr.cpp.
References _finalizePlotGOInfo.
| GameObjectsEntry const * GarrisonMgr::GetPlotGameObject | ( | uint32 | mapId, |
| uint32 | garrPlotInstanceId | ||
| ) | const |
Definition at line 99 of file GarrisonMgr.cpp.
References _garrisonPlots.
Definition at line 130 of file GarrisonMgr.cpp.
References _garrisonBuildingsByType, and sGarrBuildingStore.
| void GarrisonMgr::Initialize | ( | ) |
Definition at line 38 of file GarrisonMgr.cpp.
References _garrisonBuildingPlotInstances, _garrisonBuildingsByPlot, _garrisonBuildingsByType, _garrisonFollowerAbilities, _garrisonFollowerRandomTraits, _garrisonPlotInstBySiteLevel, _garrisonPlots, FOLLOWER_TYPE_GARRISON, GAMEOBJECT_TYPE_GARRISON_PLOT, GARRISON_ABILITY_CANNOT_ROLL, GARRISON_ABILITY_FLAG_TRAIT, InitializeDbIdSequences(), LoadFollowerClassSpecAbilities(), LoadPlotFinalizeGOInfo(), sGameObjectsStore, sGarrAbilityStore, sGarrBuildingPlotInstStore, sGarrBuildingStore, sGarrFollowerXAbilityStore, sGarrPlotBuildingStore, and sGarrSiteLevelPlotInstStore.
|
private |
Definition at line 335 of file GarrisonMgr.cpp.
References _followerDbIdGenerator, and CharacterDatabase.
Referenced by Initialize().
|
static |
Definition at line 32 of file GarrisonMgr.cpp.
Definition at line 112 of file GarrisonMgr.cpp.
References _garrisonBuildingsByPlot.
|
private |
Definition at line 427 of file GarrisonMgr.cpp.
References _garrisonFollowerClassSpecAbilities, getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), sGarrAbilityStore, sGarrClassSpecStore, TC_LOG_ERROR, TC_LOG_INFO, and WorldDatabase.
Referenced by Initialize().
|
private |
Definition at line 341 of file GarrisonMgr.cpp.
References _finalizePlotGOInfo, FinalizeGarrisonPlotGOInfo::AnimKitId, FinalizeGarrisonPlotGOInfo::FactionInfo, GAMEOBJECT_TYPE_GOOBER, FinalizeGarrisonPlotGOInfo::GameObjectId, GARRISON_FACTION_INDEX_ALLIANCE, GARRISON_FACTION_INDEX_HORDE, getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt16(), Field::GetUInt32(), FinalizeGarrisonPlotGOInfo::Pos, Position::Relocate(), sAnimKitStore, sGarrPlotInstanceStore, sObjectMgr, TC_LOG_ERROR, TC_LOG_INFO, GameObjectTemplate::type, and WorldDatabase.
Referenced by Initialize().
|
delete |
|
delete |
| std::list< GarrAbilityEntry const * > GarrisonMgr::RollFollowerAbilities | ( | uint32 | garrFollowerId, |
| GarrFollowerEntry const * | follower, | ||
| uint32 | quality, | ||
| uint32 | faction, | ||
| bool | initial | ||
| ) | const |
Definition at line 172 of file GarrisonMgr.cpp.
References _garrisonFollowerAbilities, _garrisonFollowerRandomTraits, AbilitiesForQuality, ASSERT, GarrAbilities::Counters, GarrAbilityEntry::Flags, GARRISON_ABILITY_ALLIANCE_ONLY, GARRISON_ABILITY_FLAG_CANNOT_REMOVE, GARRISON_ABILITY_FLAG_EXCLUSIVE, GARRISON_ABILITY_HORDE_ONLY, GARRISON_FACTION_INDEX_ALLIANCE, GARRISON_FACTION_INDEX_HORDE, GetClassSpecAbilities(), GarrAbilityEntry::ID, Trinity::Containers::RandomResize(), GarrAbilities::Traits, and urand().
|
private |
Definition at line 87 of file GarrisonMgr.h.
Referenced by GetPlotFinalizeGOInfo(), and LoadPlotFinalizeGOInfo().
Definition at line 92 of file GarrisonMgr.h.
Referenced by GenerateFollowerDbId(), and InitializeDbIdSequences().
|
private |
Definition at line 85 of file GarrisonMgr.h.
Referenced by GetGarrBuildingPlotInst(), and Initialize().
|
private |
Definition at line 84 of file GarrisonMgr.h.
Referenced by Initialize(), and IsPlotMatchingBuilding().
Definition at line 86 of file GarrisonMgr.h.
Referenced by GetPreviousLevelBuildingId(), and Initialize().
|
private |
Definition at line 88 of file GarrisonMgr.h.
Referenced by Initialize(), and RollFollowerAbilities().
|
private |
Definition at line 89 of file GarrisonMgr.h.
Referenced by GetClassSpecAbilities(), and LoadFollowerClassSpecAbilities().
|
private |
Definition at line 90 of file GarrisonMgr.h.
Referenced by Initialize(), and RollFollowerAbilities().
|
private |
Definition at line 82 of file GarrisonMgr.h.
Referenced by GetGarrPlotInstForSiteLevel(), and Initialize().
|
private |
Definition at line 83 of file GarrisonMgr.h.
Referenced by GetPlotGameObject(), and Initialize().