#include "BattlefieldMgr.h"
◆ BattlefieldMap
◆ BattlefieldSet
◆ BattlefieldMgr()
BattlefieldMgr::BattlefieldMgr |
( |
| ) |
|
23{
25
26}
uint32 m_UpdateTimer
Definition: BattlefieldMgr.h:74
References m_UpdateTimer.
◆ ~BattlefieldMgr()
BattlefieldMgr::~BattlefieldMgr |
( |
| ) |
|
29{
30
32 delete *itr;
33}
BattlefieldSet m_BattlefieldSet
Definition: BattlefieldMgr.h:69
References m_BattlefieldSet.
◆ AddZone()
80{
82}
BattlefieldMap m_BattlefieldMap
Definition: BattlefieldMgr.h:72
References m_BattlefieldMap.
◆ CanTalkTo()
◆ GetBattlefieldByBattleId()
124{
126 {
127 if ((*itr)->GetBattleId() == battleid)
128 return (*itr);
129 }
130 return nullptr;
131}
References m_BattlefieldSet.
◆ GetBattlefieldToZoneId()
111{
114 {
115
116 return nullptr;
117 }
118 if (!itr->second->IsEnabled())
119 return nullptr;
120 return itr->second;
121}
References m_BattlefieldMap.
◆ GetZoneScript()
146{
149 return itr->second;
150 else
151 return nullptr;
152}
References m_BattlefieldMap.
◆ HandleDropFlag()
void BattlefieldMgr::HandleDropFlag |
( |
Player * |
player, |
|
|
uint32 |
spellId |
|
) |
| |
◆ HandleGossipOption()
◆ HandlePlayerEnterZone()
void BattlefieldMgr::HandlePlayerEnterZone |
( |
Player * |
player, |
|
|
uint32 |
areaflag |
|
) |
| |
85{
88 return;
89
90 if (itr->second->HasPlayer(player) || !itr->second->IsEnabled())
91 return;
92
93 itr->second->HandlePlayerEnterZone(player, zoneid);
94 LOG_DEBUG(
"bg.battlefield",
"Player {} entered outdoorpvp id {}", player->
GetGUID().
ToString(), itr->second->GetTypeId());
95}
#define LOG_DEBUG(filterType__,...)
Definition: Log.h:168
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
std::string ToString() const
Definition: ObjectGuid.cpp:47
References Object::GetGUID(), LOG_DEBUG, m_BattlefieldMap, and ObjectGuid::ToString().
◆ HandlePlayerLeaveZone()
void BattlefieldMgr::HandlePlayerLeaveZone |
( |
Player * |
player, |
|
|
uint32 |
areaflag |
|
) |
| |
◆ HandlePlayerResurrects()
void BattlefieldMgr::HandlePlayerResurrects |
( |
Player * |
player, |
|
|
uint32 |
areaflag |
|
) |
| |
◆ InitBattlefield()
void BattlefieldMgr::InitBattlefield |
( |
| ) |
|
42{
44 {
45 LOG_INFO(
"server.loading",
"Battlefield: Wintergrasp is disabled.");
47 return;
48 }
50
52 {
53 LOG_ERROR(
"server.loading",
"Battlefield: Wintergrasp init failed.");
55 delete pBf;
56 }
57 else
58 {
60 LOG_INFO(
"server.loading",
"Battlefield: Wintergrasp successfully initiated.");
62 }
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77}
#define LOG_INFO(filterType__,...)
Definition: Log.h:164
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
@ CONFIG_WINTERGRASP_ENABLE
Definition: IWorld.h:325
#define sWorld
Definition: World.h:444
Definition: Battlefield.h:206
virtual bool SetupBattlefield()
Call this to init the Battlefield.
Definition: Battlefield.h:219
Definition: BattlefieldWG.h:277
References CONFIG_WINTERGRASP_ENABLE, LOG_ERROR, LOG_INFO, m_BattlefieldSet, Battlefield::SetupBattlefield(), and sWorld.
◆ instance()
36{
39}
Definition: BattlefieldMgr.h:31
static BattlefieldMgr * instance()
Definition: BattlefieldMgr.cpp:35
References instance().
Referenced by instance().
◆ Update()
void BattlefieldMgr::Update |
( |
uint32 |
diff | ) |
|
◆ m_BattlefieldMap
◆ m_BattlefieldSet
◆ m_UpdateTimer
uint32 BattlefieldMgr::m_UpdateTimer |
|
private |