OregonCore  revision be9e804-git
Your Favourite TBC server
OutdoorPvP.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the OregonCore Project. See AUTHORS file for Copyright information
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #include "OutdoorPvP.h"
19 #include "OutdoorPvPMgr.h"
20 #include "ObjectAccessor.h"
21 #include "ObjectMgr.h"
22 #include "Map.h"
23 #include "MapManager.h"
24 #include "Group.h"
25 #include "WorldPacket.h"
26 #include "GridNotifiers.h"
27 #include "GridNotifiersImpl.h"
28 #include "CellImpl.h"
29 
31  : m_capturePointGUID(0), m_capturePoint(NULL), m_maxValue(0), m_maxSpeed(0), m_value(0), m_team(TEAM_NEUTRAL),
32  m_OldState(OBJECTIVESTATE_NEUTRAL), m_State(OBJECTIVESTATE_NEUTRAL), m_neutralValuePct(0),
33  m_PvP(pvp)
34 {
35 }
36 
38 {
39  if (m_capturePoint)
40  {
42  plr->SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
44  }
45  return m_activePlayers[plr->GetTeamId()].insert(plr).second;
46 }
47 
49 {
50  if (m_capturePoint)
52  m_activePlayers[plr->GetTeamId()].erase(plr);
53 }
54 
56 {
57  if (!m_capturePoint)
58  return;
59 
60  // send this too, sometimes the slider disappears, dunno why :(
62  // send these updates to only the ones in this objective
63  SendUpdateWorldState(m_capturePoint->GetGOInfo()->capturePoint.worldstate2, (uint32)ceil((m_value + m_maxValue) / (2 * m_maxValue) * 100.0f));
64  // send this too, sometimes it resets :S
66 }
67 
69 {
70  if (!entry)
71  {
72  const GameObjectData* data = sObjectMgr.GetGOData(guid);
73  if (!data)
74  return;
75  entry = data->id;
76  }
77  m_Objects[type] = MAKE_NEW_GUID(guid, entry, HIGHGUID_GAMEOBJECT);
78  m_ObjectTypes[m_Objects[type]] = type;
79 }
80 
82 {
83  if (!entry)
84  {
85  const CreatureData* data = sObjectMgr.GetCreatureData(guid);
86  if (!data)
87  return;
88  entry = data->id;
89  }
90  m_Creatures[type] = MAKE_NEW_GUID(guid, entry, HIGHGUID_UNIT);
91  m_CreatureTypes[m_Creatures[type]] = type;
92 }
93 
94 bool OPvPCapturePoint::AddObject(uint32 type, uint32 entry, uint32 artKit, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
95 {
96  if (uint32 guid = sObjectMgr.AddGOData(entry, artKit, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3))
97  {
98  AddGO(type, guid, entry);
99  return true;
100  }
101 
102  return false;
103 }
104 
105 bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay)
106 {
107  if (uint32 guid = sObjectMgr.AddCreData(entry, team, map, x, y, z, o, spawntimedelay))
108  {
109  AddCre(type, guid, entry);
110  return true;
111  }
112 
113  return false;
114 }
115 
116 bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
117 {
118  sLog.outDebug("Creating capture point %u", entry);
119 
120  // check info existence
121  GameObjectInfo const* goinfo = sObjectMgr.GetGameObjectInfo(entry);
122  if (!goinfo || goinfo->type != GAMEOBJECT_TYPE_CAPTURE_POINT)
123  {
124  sLog.outError("OutdoorPvP: GO %u is not capture point!", entry);
125  return false;
126  }
127 
128  m_capturePointGUID = sObjectMgr.AddGOData(entry, 21, map, x, y, z, o, 0, rotation0, rotation1, rotation2, rotation3);
129  if (!m_capturePointGUID)
130  return false;
131 
132  // get the needed values from goinfo
133  m_maxValue = goinfo->capturePoint.maxTime;
134  m_maxSpeed = m_maxValue / (goinfo->capturePoint.minTime ? goinfo->capturePoint.minTime : 60);
135  m_neutralValuePct = goinfo->capturePoint.neutralPercent;
136  m_minValue = m_maxValue * goinfo->capturePoint.neutralPercent / 100;
137 
138  return true;
139 }
140 
142 {
143  if (!m_Creatures[type])
144  {
145  sLog.outDebug("opvp creature type %u was already deleted", type);
146  return false;
147  }
148 
150  if (!cr)
151  {
152  // can happen when closing the core
153  m_Creatures[type] = 0;
154  return false;
155  }
156  sLog.outDebug("deleting opvp creature type %u", type);
157  uint32 guid = cr->GetDBTableGUIDLow();
158  // Don't save respawn time
159  cr->SetRespawnTime(0);
160  cr->RemoveCorpse();
161  // explicit removal from map
162  // beats me why this is needed, but with the recent removal "cleanup" some creatures stay in the map if "properly" deleted
163  // so this is a big fat workaround, if AddObjectToRemoveList and DoDelayedMovesAndRemoves worked correctly, this wouldn't be needed
164  if (Map* map = MapManager::Instance().FindMap(cr->GetMapId()))
165  map->RemoveFromMap(cr, false);
166  // delete respawn time for this creature
167  WorldDatabase.PExecute("DELETE FROM creature_respawn WHERE guid = '%u'", guid);
168  cr->AddObjectToRemoveList();
169  sObjectMgr.DeleteCreatureData(guid);
170  m_CreatureTypes[m_Creatures[type]] = 0;
171  m_Creatures[type] = 0;
172  return true;
173 }
174 
176 {
177  if (!m_Objects[type])
178  return false;
179 
181  if (!obj)
182  {
183  m_Objects[type] = 0;
184  return false;
185  }
186  uint32 guid = obj->GetDBTableGUIDLow();
187  obj->SetRespawnTime(0); // not save respawn time
188  obj->Delete();
189  sObjectMgr.DeleteGOData(guid);
190  m_ObjectTypes[m_Objects[type]] = 0;
191  m_Objects[type] = 0;
192  return true;
193 }
194 
196 {
197  sObjectMgr.DeleteGOData(m_capturePointGUID);
198  m_capturePointGUID = 0;
199 
200  if (m_capturePoint)
201  {
202  m_capturePoint->SetRespawnTime(0); // not save respawn time
204  }
205 
206  return true;
207 }
208 
210 {
211  for (std::map<uint32, uint64>::iterator i = m_Objects.begin(); i != m_Objects.end(); ++i)
212  DelObject(i->first);
213  for (std::map<uint32, uint64>::iterator i = m_Creatures.begin(); i != m_Creatures.end(); ++i)
214  DelCreature(i->first);
215  DelCapturePoint();
216 }
217 
219 {
220  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
221  {
222  itr->second->DeleteSpawns();
223  delete itr->second;
224  }
225  m_capturePoints.clear();
226 }
227 
229 {
230 }
231 
233 {
234  DeleteSpawns();
235 }
236 
238 {
239  m_players[plr->GetTeamId()].insert(plr);
240 }
241 
243 {
244  // inform the objectives of the leaving
245  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
246  itr->second->HandlePlayerLeave(plr);
247  // 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)
248  if (!plr->GetSession()->PlayerLogout())
249  SendRemoveWorldStates(plr);
250  m_players[plr->GetTeamId()].erase(plr);
251  sLog.outDebug("Player %s left an outdoorpvp zone", plr->GetName());
252 }
253 
255 {
256  bool objective_changed = false;
257  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
258  {
259  if (itr->second->Update(diff))
260  objective_changed = true;
261  }
262  return objective_changed;
263 }
264 
266 {
267  if (!m_capturePoint)
268  return false;
269 
270  float radius = m_capturePoint->GetGOInfo()->capturePoint.radius;
271 
272  for (uint32 team = 0; team < 2; ++team)
273  {
274  for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();)
275  {
276  Player* player = *itr;
277  ++itr;
278 
279  if (Player* player = ObjectAccessor::FindPlayer(player->GetGUID()))
280  if (!m_capturePoint->IsWithinDistInMap(player, radius) || !player->IsOutdoorPvPActive())
281  HandlePlayerLeave(player);
282  }
283  }
284 
285  std::list<Player*> players;
288  m_capturePoint->VisitNearbyWorldObject(radius, searcher);
289 
290  for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
291  {
292  if ((*itr)->IsOutdoorPvPActive())
293  {
294  if (m_activePlayers[(*itr)->GetTeamId()].insert(*itr).second)
295  HandlePlayerEnter(*itr);
296  }
297  }
298 
299  // get the difference of numbers
300  float fact_diff = ((float)m_activePlayers[0].size() - (float)m_activePlayers[1].size()) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL;
301  if (!fact_diff)
302  return false;
303 
304  uint32 Challenger = 0;
305  float maxDiff = m_maxSpeed * diff;
306 
307  if (fact_diff < 0)
308  {
309  // horde is in majority, but it's already horde-controlled -> no change
311  return false;
312 
313  if (fact_diff < -maxDiff)
314  fact_diff = -maxDiff;
315 
316  Challenger = HORDE;
317  }
318  else
319  {
320  // ally is in majority, but it's already ally-controlled -> no change
322  return false;
323 
324  if (fact_diff > maxDiff)
325  fact_diff = maxDiff;
326 
327  Challenger = ALLIANCE;
328  }
329 
330  float oldValue = m_value;
331  TeamId oldTeam = m_team;
332 
334 
335  m_value += fact_diff;
336 
337  if (m_value < -m_minValue) // red
338  {
339  if (m_value < -m_maxValue)
340  m_value = -m_maxValue;
342  m_team = TEAM_HORDE;
343  }
344  else if (m_value > m_minValue) // blue
345  {
346  if (m_value > m_maxValue)
350  }
351  else if (oldValue * m_value <= 0) // grey, go through mid point
352  {
353  // if challenger is ally, then n->a challenge
354  if (Challenger == ALLIANCE)
356  // if challenger is horde, then n->h challenge
357  else if (Challenger == HORDE)
360  }
361  else // grey, did not go through mid point
362  {
363  // old phase and current are on the same side, so one team challenges the other
369  }
370 
371  if (m_value != oldValue)
372  SendChangePhase();
373 
374  if (m_OldState != m_State)
375  {
376  //sLog.outError("%u->%u", m_OldState, m_State);
377  if (oldTeam != m_team)
378  ChangeTeam(oldTeam);
379  ChangeState();
380  return true;
381  }
382 
383  return false;
384 }
385 
387 {
388  for (int i = 0; i < 2; ++i)
389  for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
390  (*itr)->SendUpdateWorldState(field, value);
391 }
392 
394 {
395  for (uint32 team = 0; team < 2; ++team)
396  {
397  // send to all players present in the area
398  for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
399  (*itr)->SendUpdateWorldState(field, value);
400  }
401 }
402 
404 {
405  uint32 team;
406  switch (m_State)
407  {
409  team = 0;
410  break;
412  team = 1;
413  break;
414  default:
415  return;
416  }
417 
418  // send to all players present in the area
419  for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
420  (*itr)->KilledMonsterCredit(id, guid);
421 }
422 
423 void OutdoorPvP::HandleKill(Player* killer, Unit* killed)
424 {
425  if (Group* pGroup = killer->GetGroup())
426  {
427  for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
428  {
429  Player* pGroupGuy = itr->GetSource();
430 
431  if (!pGroupGuy)
432  continue;
433 
434  // skip if too far away
435  if (!pGroupGuy->IsAtGroupRewardDistance(killed))
436  continue;
437 
438  // creature kills must be notified, even if not inside objective / not outdoor pvp active
439  // player kills only count if active and inside objective
440  if ((pGroupGuy->IsOutdoorPvPActive() && IsInsideObjective(pGroupGuy)) || killed->GetTypeId() == TYPEID_UNIT)
441  HandleKillImpl(pGroupGuy, killed);
442  }
443  }
444  else
445  {
446  // creature kills must be notified, even if not inside objective / not outdoor pvp active
447  if (killer && ((killer->IsOutdoorPvPActive() && IsInsideObjective(killer)) || killed->GetTypeId() == TYPEID_UNIT))
448  HandleKillImpl(killer, killed);
449  }
450 }
451 
453 {
454  for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
455  if (itr->second->IsInsideObjective(plr))
456  return true;
457 
458  return false;
459 }
460 
462 {
463  return m_activePlayers[plr->GetTeamId()].find(plr) != m_activePlayers[plr->GetTeamId()].end();
464 }
465 
467 {
468  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
469  if (itr->second->HandleCustomSpell(plr, spellId, go))
470  return true;
471 
472  return false;
473 }
474 
476 {
477  if (!plr->IsOutdoorPvPActive())
478  return false;
479  return false;
480 }
481 
483 {
484  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
485  if (itr->second->HandleOpenGo(plr, 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(plr, 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(plr, 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(plr, id))
513  return true;
514 
515  return false;
516 }
517 
519 {
520  return false;
521 }
522 
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  return itr->second;
538  return -1;
539 }
540 
541 bool OutdoorPvP::HandleAreaTrigger(Player* /*plr*/, uint32 /*trigger*/)
542 {
543  return false;
544 }
545 
547 {
548  sOutdoorPvPMgr.AddZone(zoneId, this);
549 }
550 
552 {
553  return m_players[plr->GetTeamId()].find(plr) != m_players[plr->GetTeamId()].end();
554 }
555 
557 {
558  if (spellId > 0)
559  for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
560  (*itr)->CastSpell(*itr, (uint32)spellId, true);
561  else
562  for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
563  (*itr)->RemoveAurasDueToSpell((uint32) - spellId);
564 }
565 
566 void OutdoorPvP::TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2)
567 {
568  TeamCastSpell(team, spellId);
569  TeamCastSpell(OTHER_TEAM(team), spellId2 ? -(int32)spellId2 : -(int32)spellId);
570 }
571 
573 {
575  return;
576 
577  if (OPvPCapturePoint* cp = GetCapturePoint(go->GetDBTableGUIDLow()))
578  cp->m_capturePoint = add ? go : NULL;
579 }
580 
582 {
584  return;
585 
586  if (OPvPCapturePoint *cp = GetCapturePoint(go->GetDBTableGUIDLow()))
587  cp->m_capturePoint = NULL;
588 }
589 
bool IsInsideObjective(Player *plr) const
Definition: OutdoorPvP.cpp:461
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2=0)
Definition: OutdoorPvP.cpp:566
Group * GetGroup()
Definition: Player.h:2577
void SetRespawnTime(uint32 respawn)
Definition: Creature.h:665
bool IsInsideObjective(Player *plr) const
Definition: OutdoorPvP.cpp:452
virtual void HandlePlayerEnterZone(Player *plr, uint32 zone)
Definition: OutdoorPvP.cpp:237
void TeamCastSpell(TeamId team, int32 spellId)
Definition: OutdoorPvP.cpp:556
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
Definition: OutdoorPvP.cpp:518
#define sOutdoorPvPMgr
Definition: OutdoorPvPMgr.h:79
void SendUpdateWorldState(uint32 Field, uint32 Value)
Definition: Player.cpp:7650
bool IsOutdoorPvPActive()
Definition: Player.cpp:6393
DatabaseType WorldDatabase
Accessor to the world database.
Definition: Main.cpp:53
virtual bool CanTalkTo(Player *plr, Creature *c, GossipMenuItems gso)
Definition: OutdoorPvP.cpp:500
uint32 GetDBTableGUIDLow() const
Definition: Creature.h:484
uint32 id
Definition: Creature.h:274
OPvPCapturePoint(OutdoorPvP *pvp)
Definition: OutdoorPvP.cpp:30
virtual void ChangeTeam(TeamId)
Definition: OutdoorPvP.h:114
virtual bool HandleAreaTrigger(Player *plr, uint32 trigger)
Definition: OutdoorPvP.cpp:541
virtual void HandlePlayerLeave(Player *plr)
Definition: OutdoorPvP.cpp:48
void AddGO(uint32 type, uint32 guid, uint32 entry=0)
Definition: OutdoorPvP.cpp:68
bool DelObject(uint32 type)
Definition: OutdoorPvP.cpp:175
virtual bool HandleDropFlag(Player *plr, uint32 spellId)
Definition: OutdoorPvP.cpp:528
bool AddObject(uint32 type, uint32 entry, uint32 artKit, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3)
Definition: OutdoorPvP.cpp:94
#define sLog
Log class singleton.
Definition: Log.h:187
std::map< uint64, uint32 > m_ObjectTypes
Definition: OutdoorPvP.h:165
ACE_INT32 int32
Definition: Define.h:67
static T * Find(uint64 guid)
#define OTHER_TEAM(a)
Definition: OutdoorPvP.h:47
bool IsAtGroupRewardDistance(WorldObject const *pRewardSource) const
Definition: Player.cpp:19937
void SetRespawnTime(int32 respawn)
Definition: GameObject.h:710
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)
Definition: OutdoorPvP.cpp:116
uint32 m_capturePointGUID
Definition: OutdoorPvP.h:125
virtual int32 HandleOpenGo(Player *plr, uint64 guid)
Definition: OutdoorPvP.cpp:533
#define sObjectMgr
Definition: ObjectMgr.h:1317
virtual void HandleKill(Player *killer, Unit *killed)
Definition: OutdoorPvP.cpp:423
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.h:750
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject *go)
Definition: OutdoorPvP.cpp:475
void SendObjectiveComplete(uint32 id, uint64 guid)
Definition: OutdoorPvP.cpp:403
virtual bool Update(uint32 diff)
Definition: OutdoorPvP.cpp:265
uint64 GetGUID() const
Definition: Object.h:177
uint8 GetTypeId() const
Definition: Object.h:192
PlayerSet m_activePlayers[2]
Definition: OutdoorPvP.h:143
struct GameObjectInfo::@59::@85 capturePoint
void AddObjectToRemoveList()
Definition: Object.cpp:2017
virtual void SendChangePhase()
Definition: OutdoorPvP.cpp:55
#define OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL
Definition: OutdoorPvPMgr.h:21
#define MAKE_NEW_GUID(l, e, h)
Definition: ObjectGuid.h:80
static Player * FindPlayer(uint64, bool force=false)
virtual void DeleteSpawns()
Definition: OutdoorPvP.cpp:209
etc mysql my cnf *Then change max_allowed_packet to a bigger value
bool AddCreature(uint32 type, uint32 entry, uint32 teamval, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay=0)
Definition: OutdoorPvP.cpp:105
void SendUpdateWorldState(uint32 field, uint32 value)
Definition: OutdoorPvP.cpp:393
virtual ~OutdoorPvP()
Definition: OutdoorPvP.cpp:232
GameObject * m_capturePoint
Definition: OutdoorPvP.h:126
void RegisterZone(uint32 zoneid)
Definition: OutdoorPvP.cpp:546
uint32 GetMapId() const
Definition: Object.h:567
bool PExecute(const char *format,...) ATTR_PRINTF(2
Definition: Database.cpp:441
Definition: Map.h:266
TeamId
virtual void HandlePlayerLeaveZone(Player *plr, uint32 zone)
Definition: OutdoorPvP.cpp:242
GroupReference * next()
std::map< uint32, uint64 > m_Objects
Definition: OutdoorPvP.h:163
void OnGameObjectRemove(GameObject *go)
Definition: OutdoorPvP.cpp:581
bool HasPlayer(Player *plr) const
Definition: OutdoorPvP.cpp:551
void OnGameObjectCreate(GameObject *go, bool add) override
Definition: OutdoorPvP.cpp:572
const char * GetName() const
Definition: Object.h:680
ACE_UINT64 uint64
Definition: Define.h:70
uint32 m_neutralValuePct
Definition: OutdoorPvP.h:156
std::map< uint64, uint32 > m_CreatureTypes
Definition: OutdoorPvP.h:166
void AddCre(uint32 type, uint32 guid, uint32 entry=0)
Definition: OutdoorPvP.cpp:81
GameobjectTypes GetGoType() const
Definition: GameObject.h:737
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
Definition: OutdoorPvP.cpp:491
GameObjectInfo const * GetGOInfo() const
Definition: GameObject.h:609
bool PlayerLogout() const
Definition: WorldSession.h:77
TeamId GetTeamId() const
Definition: Player.h:2067
void RemoveCorpse(bool setSpawnTime=true)
Definition: Creature.cpp:234
virtual bool HandlePlayerEnter(Player *plr)
Definition: OutdoorPvP.cpp:37
virtual void ChangeState()=0
virtual bool HandleOpenGo(Player *plr, uint64 guid)
Definition: OutdoorPvP.cpp:482
WorldSession * GetSession() const
Definition: Player.h:1947
virtual bool CanTalkTo(Player *plr, Creature *c, GossipMenuItems gso)
Definition: OutdoorPvP.cpp:523
uint32 GetDBTableGUIDLow() const
Definition: GameObject.h:624
std::map< uint32, uint64 > m_Creatures
Definition: OutdoorPvP.h:164
virtual bool Update(uint32 diff)
Definition: OutdoorPvP.cpp:254
ACE_UINT32 uint32
Definition: Define.h:71
bool DelCreature(uint32 type)
Definition: OutdoorPvP.cpp:141
void SendUpdateWorldState(uint32 field, uint32 value)
Definition: OutdoorPvP.cpp:386
ObjectiveStates m_OldState
Definition: OutdoorPvP.h:153
Definition: Unit.h:908
void DeleteSpawns()
Definition: OutdoorPvP.cpp:218
Definition: Player.h:923
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject *go)
Definition: OutdoorPvP.cpp:466
ObjectiveStates m_State
Definition: OutdoorPvP.h:154
void VisitNearbyWorldObject(const float &radius, NOTIFIER &notifier) const
Definition: Object.h:883
Definition: Group.h:154
virtual bool HandleDropFlag(Player *plr, uint32 spellId)
Definition: OutdoorPvP.cpp:509
void Delete()
Definition: GameObject.cpp:577
bool DelCapturePoint()
Definition: OutdoorPvP.cpp:195