TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Garrison::Building Struct Reference

#include <Garrison.h>

Public Member Functions

bool CanActivate () const
 

Public Attributes

ObjectGuid Guid
 
std::unordered_set< ObjectGuidSpawns
 
Optional
< WorldPackets::Garrison::GarrisonBuildingInfo
PacketInfo
 

Member Function Documentation

bool Garrison::Building::CanActivate ( ) const
818 {
819  if (PacketInfo)
820  {
821  GarrBuildingEntry const* building = sGarrBuildingStore.AssertEntry(PacketInfo->GarrBuildingID);
822  if (PacketInfo->TimeBuilt + building->BuildDuration <= time(nullptr))
823  return true;
824  }
825 
826  return false;
827 }
DB2Storage< GarrBuildingEntry > sGarrBuildingStore("GarrBuilding.db2", GarrBuildingFormat, HOTFIX_SEL_GARR_BUILDING)
Definition: DB2Structure.h:439
uint32 BuildDuration
Definition: DB2Structure.h:451
Optional< WorldPackets::Garrison::GarrisonBuildingInfo > PacketInfo
Definition: Garrison.h:92

+ Here is the caller graph for this function:

Member Data Documentation

ObjectGuid Garrison::Building::Guid
Optional<WorldPackets::Garrison::GarrisonBuildingInfo> Garrison::Building::PacketInfo
std::unordered_set<ObjectGuid> Garrison::Building::Spawns

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