57 TC_LOG_INFO(
"server.loading",
">> Loaded 0 outdoor PvP definitions. DB table `outdoorpvp_template` is empty.");
66 Field* fields = result->Fetch();
75 TC_LOG_ERROR(
"sql.sql",
"Invalid OutdoorPvPTypes value {} in outdoorpvp_template; skipped.", typeId);
84 while (result->NextRow());
91 TC_LOG_ERROR(
"sql.sql",
"Could not initialize OutdoorPvP object for type ID {}; no entry in database.",
uint32(i));
98 TC_LOG_ERROR(
"outdoorpvp",
"Could not initialize OutdoorPvP object for type ID {}; got NULL pointer from script.",
uint32(i));
104 TC_LOG_ERROR(
"outdoorpvp",
"Could not initialize OutdoorPvP object for type ID {}; SetupOutdoorPvP failed.",
uint32(i));
126 if (itr->second->HasPlayer(player))
140 if (!itr->second->HasPlayer(player))
143 itr->second->HandlePlayerLeaveZone(player, zoneid);
173 if ((*itr)->HandleCustomSpell(player, spellId, go))
192 if ((*itr)->HandleOpenGo(player, go))
202 if ((*itr)->HandleGossipOption(player, creature, gossipid))
211 if ((*itr)->CanTalkTo(player, creature, gso))
221 if ((*itr)->HandleDropFlag(player, spellId))
232 if (itr->second->HasPlayer(player))
233 itr->second->HandlePlayerResurrects(player, zoneid);
239 return bct->GetText(locale);
241 TC_LOG_ERROR(
"outdoorpvp",
"Can not find DefenseMessage (Zone: {}, Id: {}). BroadcastText (Id: {}) does not exist.", zoneId,
id,
id);
std::shared_ptr< ResultSet > QueryResult
DatabaseWorkerPool< WorldDatabaseConnection > WorldDatabase
Accessor to the world database.
@ DISABLE_TYPE_OUTDOORPVP
#define TC_LOG_DEBUG(filterType__,...)
#define TC_LOG_ERROR(filterType__,...)
#define TC_LOG_INFO(filterType__,...)
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Class used to access individual fields of database query result.
std::string ToString() const
static ObjectGuid GetGUID(Object const *o)
bool HandleCustomSpell(Player *player, uint32 spellId, GameObject *go)
static OutdoorPvPMgr * instance()
OutdoorPvPMap m_OutdoorPvPMap
ZoneScript * GetZoneScript(uint32 zoneId)
void AddZone(uint32 zoneid, OutdoorPvP *handle)
void HandlePlayerLeaveZone(Player *player, uint32 areaflag)
OutdoorPvPSet m_OutdoorPvPSet
bool CanTalkTo(Player *player, Creature *creature, GossipMenuItems const &gso)
bool HandleOpenGo(Player *player, GameObject *go)
void HandleDropFlag(Player *player, uint32 spellId)
OutdoorPvP * GetOutdoorPvPToZoneId(uint32 zoneid)
OutdoorPvPScriptIds m_OutdoorPvPDatas
void HandlePlayerEnterZone(Player *player, uint32 areaflag)
void HandlePlayerResurrects(Player *player, uint32 areaflag)
void HandleGossipOption(Player *player, Creature *creature, uint32 gossipid)
std::string GetDefenseMessage(uint32 zoneId, uint32 id, LocaleConstant locale) const
virtual void HandlePlayerEnterZone(Player *player, uint32 zone)
virtual bool Update(uint32 diff)
virtual bool SetupOutdoorPvP()
bool IsDisabledFor(DisableType type, uint32 entry, WorldObject const *ref, uint8 flags)