Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
OutdoorPvP.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#include "CellImpl.h"
7#include "GridNotifiers.h"
8#include "GridNotifiers.h"
9#include "GridNotifiersImpl.h"
10#include "GridNotifiersImpl.h"
11#include "Group.h"
12#include "Map.h"
13#include "MapManager.h"
14#include "ObjectAccessor.h"
15#include "ObjectMgr.h"
16#include "OutdoorPvP.h"
17#include "OutdoorPvPMgr.h"
18#include "WorldPacket.h"
19
25
27{
29 {
30 player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
31 player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
32 player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
33 }
34 return m_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second;
35}
36
38{
40 player->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 0);
41 m_activePlayers[player->GetTeamId()].erase(player->GetGUID());
42}
43
45{
46 if (!m_capturePoint)
47 return;
48
49 // send this too, sometimes the slider disappears, dunno why :(
50 SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldState1, 1);
51 // send these updates to only the ones in this objective
52 SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
53 // send this too, sometimes it resets :S
54 SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate3, m_neutralValuePct);
55}
56
58{
59 if (!entry)
60 {
61 const GameObjectData* data = sObjectMgr->GetGOData(guid);
62 if (!data)
63 return;
64 entry = data->id;
65 }
66 m_Objects[type] = MAKE_NEW_GUID(guid, entry, HIGHGUID_GAMEOBJECT);
67 m_ObjectTypes[m_Objects[type]] = type;
68}
69
71{
72 if (!entry)
73 {
74 const CreatureData* data = sObjectMgr->GetCreatureData(guid);
75 if (!data)
76 return;
77 entry = data->id;
78 }
79 m_Creatures[type] = MAKE_NEW_GUID(guid, entry, HIGHGUID_UNIT);
80 m_CreatureTypes[m_Creatures[type]] = type;
81}
82
83bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
84{
85 if (uint32 guid = sObjectMgr->AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3))
86 {
87 AddGO(type, guid, entry);
88 return true;
89 }
90
91 return false;
92}
93
94bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay)
95{
96 if (uint32 guid = sObjectMgr->AddCreData(entry, team, map, x, y, z, o, spawntimedelay))
97 {
98 AddCre(type, guid, entry);
99 return true;
100 }
101
102 return false;
103}
104
105bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
106{
107 SF_LOG_DEBUG("outdoorpvp", "Creating capture point %u", entry);
108
109 // check info existence
110 GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
111 if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
112 {
113 SF_LOG_ERROR("outdoorpvp", "OutdoorPvP: GO %u is not capture point!", entry);
114 return false;
115 }
116
117 m_capturePointGUID = sObjectMgr->AddGOData(entry, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3);
119 return false;
120
121 // get the needed values from goinfo
122 m_maxValue = (float)goinfo->capturePoint.maxTime;
123 m_maxSpeed = m_maxValue / (goinfo->capturePoint.minTime ? goinfo->capturePoint.minTime : 60);
126
127 return true;
128}
129
131{
132 if (!m_Creatures[type])
133 {
134 SF_LOG_DEBUG("outdoorpvp", "opvp creature type %u was already deleted", type);
135 return false;
136 }
137
139 if (!cr)
140 {
141 // can happen when closing the core
142 m_Creatures[type] = 0;
143 return false;
144 }
145 SF_LOG_DEBUG("outdoorpvp", "deleting opvp creature type %u", type);
146 uint32 guid = cr->GetDBTableGUIDLow();
147 // Don't save respawn time
148 cr->SetRespawnTime(0);
149 cr->RemoveCorpse();
150 // explicit removal from map
151 // beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
152 // so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
153 //if (Map* map = sMapMgr->FindMap(cr->GetMapId()))
154 // map->Remove(cr, false);
155 // delete respawn time for this creature
157 stmt->setUInt32(0, guid);
158 stmt->setUInt16(1, cr->GetMapId());
159 stmt->setUInt32(2, 0); // instance id, always 0 for world maps
160 CharacterDatabase.Execute(stmt);
161
163 sObjectMgr->DeleteCreatureData(guid);
164 m_CreatureTypes[m_Creatures[type]] = 0;
165 m_Creatures[type] = 0;
166 return true;
167}
168
170{
171 if (!m_Objects[type])
172 return false;
173
175 if (!obj)
176 {
177 m_Objects[type] = 0;
178 return false;
179 }
180 uint32 guid = obj->GetDBTableGUIDLow();
181 obj->SetRespawnTime(0); // not save respawn time
182 obj->Delete();
183 sObjectMgr->DeleteGOData(guid);
184 m_ObjectTypes[m_Objects[type]] = 0;
185 m_Objects[type] = 0;
186 return true;
187}
188
190{
191 sObjectMgr->DeleteGOData(m_capturePointGUID);
193
194 if (m_capturePoint)
195 {
196 m_capturePoint->SetRespawnTime(0); // not save respawn time
197 m_capturePoint->Delete();
198 }
199
200 return true;
201}
202
204{
205 for (std::map<uint32, uint64>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i)
206 DelObject(i->first);
207 for (std::map<uint32, uint64>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i)
208 DelCreature(i->first);
210}
211
213{
214 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
215 {
216 itr->second->DeleteSpawns();
217 delete itr->second;
218 }
219 m_capturePoints.clear();
220}
221
223
228
230{
231 m_players[player->GetTeamId()].insert(player->GetGUID());
232}
233
235{
236 // inform the objectives of the leaving
237 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
238 itr->second->HandlePlayerLeave(player);
239 // remove the world state information from the player (we can't keep everyone up to date, so leave out those who are not in the concerning zones)
240 if (!player->GetSession()->PlayerLogout())
241 SendRemoveWorldStates(player);
242 m_players[player->GetTeamId()].erase(player->GetGUID());
243 SF_LOG_DEBUG("outdoorpvp", "Player %s left an outdoorpvp zone", player->GetName().c_str());
244}
245
246void OutdoorPvP::HandlePlayerResurrects(Player* /*player*/, uint32 /*zone*/) { }
247
249{
250 bool objective_changed = false;
251 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
252 {
253 if (itr->second->Update(diff))
254 objective_changed = true;
255 }
256 return objective_changed;
257}
258
260{
261 if (!m_capturePoint)
262 return false;
263
264 float radius = (float)m_capturePoint->GetGOInfo()->capturePoint.radius;
265
266 for (uint32 team = 0; team < 2; ++team)
267 {
268 for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
269 {
270 uint64 playerGuid = *itr;
271 ++itr;
272
273 if (Player* player = ObjectAccessor::FindPlayer(playerGuid))
274 if (!m_capturePoint->IsWithinDistInMap(player, radius) || !player->IsOutdoorPvPActive())
275 HandlePlayerLeave(player);
276 }
277 }
278
279 std::list<Player*> players;
282 m_capturePoint->VisitNearbyWorldObject(radius, searcher);
283
284 for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
285 {
286 Player* const player = *itr;
287 if (player->IsOutdoorPvPActive())
288 {
289 if (m_activePlayers[player->GetTeamId()].insert(player->GetGUID()).second)
290 HandlePlayerEnter(*itr);
291 }
292 }
293
294 // get the difference of numbers
295 float fact_diff = ((float)m_activePlayers[0].size() - (float)m_activePlayers[1].size()) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL;
296 if (!fact_diff)
297 return false;
298
299 uint32 Challenger = 0;
300 float maxDiff = m_maxSpeed * diff;
301
302 if (fact_diff < 0)
303 {
304 // horde is in majority, but it's already horde-controlled -> no change
306 return false;
307
308 if (fact_diff < -maxDiff)
309 fact_diff = -maxDiff;
310
311 Challenger = HORDE;
312 }
313 else
314 {
315 // ally is in majority, but it's already ally-controlled -> no change
317 return false;
318
319 if (fact_diff > maxDiff)
320 fact_diff = maxDiff;
321
322 Challenger = ALLIANCE;
323 }
324
325 float oldValue = m_value;
326 TeamId oldTeam = m_team;
327
329
330 m_value += fact_diff;
331
332 if (m_value < -m_minValue) // red
333 {
334 if (m_value < -m_maxValue)
338 }
339 else if (m_value > m_minValue) // blue
340 {
341 if (m_value > m_maxValue)
345 }
346 else if (oldValue * m_value <= 0) // grey, go through mid point
347 {
348 // if challenger is ally, then n->a challenge
349 if (Challenger == ALLIANCE)
351 // if challenger is horde, then n->h challenge
352 else if (Challenger == HORDE)
355 }
356 else // grey, did not go through mid point
357 {
358 // old phase and current are on the same side, so one team challenges the other
364 }
365
366 if (m_value != oldValue)
368
369 if (m_OldState != m_State)
370 {
371 //SF_LOG_ERROR("outdoorpvp", "%u->%u", m_OldState, m_State);
372 if (oldTeam != m_team)
373 ChangeTeam(oldTeam);
374 ChangeState();
375 return true;
376 }
377
378 return false;
379}
380
382{
383 if (m_sendUpdate)
384 for (int i = 0; i < 2; ++i)
385 for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
386 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
387 player->SendUpdateWorldState(field, value);
388}
389
391{
392 for (uint32 team = 0; team < 2; ++team)
393 {
394 // send to all players present in the area
395 for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
396 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
397 player->SendUpdateWorldState(field, value);
398 }
399}
400
402{
403 uint32 team;
404 switch (m_State)
405 {
407 team = 0;
408 break;
410 team = 1;
411 break;
412 default:
413 return;
414 }
415
416 // send to all players present in the area
417 for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
418 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
419 player->KilledMonsterCredit(id, guid);
420}
421
422void OutdoorPvP::HandleKill(Player* killer, Unit* killed)
423{
424 if (Group* group = killer->GetGroup())
425 {
426 for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
427 {
428 Player* groupGuy = itr->GetSource();
429
430 if (!groupGuy)
431 continue;
432
433 // skip if too far away
434 if (!groupGuy->IsAtGroupRewardDistance(killed))
435 continue;
436
437 // creature kills must be notified, even if not inside objective / not outdoor pvp active
438 // player kills only count if active and inside objective
439 if ((groupGuy->IsOutdoorPvPActive() && IsInsideObjective(groupGuy)) || killed->GetTypeId() == TypeID::TYPEID_UNIT)
440 HandleKillImpl(groupGuy, killed);
441 }
442 }
443 else
444 {
445 // creature kills must be notified, even if not inside objective / not outdoor pvp active
446 if ((killer->IsOutdoorPvPActive() && IsInsideObjective(killer)) || killed->GetTypeId() == TypeID::TYPEID_UNIT)
447 HandleKillImpl(killer, killed);
448 }
449}
450
452{
453 for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
454 if (itr->second->IsInsideObjective(player))
455 return true;
456
457 return false;
458}
459
461{
462 PlayerSet const& plSet = m_activePlayers[player->GetTeamId()];
463 return plSet.find(player->GetGUID()) != plSet.end();
464}
465
467{
468 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
469 if (itr->second->HandleCustomSpell(player, spellId, go))
470 return true;
471
472 return false;
473}
474
476{
477 if (player->IsOutdoorPvPActive())
478 return true;
479 return false;
480}
481
483{
484 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
485 if (itr->second->HandleOpenGo(player, guid) >= 0)
486 return true;
487
488 return false;
489}
490
492{
493 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
494 if (itr->second->HandleGossipOption(player, guid, id))
495 return true;
496
497 return false;
498}
499
501{
502 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
503 if (itr->second->CanTalkTo(player, c, gso))
504 return true;
505
506 return false;
507}
508
510{
511 for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
512 if (itr->second->HandleDropFlag(player, id))
513 return true;
514
515 return false;
516}
517
518bool OPvPCapturePoint::HandleGossipOption(Player* /*player*/, uint64 /*guid*/, uint32 /*id*/)
519{
520 return false;
521}
522
523bool OPvPCapturePoint::CanTalkTo(Player* /*player*/, Creature* /*c*/, GossipMenuItems const& /*gso*/)
524{
525 return false;
526}
527
529{
530 return false;
531}
532
534{
535 std::map<uint64, uint32>::iterator itr = m_ObjectTypes.find(guid);
536 if (itr != m_ObjectTypes.end())
537 {
538 return itr->second;
539 }
540 return -1;
541}
542
543bool OutdoorPvP::HandleAreaTrigger(Player* /*player*/, uint32 /*trigger*/)
544{
545 return false;
546}
547
549{
550 // This is faster than sWorld->SendZoneMessage
551 for (uint32 team = 0; team < 2; ++team)
552 for (PlayerSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
553 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
554 player->GetSession()->SendPacket(&data);
555}
556
558{
559 sOutdoorPvPMgr->AddZone(zoneId, this);
560}
561
562bool OutdoorPvP::HasPlayer(Player const* player) const
563{
564 PlayerSet const& plSet = m_players[player->GetTeamId()];
565 return plSet.find(player->GetGUID()) != plSet.end();
566}
567
569{
570 if (spellId > 0)
571 {
572 for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
573 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
574 player->CastSpell(player, (uint32)spellId, true);
575 }
576 else
577 {
578 for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
579 if (Player* const player = ObjectAccessor::FindPlayer(*itr))
580 player->RemoveAura((uint32)-spellId); // by stack?
581 }
582}
583
584void OutdoorPvP::TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2)
585{
586 TeamCastSpell(team, spellId);
587 TeamCastSpell(OTHER_TEAM(team), spellId2 ? -(int32)spellId2 : -(int32)spellId);
588}
589
591{
593 return;
594
596 cp->m_capturePoint = go;
597}
598
600{
602 return;
603
605 cp->m_capturePoint = NULL;
606}
@ CHAR_DEL_CREATURE_RESPAWN
std::int32_t int32
Definition Define.h:73
std::uint32_t uint32
Definition Define.h:77
std::uint64_t uint64
Definition Define.h:76
#define SF_LOG_DEBUG(filterType__,...)
Definition Log.h:134
#define SF_LOG_ERROR(filterType__,...)
Definition Log.h:143
@ TYPEID_UNIT
Definition Object.h:54
@ HIGHGUID_GAMEOBJECT
@ HIGHGUID_UNIT
uint64 MAKE_NEW_GUID(uint32 l, uint32 e, uint32 h)
#define sObjectMgr
Definition ObjectMgr.h:1617
std::set< uint64 > PlayerSet
Definition OutdoorPvP.h:76
@ OBJECTIVESTATE_HORDE
Definition OutdoorPvP.h:31
@ OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE
Definition OutdoorPvP.h:33
@ OBJECTIVESTATE_ALLIANCE
Definition OutdoorPvP.h:30
@ OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE
Definition OutdoorPvP.h:32
@ OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE
Definition OutdoorPvP.h:35
@ OBJECTIVESTATE_NEUTRAL
Definition OutdoorPvP.h:29
@ OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE
Definition OutdoorPvP.h:34
#define OTHER_TEAM(a)
Definition OutdoorPvP.h:38
#define sOutdoorPvPMgr
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL
@ GAMEOBJECT_TYPE_CAPTURE_POINT
TeamId
@ TEAM_NEUTRAL
@ TEAM_ALLIANCE
@ TEAM_HORDE
@ ALLIANCE
@ HORDE
T CalculatePct(T base, U pct)
Definition Util.h:103
uint32 GetDBTableGUIDLow() const
Definition Creature.h:445
void SetRespawnTime(uint32 respawn)
Definition Creature.h:598
void RemoveCorpse(bool setSpawnTime=true)
Definition Creature.cpp:230
uint32 GetDBTableGUIDLow() const
Definition GameObject.h:651
void Delete()
void SetRespawnTime(int32 respawn)
Definition GameObject.h:699
GameobjectTypes GetGoType() const
Definition GameObject.h:719
Definition Group.h:147
GroupReference * next()
static T * Find(uint64 guid)
OPvPCapturePoint(OutdoorPvP *pvp)
bool AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
std::map< uint32, uint64 > m_Creatures
Definition OutdoorPvP.h:170
std::map< uint32, uint64 > m_Objects
Definition OutdoorPvP.h:169
std::map< uint64, uint32 > m_ObjectTypes
Definition OutdoorPvP.h:171
bool AddCreature(uint32 type, uint32 entry, uint32 teamval, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay=0)
virtual int32 HandleOpenGo(Player *player, uint64 guid)
void AddCre(uint32 type, uint32 guid, uint32 entry=0)
virtual void ChangeState()=0
virtual bool HandleCustomSpell(Player *player, uint32 spellId, GameObject *go)
bool SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o=0, float rotation0=0, float rotation1=0, float rotation2=0, float rotation3=0)
ObjectiveStates m_OldState
Definition OutdoorPvP.h:158
OutdoorPvP * m_PvP
Definition OutdoorPvP.h:165
virtual bool Update(uint32 diff)
ObjectiveStates m_State
Definition OutdoorPvP.h:159
virtual void DeleteSpawns()
uint32 m_neutralValuePct
Definition OutdoorPvP.h:162
PlayerSet m_activePlayers[2]
Definition OutdoorPvP.h:143
virtual bool CanTalkTo(Player *player, Creature *c, GossipMenuItems const &gso)
void SendUpdateWorldState(uint32 field, uint32 value)
virtual void HandlePlayerLeave(Player *player)
GameObject * m_capturePoint
Definition OutdoorPvP.h:123
virtual bool HandleGossipOption(Player *player, uint64 guid, uint32 gossipid)
virtual bool HandleDropFlag(Player *player, uint32 spellId)
void SendObjectiveComplete(uint32 id, uint64 guid)
virtual bool HandlePlayerEnter(Player *player)
virtual void ChangeTeam(TeamId)
Definition OutdoorPvP.h:109
bool DelCreature(uint32 type)
std::map< uint64, uint32 > m_CreatureTypes
Definition OutdoorPvP.h:172
void AddGO(uint32 type, uint32 guid, uint32 entry=0)
bool DelObject(uint32 type)
bool IsInsideObjective(Player *player) const
virtual void SendChangePhase()
uint32 m_capturePointGUID
Definition OutdoorPvP.h:121
static Player * FindPlayer(uint64)
uint64 GetGUID() const
Definition Object.h:119
TypeID GetTypeId() const
Definition Object.h:131
virtual void HandlePlayerEnterZone(Player *player, uint32 zone)
void OnGameObjectCreate(GameObject *go)
OPvPCapturePointMap m_capturePoints
Definition OutdoorPvP.h:238
bool HasPlayer(Player const *player) const
virtual bool HandleAreaTrigger(Player *player, uint32 trigger)
uint32 m_TypeId
Definition OutdoorPvP.h:242
virtual ~OutdoorPvP()
virtual bool Update(uint32 diff)
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2=0)
virtual bool HandleGossipOption(Player *player, uint64 guid, uint32 gossipid)
void DeleteSpawns()
void RegisterZone(uint32 zoneid)
virtual void SendRemoveWorldStates(Player *)
Definition OutdoorPvP.h:247
virtual bool HandleOpenGo(Player *player, uint64 guid)
void OnGameObjectRemove(GameObject *go)
virtual bool HandleCustomSpell(Player *player, uint32 spellId, GameObject *go)
virtual void HandlePlayerLeaveZone(Player *player, uint32 zone)
OPvPCapturePoint * GetCapturePoint(uint32 lowguid) const
Definition OutdoorPvP.h:261
void TeamCastSpell(TeamId team, int32 spellId)
virtual void HandlePlayerResurrects(Player *player, uint32 zone)
void SendUpdateWorldState(uint32 field, uint32 value)
PlayerSet m_players[2]
Definition OutdoorPvP.h:240
virtual bool CanTalkTo(Player *player, Creature *c, GossipMenuItems const &gso)
bool IsInsideObjective(Player *player) const
virtual void HandleKillImpl(Player *, Unit *)
Definition OutdoorPvP.h:218
void BroadcastPacket(WorldPacket &data) const
bool m_sendUpdate
Definition OutdoorPvP.h:244
virtual void HandleKill(Player *killer, Unit *killed)
virtual bool HandleDropFlag(Player *player, uint32 spellId)
bool IsAtGroupRewardDistance(WorldObject const *pRewardSource) const
Definition Player.cpp:19789
void SendUpdateWorldState(uint32 Field, uint32 Value)
Definition Player.cpp:9734
WorldSession * GetSession() const
Definition Player.h:2417
TeamId GetTeamId() const
Definition Player.h:2531
Group * GetGroup()
Definition Player.h:2972
bool IsOutdoorPvPActive()
Definition Player.cpp:8272
void setUInt16(const uint8 index, const uint16 value)
void setUInt32(const uint8 index, const uint32 value)
Definition Unit.h:1367
uint32 GetMapId() const
Definition Object.h:546
std::string const & GetName() const
Definition Object.h:664
void AddObjectToRemoveList()
Definition Object.cpp:2550
bool PlayerLogout() const
CharacterDatabaseWorkerPool CharacterDatabase
Accessor to the character database.
Definition Main.cpp:41
uint32 id
Definition Creature.h:260
struct GameObjectTemplate::@046065176235271051340241126110345143267101032070::@155125343144143170177322306114162367114353163373 capturePoint