TrinityCore
|
#include <Garrison.h>
Classes | |
struct | Building |
struct | Follower |
struct | Plot |
Public Member Functions | |
Garrison (Player *owner) | |
bool | LoadFromDB (PreparedQueryResult garrison, PreparedQueryResult blueprints, PreparedQueryResult buildings, PreparedQueryResult followers, PreparedQueryResult abilities) |
void | SaveToDB (CharacterDatabaseTransaction trans) |
bool | Create (uint32 garrSiteId) |
void | Delete () |
void | Upgrade () |
void | Enter () const |
void | Leave () const |
GarrisonFactionIndex | GetFaction () const |
GarrisonType | GetType () const |
GarrSiteLevelEntry const * | GetSiteLevel () const |
std::vector< Plot * > | GetPlots () |
Plot * | GetPlot (uint32 garrPlotInstanceId) |
Plot const * | GetPlot (uint32 garrPlotInstanceId) const |
void | LearnBlueprint (uint32 garrBuildingId) |
void | UnlearnBlueprint (uint32 garrBuildingId) |
bool | HasBlueprint (uint32 garrBuildingId) const |
void | PlaceBuilding (uint32 garrPlotInstanceId, uint32 garrBuildingId) |
void | CancelBuildingConstruction (uint32 garrPlotInstanceId) |
void | ActivateBuilding (uint32 garrPlotInstanceId) |
void | AddFollower (uint32 garrFollowerId) |
Follower const * | GetFollower (uint64 dbId) const |
template<typename Predicate > | |
uint32 | CountFollowers (Predicate &&predicate) const |
void | SendInfo () |
void | SendRemoteInfo () const |
void | SendBlueprintAndSpecializationData () |
void | SendMapData (Player *receiver) const |
void | ResetFollowerActivationLimit () |
Static Public Member Functions | |
static void | DeleteFromDB (ObjectGuid::LowType ownerGuid, CharacterDatabaseTransaction trans) |
Private Member Functions | |
Map * | FindMap () const |
void | InitializePlots () |
GarrisonError | CheckBuildingPlacement (uint32 garrPlotInstanceId, uint32 garrBuildingId) const |
GarrisonError | CheckBuildingRemoval (uint32 garrPlotInstanceId) const |
Private Attributes | |
Player * | _owner |
GarrSiteLevelEntry const * | _siteLevel |
uint32 | _followerActivationsRemainingToday |
std::unordered_map< uint32, Plot > | _plots |
std::unordered_set< uint32 > | _knownBuildings |
std::unordered_map< uint64, Follower > | _followers |
std::unordered_set< uint32 > | _followerIds |
Definition at line 183 of file Garrison.h.
|
explicit |
Definition at line 33 of file Garrison.cpp.
void Garrison::ActivateBuilding | ( | uint32 | garrPlotInstanceId | ) |
void Garrison::AddFollower | ( | uint32 | garrFollowerId | ) |
void Garrison::CancelBuildingConstruction | ( | uint32 | garrPlotInstanceId | ) |
|
private |
Definition at line 616 of file Garrison.cpp.
|
private |
Definition at line 669 of file Garrison.cpp.
|
inline |
bool Garrison::Create | ( | uint32 | garrSiteId | ) |
void Garrison::Delete | ( | ) |
|
static |
Definition at line 207 of file Garrison.cpp.
void Garrison::Enter | ( | ) | const |
Definition at line 287 of file Garrison.cpp.
|
private |
Definition at line 611 of file Garrison.cpp.
GarrisonFactionIndex Garrison::GetFaction | ( | ) | const |
Definition at line 313 of file Garrison.cpp.
Garrison::Follower const * Garrison::GetFollower | ( | uint64 | dbId | ) | const |
Garrison::Plot * Garrison::GetPlot | ( | uint32 | garrPlotInstanceId | ) |
Garrison::Plot const * Garrison::GetPlot | ( | uint32 | garrPlotInstanceId | ) | const |
Definition at line 337 of file Garrison.cpp.
std::vector< Garrison::Plot * > Garrison::GetPlots | ( | ) |
|
inline |
|
inline |
|
inline |
|
private |
void Garrison::LearnBlueprint | ( | uint32 | garrBuildingId | ) |
void Garrison::Leave | ( | ) | const |
Definition at line 300 of file Garrison.cpp.
bool Garrison::LoadFromDB | ( | PreparedQueryResult | garrison, |
PreparedQueryResult | blueprints, | ||
PreparedQueryResult | buildings, | ||
PreparedQueryResult | followers, | ||
PreparedQueryResult | abilities | ||
) |
|
inline |
Definition at line 267 of file Garrison.h.
void Garrison::SaveToDB | ( | CharacterDatabaseTransaction | trans | ) |
void Garrison::SendBlueprintAndSpecializationData | ( | ) |
void Garrison::SendInfo | ( | ) |
void Garrison::SendMapData | ( | Player * | receiver | ) | const |
void Garrison::SendRemoteInfo | ( | ) | const |
Definition at line 569 of file Garrison.cpp.
void Garrison::UnlearnBlueprint | ( | uint32 | garrBuildingId | ) |
void Garrison::Upgrade | ( | ) |
Definition at line 283 of file Garrison.cpp.
|
private |
Definition at line 276 of file Garrison.h.
|
private |
Definition at line 281 of file Garrison.h.
Definition at line 280 of file Garrison.h.
|
private |
Definition at line 279 of file Garrison.h.
|
private |
Definition at line 274 of file Garrison.h.
Definition at line 278 of file Garrison.h.
|
private |
Definition at line 275 of file Garrison.h.