54 Field* fields = result->Fetch();
60 TC_LOG_ERROR(
"sql.sql",
"BattlefieldMgr::InitBattlefield: Invalid TypeId value {} in battlefield_template, skipped.", typeId);
72 TC_LOG_INFO(
"bg.battlefield",
"Setting up battlefield with TypeId {} failed.", typeId);
78 TC_LOG_INFO(
"bg.battlefield",
"Setting up battlefield with TypeId {} succeeded.", typeId);
82 }
while (result->NextRow());
114 if (!itr->second->HasPlayer(player))
117 itr->second->HandlePlayerLeaveZone(player, zoneId);
130 if (!itr->second->IsEnabled())
140 if ((*itr)->GetBattleId() == battleId)
161 if ((*itr)->IsEnabled())
@ BATTLEFIELD_OBJECTIVE_UPDATE_INTERVAL
std::shared_ptr< ResultSet > QueryResult
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
BattlefieldMap _battlefieldMap
Battlefield * GetBattlefieldToZoneId(uint32 zoneId)
void HandlePlayerLeaveZone(Player *player, uint32 zoneId)
BattlefieldSet _battlefieldSet
Battlefield * GetBattlefieldByBattleId(uint32 battleId)
void HandlePlayerEnterZone(Player *player, uint32 zoneId)
ZoneScript * GetZoneScript(uint32 zoneId)
static BattlefieldMgr * instance()
void AddZone(uint32 zoneId, Battlefield *bf)
virtual bool SetupBattlefield()
Call this to init the Battlefield.
bool HasPlayer(Player *player) const
bool IsEnabled() const
Return if battlefield is enable.
void HandlePlayerEnterZone(Player *player, uint32 zone)
Called when player (player) enter in zone.
Class used to access individual fields of database query result.
std::string ToString() const
static ObjectGuid GetGUID(Object const *o)