OregonCore  revision fb2a440-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 <http://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  if (!player->IsWithinDistInMap(m_capturePoint, radius) || !player->IsOutdoorPvPActive())
279  HandlePlayerLeave(player);
280  }
281  }
282 
283  std::list<Player*> players;
286  m_capturePoint->VisitNearbyWorldObject(radius, searcher);
287 
288  for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
289  {
290  if ((*itr)->IsOutdoorPvPActive())
291  {
292  if (m_activePlayers[(*itr)->GetTeamId()].insert(*itr).second)
293  HandlePlayerEnter(*itr);
294  }
295  }
296 
297  // get the difference of numbers
298  float fact_diff = ((float)m_activePlayers[0].size() - (float)m_activePlayers[1].size()) * diff / OUTDOORPVP_OBJECTIVE_UPDATE_INTERVAL;
299  if (!fact_diff)
300  return false;
301 
302  uint32 Challenger = 0;
303  float maxDiff = m_maxSpeed * diff;
304 
305  if (fact_diff < 0)
306  {
307  // horde is in majority, but it's already horde-controlled -> no change
309  return false;
310 
311  if (fact_diff < -maxDiff)
312  fact_diff = -maxDiff;
313 
314  Challenger = HORDE;
315  }
316  else
317  {
318  // ally is in majority, but it's already ally-controlled -> no change
320  return false;
321 
322  if (fact_diff > maxDiff)
323  fact_diff = maxDiff;
324 
325  Challenger = ALLIANCE;
326  }
327 
328  float oldValue = m_value;
329  TeamId oldTeam = m_team;
330 
332 
333  m_value += fact_diff;
334 
335  if (m_value < -m_minValue) // red
336  {
337  if (m_value < -m_maxValue)
338  m_value = -m_maxValue;
340  m_team = TEAM_HORDE;
341  }
342  else if (m_value > m_minValue) // blue
343  {
344  if (m_value > m_maxValue)
348  }
349  else if (oldValue * m_value <= 0) // grey, go through mid point
350  {
351  // if challenger is ally, then n->a challenge
352  if (Challenger == ALLIANCE)
354  // if challenger is horde, then n->h challenge
355  else if (Challenger == HORDE)
358  }
359  else // grey, did not go through mid point
360  {
361  // old phase and current are on the same side, so one team challenges the other
367  }
368 
369  if (m_value != oldValue)
370  SendChangePhase();
371 
372  if (m_OldState != m_State)
373  {
374  //sLog.outError("%u->%u", m_OldState, m_State);
375  if (oldTeam != m_team)
376  ChangeTeam(oldTeam);
377  ChangeState();
378  return true;
379  }
380 
381  return false;
382 }
383 
385 {
386  for (int i = 0; i < 2; ++i)
387  for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
388  (*itr)->SendUpdateWorldState(field, value);
389 }
390 
392 {
393  for (uint32 team = 0; team < 2; ++team)
394  {
395  // send to all players present in the area
396  for (PlayerSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr)
397  (*itr)->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  (*itr)->KilledMonsterCredit(id, guid);
419 }
420 
421 void OutdoorPvP::HandleKill(Player* killer, Unit* killed)
422 {
423  if (Group* pGroup = killer->GetGroup())
424  {
425  for (GroupReference* itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
426  {
427  Player* pGroupGuy = itr->GetSource();
428 
429  if (!pGroupGuy)
430  continue;
431 
432  // skip if too far away
433  if (!pGroupGuy->IsAtGroupRewardDistance(killed))
434  continue;
435 
436  // creature kills must be notified, even if not inside objective / not outdoor pvp active
437  // player kills only count if active and inside objective
438  if ((pGroupGuy->IsOutdoorPvPActive() && IsInsideObjective(pGroupGuy)) || killed->GetTypeId() == TYPEID_UNIT)
439  HandleKillImpl(pGroupGuy, killed);
440  }
441  }
442  else
443  {
444  // creature kills must be notified, even if not inside objective / not outdoor pvp active
445  if (killer && ((killer->IsOutdoorPvPActive() && IsInsideObjective(killer)) || killed->GetTypeId() == TYPEID_UNIT))
446  HandleKillImpl(killer, killed);
447  }
448 }
449 
451 {
452  for (OPvPCapturePointMap::const_iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
453  if (itr->second->IsInsideObjective(plr))
454  return true;
455 
456  return false;
457 }
458 
460 {
461  return m_activePlayers[plr->GetTeamId()].find(plr) != m_activePlayers[plr->GetTeamId()].end();
462 }
463 
465 {
466  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
467  if (itr->second->HandleCustomSpell(plr, spellId, go))
468  return true;
469 
470  return false;
471 }
472 
474 {
475  if (!plr->IsOutdoorPvPActive())
476  return false;
477  return false;
478 }
479 
481 {
482  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
483  if (itr->second->HandleOpenGo(plr, guid) >= 0)
484  return true;
485 
486  return false;
487 }
488 
490 {
491  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
492  if (itr->second->HandleGossipOption(plr, guid, id))
493  return true;
494 
495  return false;
496 }
497 
499 {
500  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
501  if (itr->second->CanTalkTo(plr, c, gso))
502  return true;
503 
504  return false;
505 }
506 
508 {
509  for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
510  if (itr->second->HandleDropFlag(plr, id))
511  return true;
512 
513  return false;
514 }
515 
517 {
518  return false;
519 }
520 
522 {
523  return false;
524 }
525 
527 {
528  return false;
529 }
530 
532 {
533  std::map<uint64, uint32>::iterator itr = m_ObjectTypes.find(guid);
534  if (itr != m_ObjectTypes.end())
535  return itr->second;
536  return -1;
537 }
538 
539 bool OutdoorPvP::HandleAreaTrigger(Player* /*plr*/, uint32 /*trigger*/)
540 {
541  return false;
542 }
543 
545 {
546  sOutdoorPvPMgr.AddZone(zoneId, this);
547 }
548 
550 {
551  return m_players[plr->GetTeamId()].find(plr) != m_players[plr->GetTeamId()].end();
552 }
553 
555 {
556  if (spellId > 0)
557  for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
558  (*itr)->CastSpell(*itr, (uint32)spellId, true);
559  else
560  for (PlayerSet::iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
561  (*itr)->RemoveAurasDueToSpell((uint32) - spellId);
562 }
563 
564 void OutdoorPvP::TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2)
565 {
566  TeamCastSpell(team, spellId);
567  TeamCastSpell(OTHER_TEAM(team), spellId2 ? -(int32)spellId2 : -(int32)spellId);
568 }
569 
571 {
573  return;
574 
575  if (OPvPCapturePoint* cp = GetCapturePoint(go->GetDBTableGUIDLow()))
576  cp->m_capturePoint = add ? go : NULL;
577 }
578 
580 {
582  return;
583 
584  if (OPvPCapturePoint *cp = GetCapturePoint(go->GetDBTableGUIDLow()))
585  cp->m_capturePoint = NULL;
586 }
587 
bool IsInsideObjective(Player *plr) const
Definition: OutdoorPvP.cpp:459
void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2=0)
Definition: OutdoorPvP.cpp:564
Group * GetGroup()
Definition: Player.h:2577
void SetRespawnTime(uint32 respawn)
Definition: Creature.h:657
bool IsInsideObjective(Player *plr) const
Definition: OutdoorPvP.cpp:450
virtual void HandlePlayerEnterZone(Player *plr, uint32 zone)
Definition: OutdoorPvP.cpp:237
void TeamCastSpell(TeamId team, int32 spellId)
Definition: OutdoorPvP.cpp:554
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
Definition: OutdoorPvP.cpp:516
#define sOutdoorPvPMgr
Definition: OutdoorPvPMgr.h:79
void SendUpdateWorldState(uint32 Field, uint32 Value)
Definition: Player.cpp:7657
bool IsOutdoorPvPActive()
Definition: Player.cpp:6400
DatabaseType WorldDatabase
Accessor to the world database.
Definition: Main.cpp:53
virtual bool CanTalkTo(Player *plr, Creature *c, GossipMenuItems gso)
Definition: OutdoorPvP.cpp:498
uint32 GetDBTableGUIDLow() const
Definition: Creature.h:476
uint32 id
Definition: Creature.h:269
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:539
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:526
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:19935
void SetRespawnTime(int32 respawn)
Definition: GameObject.h:693
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:531
#define sObjectMgr
Definition: ObjectMgr.h:1285
virtual void HandleKill(Player *killer, Unit *killed)
Definition: OutdoorPvP.cpp:421
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.h:774
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject *go)
Definition: OutdoorPvP.cpp:473
void SendObjectiveComplete(uint32 id, uint64 guid)
Definition: OutdoorPvP.cpp:401
virtual bool Update(uint32 diff)
Definition: OutdoorPvP.cpp:265
uint8 GetTypeId() const
Definition: Object.h:210
PlayerSet m_activePlayers[2]
Definition: OutdoorPvP.h:143
struct GameObjectInfo::@59::@85 capturePoint
void AddObjectToRemoveList()
Definition: Object.cpp:1990
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
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:391
virtual ~OutdoorPvP()
Definition: OutdoorPvP.cpp:232
GameObject * m_capturePoint
Definition: OutdoorPvP.h:126
void RegisterZone(uint32 zoneid)
Definition: OutdoorPvP.cpp:544
uint32 GetMapId() const
Definition: Object.h:591
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:579
bool HasPlayer(Player *plr) const
Definition: OutdoorPvP.cpp:549
void OnGameObjectCreate(GameObject *go, bool add) override
Definition: OutdoorPvP.cpp:570
const char * GetName() const
Definition: Object.h:704
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:720
virtual bool HandleGossipOption(Player *plr, uint64 guid, uint32 gossipid)
Definition: OutdoorPvP.cpp:489
GameObjectInfo const * GetGOInfo() const
Definition: GameObject.h:592
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:480
WorldSession * GetSession() const
Definition: Player.h:1944
virtual bool CanTalkTo(Player *plr, Creature *c, GossipMenuItems gso)
Definition: OutdoorPvP.cpp:521
uint32 GetDBTableGUIDLow() const
Definition: GameObject.h:607
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:384
ObjectiveStates m_OldState
Definition: OutdoorPvP.h:153
Definition: Unit.h:908
void DeleteSpawns()
Definition: OutdoorPvP.cpp:218
Definition: Player.h:922
virtual bool HandleCustomSpell(Player *plr, uint32 spellId, GameObject *go)
Definition: OutdoorPvP.cpp:464
ObjectiveStates m_State
Definition: OutdoorPvP.h:154
void VisitNearbyWorldObject(const float &radius, NOTIFIER &notifier) const
Definition: Object.h:920
Definition: Group.h:154
virtual bool HandleDropFlag(Player *plr, uint32 spellId)
Definition: OutdoorPvP.cpp:507
void Delete()
Definition: GameObject.cpp:564
bool DelCapturePoint()
Definition: OutdoorPvP.cpp:195