OregonCore  revision fb2a440-git
Your Favourite TBC server
Battleground.h
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 #ifndef __BATTLEGROUND_H
19 #define __BATTLEGROUND_H
20 
21 #include "Common.h"
22 #include "WorldPacket.h"
23 #include "WorldSession.h"
24 #include "Opcodes.h"
25 #include "ObjectMgr.h"
26 #include "BattlegroundMgr.h"
27 #include "SharedDefines.h"
28 
30 {
35 };
36 
38 {
46 };
47 
49 {
54 };
55 
57 {
60 };
61 
63 {
64  SPELL_SUMMON_PET = 6962, // Pet Summoned
65  SPELL_WAITING_FOR_RESURRECT = 2584, // Waiting to Resurrect
66  SPELL_SPIRIT_HEAL_CHANNEL = 22011, // Spirit Heal Channel
67  SPELL_SPIRIT_HEAL = 22012, // Spirit Heal
68  SPELL_RESURRECTION_VISUAL = 24171, // Resurrection Impact Visual
69  SPELL_ARENA_PREPARATION = 32727, // use this one, 32728 not correct
74  SPELL_PREPARATION = 44521, // Preparation
75  SPELL_SPIRIT_HEAL_MANA = 44535, // Spirit Heal
76  SPELL_RECENTLY_DROPPED_FLAG = 42792, // Recently Dropped Flag
77  SPELL_AURA_PLAYER_INACTIVE = 43681 // Inactive
78 };
79 
81 {
83  RESURRECTION_INTERVAL = 30000, // ms
84  REMIND_INTERVAL = 30000, // ms
85  INVITE_ACCEPT_WAIT_TIME = 80000, // ms
86  TIME_TO_AUTOREMOVE = 120000, // ms
87  MAX_OFFLINE_TIME = 300000, // ms
88  RESPAWN_ONE_DAY = 86400, // secs
89  RESPAWN_IMMEDIATELY = 0, // secs
90  BUFF_RESPAWN_TIME = 180, // secs
91  BG_HONOR_SCORE_TICKS = 330 // points
92 };
93 
95 {
96  BG_START_DELAY_2M = 120000, // ms (2 minutes)
97  BG_START_DELAY_1M = 60000, // ms (1 minute)
98  BG_START_DELAY_30S = 30000, // ms (30 seconds)
99  BG_START_DELAY_15S = 15000, // ms (15 seconds) Used only in arena
101 };
102 
104 {
108 };
109 
111 
113 {
114  STATUS_NONE = 0, // first status, should mean bg is not instance
115  STATUS_WAIT_QUEUE = 1, // means bg is empty and waiting for queue
116  STATUS_WAIT_JOIN = 2, // this means, that BG has already started and it is waiting for more players
117  STATUS_IN_PROGRESS = 3, // means bg is running
118  STATUS_WAIT_LEAVE = 4 // means some faction has won BG and it is ending
119 };
120 
122 {
123  uint32 LastOnlineTime; // for tracking and removing offline players from queue after 5 minutes
124  uint32 Team; // Player's team
125 };
126 
128 {
129  BattlegroundObjectInfo() : object(NULL), timer(0), spellid(0) {}
130 
134 };
135 
136 #define MAX_QUEUED_PLAYERS_MAP 7
137 
139 {
148 };
149 #define MAX_BATTLEGROUND_TYPE_ID 8
150 
151 // handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
153 {
161 };
162 
164 {
169  //EY, but in MSG_PVP_LOG_DATA opcode!
172  //WS
175  //AB
178  //AV
186  // TODO : implement them
187 };
188 
190 {
194 };
195 
197 {
200 };
201 
203 {
207 };
208 
210 {
213 };
214 #define BG_TEAMS_COUNT 2
215 
217 {
223 };
224 
226 {
231 };
232 #define BG_STARTING_EVENT_COUNT 4
233 
235 {
246 };
247 
249 {
250  public:
251  BattlegroundScore() : KillingBlows(0), Deaths(0), HonorableKills(0),
252  BonusHonor(0), DamageDone(0), HealingDone(0)
253  {}
254  virtual ~BattlegroundScore() {} //virtual destructor is used when deleting score from scores map
255 
262 };
263 
265 {
269 };
270 
271 /*
272 This class is used to:
273 1. Add player to battleground
274 2. Remove player from battleground
275 3. some certain cases, same for all battlegrounds
276 4. It has properties same for all battlegrounds
277 */
279 {
280  friend class BattlegroundMgr;
281 
282  public:
283  /* Construction */
284  Battleground();
285  /*Battleground(const Battleground& bg);*/
286  virtual ~Battleground();
287  virtual void Update(uint32 diff); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
288  virtual bool SetupBattleground() // must be implemented in BG subclass
289  {
290  return true;
291  }
292  void Reset(); // resets all common properties for battlegrounds
293  virtual void StartingEventCloseDoors() {}
294  virtual void StartingEventOpenDoors() {}
295  virtual void ResetBGSubclass() // must be implemented in BG subclass
296  {
297  }
298 
299  /* Battleground */
300  // Get methods:
301  char const* GetName() const
302  {
303  return m_Name;
304  }
306  {
307  return m_TypeID;
308  }
310  {
311  return m_Queue_type;
312  }
314  {
315  return m_InstanceID;
316  }
318  {
319  return m_Status;
320  }
322  {
323  return m_StartTime;
324  }
326  {
327  return m_EndTime;
328  }
330  {
331  return m_LastResurrectTime;
332  }
334  {
335  return m_MaxPlayers;
336  }
338  {
339  return m_MinPlayers;
340  }
341 
343  {
344  return m_LevelMin;
345  }
347  {
348  return m_LevelMax;
349  }
350 
352  {
353  return m_MaxPlayersPerTeam;
354  }
356  {
357  return m_MinPlayersPerTeam;
358  }
359 
360  int GetStartDelayTime() const
361  {
362  return m_StartDelayTime;
363  }
365  {
366  return m_ArenaType;
367  }
368  uint8 GetWinner() const
369  {
370  return m_Winner;
371  }
372  uint32 GetBattlemasterEntry() const;
373 
374  // Set methods:
375  void SetName(char const* Name)
376  {
377  m_Name = Name;
378  }
380  {
381  m_TypeID = TypeID;
382  }
384  {
385  m_Queue_type = ID;
386  }
387  void SetInstanceID(uint32 InstanceID)
388  {
389  m_InstanceID = InstanceID;
390  }
391  void SetStatus(uint32 Status)
392  {
393  m_Status = Status;
394  }
395  void SetStartTime(uint32 Time)
396  {
397  m_StartTime = Time;
398  }
399  void SetEndTime(uint32 Time)
400  {
401  m_EndTime = Time;
402  }
404  {
405  m_LastResurrectTime = Time;
406  }
407  void SetMaxPlayers(uint32 MaxPlayers)
408  {
409  m_MaxPlayers = MaxPlayers;
410  }
411  void SetMinPlayers(uint32 MinPlayers)
412  {
413  m_MinPlayers = MinPlayers;
414  }
415  void SetLevelRange(uint32 min, uint32 max)
416  {
417  m_LevelMin = min;
418  m_LevelMax = max;
419  }
420  void SetRated(bool state)
421  {
422  m_IsRated = state;
423  }
424  void SetArenaType(uint8 type)
425  {
426  m_ArenaType = type;
427  }
428  void SetArenaorBGType(bool _isArena)
429  {
430  m_IsArena = _isArena;
431  }
432  void SetWinner(uint8 winner)
433  {
434  m_Winner = winner;
435  }
436 
437  void ModifyStartDelayTime(int diff)
438  {
439  m_StartDelayTime -= diff;
440  }
441  void SetStartDelayTime(int Time)
442  {
443  m_StartDelayTime = Time;
444  }
445 
446  void SetMaxPlayersPerTeam(uint32 MaxPlayers)
447  {
448  m_MaxPlayersPerTeam = MaxPlayers;
449  }
450  void SetMinPlayersPerTeam(uint32 MinPlayers)
451  {
452  m_MinPlayersPerTeam = MinPlayers;
453  }
454 
455  void AddToBGFreeSlotQueue(); //this queue will be useful when more battlegrounds instances will be available
456  void RemoveFromBGFreeSlotQueue(); //this method could delete whole BG instance, if another free is available
457 
458  void _CheckSafePositions(uint32 diff);
459  void SetStartMaxDist(float startMaxDist) { m_StartMaxDist = startMaxDist; }
460  float GetStartMaxDist() const { return m_StartMaxDist; }
461 
463  {
464  (team == ALLIANCE) ? --m_InvitedAlliance : --m_InvitedHorde;
465  }
467  {
468  (team == ALLIANCE) ? ++m_InvitedAlliance : ++m_InvitedHorde;
469  }
471  {
472  if (team == ALLIANCE)
473  return m_InvitedAlliance;
474  else
475  return m_InvitedHorde;
476  }
477  bool HasFreeSlotsForTeam(uint32 Team) const;
478  bool HasFreeSlots() const;
479  uint32 GetFreeSlotsForTeam(uint32 Team) const;
480 
481  bool isArena() const
482  {
483  return m_IsArena;
484  }
485  bool isBattleground() const
486  {
487  return !m_IsArena;
488  }
489  bool isRated() const
490  {
491  return m_IsRated;
492  }
493 
494  typedef std::map<uint64, BattlegroundPlayer> BattlegroundPlayerMap;
495  BattlegroundPlayerMap const& GetPlayers() const
496  {
497  return m_Players;
498  }
500  {
501  return m_Players.size();
502  }
504  {
505  return m_RemovedPlayers.size();
506  }
507 
508  typedef std::map<uint64, BattlegroundScore*> BattlegroundScoreMap;
509  BattlegroundScoreMap::const_iterator GetPlayerScoresBegin() const
510  {
511  return m_PlayerScores.begin();
512  }
513  BattlegroundScoreMap::const_iterator GetPlayerScoresEnd() const
514  {
515  return m_PlayerScores.end();
516  }
518  {
519  return m_PlayerScores.size();
520  }
521 
523  {
524  return m_ReviveQueue.size();
525  }
526 
527  void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid);
528  void RemovePlayerFromResurrectQueue(uint64 player_guid);
529 
530  void StartBattleground();
531 
532  GameObject* GetBGObject(uint32 type);
533  Creature* GetBGCreature(uint32 type);
534  /* Location */
535  void SetMapId(uint32 MapID)
536  {
537  m_MapId = MapID;
538  }
539  uint32 GetMapId() const
540  {
541  return m_MapId;
542  }
543 
544  /* Map pointers */
546  {
547  m_Map = map;
548  }
550  {
551  ASSERT(m_Map);
552  return m_Map;
553  }
554 
555  void SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O);
556  void GetTeamStartLoc(uint32 TeamID, float& X, float& Y, float& Z, float& O) const
557  {
558  uint8 idx = GetTeamIndexByTeamId(TeamID);
559  X = m_TeamStartLocX[idx];
560  Y = m_TeamStartLocY[idx];
561  Z = m_TeamStartLocZ[idx];
562  O = m_TeamStartLocO[idx];
563  }
564 
565  /* Packet Transfer */
566  // method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
567  virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
568  void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
569  void SendPacketToAll(WorldPacket* packet);
570  void YellToAll(Creature* creature, const char* text, uint32 language);
571 
572  template<class Do>
573  void BroadcastWorker(Do& _do);
574 
575  void PlaySoundToTeam(uint32 SoundID, uint32 TeamID);
576  void PlaySoundToAll(uint32 SoundID);
577  void CastSpellOnTeam(uint32 SpellID, uint32 TeamID);
578  void RewardHonorToTeam(uint32 Honor, uint32 TeamID);
579  void RewardReputationToTeam(uint32 faction_id, uint32 Reputation, uint32 TeamID);
580  void RewardMark(Player* plr, uint32 count);
581  void SendRewardMarkByMail(Player* plr, uint32 mark, uint32 count);
582  void RewardQuest(Player* plr);
583  void UpdateWorldState(uint32 Field, uint32 Value);
584  void UpdateWorldStateForPlayer(uint32 Field, uint32 Value, Player* Source);
585  void EndBattleground(uint32 winner);
586  void BlockMovement(Player* plr);
587 
588  void SendMessageToAll(int32 entry, ChatMsg type, Player const* source = NULL);
589  void PSendMessageToAll(int32 entry, ChatMsg type, Player const* source, ...);
590 
591  // specialized version with 2 string id args
592  void SendMessage2ToAll(int32 entry, ChatMsg type, Player const* source, int32 strId1 = 0, int32 strId2 = 0);
593 
594  /* Raid Group */
595  Group* GetBgRaid(uint32 TeamID) const
596  {
597  return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE];
598  }
599  void SetBgRaid(uint32 TeamID, Group* bg_raid)
600  {
601  Group*& old_raid = TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE];
602  if (old_raid) old_raid->SetBattlegroundGroup(NULL);
603  if (bg_raid) bg_raid->SetBattlegroundGroup(this);
604  old_raid = bg_raid;
605  }
606 
607  virtual void UpdatePlayerScore(Player* Source, uint32 type, uint32 value);
608 
610  {
611  return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE;
612  }
614  {
615  return m_PlayersCount[GetTeamIndexByTeamId(Team)];
616  }
617  uint32 GetAlivePlayersCountByTeam(uint32 Team) const; // used in arenas to correctly handle death in spirit of redemption (killer = killed) cases
618  void UpdatePlayersCountByTeam(uint32 Team, bool remove)
619  {
620  if (remove)
621  --m_PlayersCount[GetTeamIndexByTeamId(Team)];
622  else
623  ++m_PlayersCount[GetTeamIndexByTeamId(Team)];
624  }
625 
626  // used for rated arena battles
627  void SetArenaTeamIdForTeam(uint32 Team, uint32 ArenaTeamId)
628  {
629  m_ArenaTeamIds[GetTeamIndexByTeamId(Team)] = ArenaTeamId;
630  }
632  {
633  return m_ArenaTeamIds[GetTeamIndexByTeamId(Team)];
634  }
636  {
637  m_ArenaTeamRatingChanges[GetTeamIndexByTeamId(Team)] = RatingChange;
638  }
640  {
641  return m_ArenaTeamRatingChanges[GetTeamIndexByTeamId(Team)];
642  }
643  void CheckArenaWinConditions();
644 
645  /* Triggers handle */
646  // must be implemented in BG subclass
647  virtual void HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/) {}
648  // must be implemented in BG subclass if need AND call base class generic code
649  virtual void HandleKillPlayer(Player* player, Player* killer);
650  virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/);
651 
652  /* Battleground events */
653  virtual void EventPlayerDroppedFlag(Player* /*player*/) {}
654  virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {}
655  virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
656  void EventPlayerLoggedOut(Player* player);
657 
658  /* Death related */
659  virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
660 
661  virtual void AddPlayer(Player* plr); // must be implemented in BG subclass
662 
663  virtual void RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPacket);
664  // can be extended in in BG subclass
665 
666  void HandleTriggerBuff(uint64 const& go_guid);
667  void SetHoliday(bool is_holiday);
668 
669  // @todo make this protected:
670  typedef std::vector<uint64> BGObjects;
671  typedef std::vector<uint64> BGCreatures;
672  BGObjects m_BgObjects;
673  BGCreatures m_BgCreatures;
674  void SpawnBGObject(uint32 type, uint32 respawntime);
675  bool AddObject(uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime = 0);
676  // void SpawnBGCreature(uint32 type, uint32 respawntime);
677  Creature* AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime = 0);
678  bool DelCreature(uint32 type);
679  bool DelObject(uint32 type);
680  bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, uint32 team);
681  int32 GetObjectType(uint64 guid);
682 
683  void DoorOpen(uint32 type);
684  void DoorClose(uint32 type);
685  const char* GetOregonString(int32 entry);
686 
687  virtual bool HandlePlayerUnderMap(Player* /*plr*/)
688  {
689  return false;
690  }
691 
692  // since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
693  uint32 GetPlayerTeam(uint64 guid);
694  uint32 GetOtherTeam(uint32 teamId);
695  bool IsPlayerInBattleground(uint64 guid);
696  void PlayerRelogin(uint64 guid);
697 
699  {
700  m_SetDeleteThis = true;
701  }
702 
703  /* virtual score-array - get's used in bg-subclasses */
704  int32 m_TeamScores[BG_TEAMS_COUNT];
705 
706  void Announce();
707 
708  protected:
709  //this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground
710  void EndNow();
711 
712  /* Scorekeeping */
713  BattlegroundScoreMap m_PlayerScores; // Player scores
714  // must be implemented in BG subclass
715  virtual void RemovePlayer(Player* /*player*/, uint64 /*guid*/) {}
716 
717  /* Player lists, those need to be accessible by inherited classes */
718  BattlegroundPlayerMap m_Players;
719  // Spirit Guide guid + Player list GUIDS
720  std::map<uint64, std::vector<uint64> > m_ReviveQueue;
721 
722  /*
723  these are important variables used for starting messages
724  */
727  //this must be filled in constructors!
728  uint32 m_StartMessageIds[BG_STARTING_EVENT_COUNT];
729 
731  uint32 m_score[2]; //array that keeps general team scores, used to determine who gets most marks when bg ends prematurely
732 
734  private:
735  /* Battleground */
736  uint32 m_TypeID; //Battleground type, defined in enum BattlegroundTypeId
737  uint32 m_InstanceID; //Battleground Instance's GUID!
744  uint8 m_ArenaType; // 2=2v2, 3=3v3, 5=5v5
745  bool m_InBGFreeSlotQueue; // used to make sure that BG is only once inserted into the BattlegroundMgr.BGFreeSlotQueue[bgTypeId] deque
746  bool m_SetDeleteThis; // used for safe deletion of the bg after end / all players leave
747  // this variable is not used .... it can be found in many other ways... but to store it in BG object instance is useless
748  //uint8 m_BattlegroundType; // 3=BG, 4=arena
749  //instead of uint8 (in previous line) is bool used
750  bool m_IsArena;
751  uint8 m_Winner; // 0=alliance, 1=horde, 2=none
753  bool m_IsRated; // is this battle rated?
756  char const* m_Name;
757 
758  /* Player lists */
759  std::vector<uint64> m_ResurrectQueue; // Player GUID
760  std::map<uint64, uint8> m_RemovedPlayers; // uint8 is remove type (0 - bgqueue, 1 - bg, 2 - resurrect queue)
761 
762  /* Invited counters are useful for player invitation to BG - do not allow, if BG is started to one faction to have 2 more players than another faction */
763  /* Invited counters will be changed only when removing already invited player from queue, removing player from battleground and inviting player to BG */
764  /* Invited players counters*/
767 
768  /* Raid Group */
769  Group* m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde
770 
771  /* Players count by team */
772  uint32 m_PlayersCount[BG_TEAMS_COUNT];
773 
774  /* Arena team ids by team */
775  uint32 m_ArenaTeamIds[BG_TEAMS_COUNT];
776 
777  int32 m_ArenaTeamRatingChanges[BG_TEAMS_COUNT];
778 
779  /* Limits */
786 
787  /* Start location */
790  float m_TeamStartLocX[BG_TEAMS_COUNT];
791  float m_TeamStartLocY[BG_TEAMS_COUNT];
792  float m_TeamStartLocZ[BG_TEAMS_COUNT];
793  float m_TeamStartLocO[BG_TEAMS_COUNT];
795 };
796 #endif
797 
uint32 m_MinPlayersPerTeam
Definition: Battleground.h:784
uint32 GetMinPlayersPerTeam() const
Definition: Battleground.h:355
std::map< uint64, BattlegroundScore * > BattlegroundScoreMap
Definition: Battleground.h:508
BattlegroundType
Definition: Battleground.h:196
int32 m_StartDelayTime
Definition: Battleground.h:752
ArenaType
Definition: Battleground.h:189
uint32 GetPlayersSize() const
Definition: Battleground.h:499
BattlegroundJoinError
Definition: Battleground.h:234
virtual void HandleAreaTrigger(Player *, uint32)
Definition: Battleground.h:647
virtual void ResetBGSubclass()
Definition: Battleground.h:295
void SetMinPlayersPerTeam(uint32 MinPlayers)
Definition: Battleground.h:450
BattlegroundQueueTypeId
Definition: Battleground.h:152
void SetMaxPlayersPerTeam(uint32 MaxPlayers)
Definition: Battleground.h:446
void DecreaseInvitedCount(uint32 team)
Definition: Battleground.h:462
uint32 GetEndTime() const
Definition: Battleground.h:325
std::map< uint64, std::vector< uint64 > > m_ReviveQueue
Definition: Battleground.h:720
void SetStartDelayTime(int Time)
Definition: Battleground.h:441
BattlegroundQuests
Definition: Battleground.h:37
uint8 GetWinner() const
Definition: Battleground.h:368
uint32 m_EndTime
Definition: Battleground.h:741
void SetQueueType(uint32 ID)
Definition: Battleground.h:383
uint32 m_ValidStartPositionTimer
Definition: Battleground.h:740
char const * m_Name
Definition: Battleground.h:756
Definition: Field.h:24
void SetDeleteThis()
Definition: Battleground.h:698
void SetBgRaid(uint32 TeamID, Group *bg_raid)
Definition: Battleground.h:599
BattlegroundStartingEventsIds
Definition: Battleground.h:225
uint32 m_PrematureCountDownTimer
Definition: Battleground.h:755
void SetArenaType(uint8 type)
Definition: Battleground.h:424
uint32 GetMinPlayers() const
Definition: Battleground.h:337
virtual ~BattlegroundScore()
Definition: Battleground.h:254
ChatMsg
float GetStartMaxDist() const
Definition: Battleground.h:460
BattlegroundPlayerMap m_Players
Definition: Battleground.h:718
ACE_INT32 int32
Definition: Define.h:67
bool m_PrematureCountDown
Definition: Battleground.h:754
BattlegroundTimeIntervals
Definition: Battleground.h:80
uint32 GetPlayerScoresSize() const
Definition: Battleground.h:517
BattlegroundPlayerMap const & GetPlayers() const
Definition: Battleground.h:495
BGHonorMode
Definition: Battleground.h:264
uint32 m_LevelMin
Definition: Battleground.h:780
uint32 m_InvitedHorde
Definition: Battleground.h:766
BattlegroundBuffObjects
Definition: Battleground.h:103
uint32 m_MaxPlayersPerTeam
Definition: Battleground.h:782
uint32 GetReviveQueueSize() const
Definition: Battleground.h:522
uint32 GetStatus() const
Definition: Battleground.h:317
BattlegroundSpells
Definition: Battleground.h:62
BattlegroundScoreMap m_PlayerScores
Definition: Battleground.h:713
uint32 m_StartTime
Definition: Battleground.h:739
BattlegroundStatus
Definition: Battleground.h:112
void SetInstanceID(uint32 InstanceID)
Definition: Battleground.h:387
uint8 GetTeamIndexByTeamId(uint32 Team) const
Definition: Battleground.h:609
void SetLastResurrectTime(uint32 Time)
Definition: Battleground.h:403
BattlegroundMarksCount
Definition: Battleground.h:56
uint32 m_MapId
Definition: Battleground.h:788
uint32 m_TypeID
Definition: Battleground.h:736
void SetStartMaxDist(float startMaxDist)
Definition: Battleground.h:459
bool isRated() const
Definition: Battleground.h:489
BGCreatures m_BgCreatures
Definition: Battleground.h:673
uint32 GetInvitedCount(uint32 team) const
Definition: Battleground.h:470
bool isArena() const
Definition: Battleground.h:481
std::map< uint64, BattlegroundPlayer > BattlegroundPlayerMap
Definition: Battleground.h:494
virtual void FillInitialWorldStates(WorldPacket &)
Definition: Battleground.h:567
virtual void StartingEventOpenDoors()
Definition: Battleground.h:294
virtual void EventPlayerCapturedFlag(Player *)
Definition: Battleground.h:655
virtual bool SetupBattleground()
Definition: Battleground.h:288
uint32 m_Queue_type
Definition: Battleground.h:743
BattlegroundMap * GetBgMap()
Definition: Battleground.h:549
BattlegroundScoreMap::const_iterator GetPlayerScoresBegin() const
Definition: Battleground.h:509
void SetEndTime(uint32 Time)
Definition: Battleground.h:399
Team
void SetArenaTeamRatingChangeForTeam(uint32 Team, int32 RatingChange)
Definition: Battleground.h:635
ACE_UINT8 uint8
Definition: Define.h:73
BGObjects m_BgObjects
Definition: Battleground.h:672
uint32 m_InstanceID
Definition: Battleground.h:737
uint8 GetArenaType() const
Definition: Battleground.h:364
uint32 GetQueueType() const
Definition: Battleground.h:309
void SetLevelRange(uint32 min, uint32 max)
Definition: Battleground.h:415
uint32 m_MinPlayers
Definition: Battleground.h:785
uint32 m_MaxPlayers
Definition: Battleground.h:783
uint32 m_LastResurrectTime
Definition: Battleground.h:742
BattlegroundTypeId
Definition: Battleground.h:138
BattlegroundStartingEvents
Definition: Battleground.h:216
uint8 m_ArenaType
Definition: Battleground.h:744
#define BG_TEAMS_COUNT
Definition: Battleground.h:214
int32 GetArenaTeamRatingChangeForTeam(uint32 Team) const
Definition: Battleground.h:639
virtual void StartingEventCloseDoors()
Definition: Battleground.h:293
std::vector< uint64 > BGCreatures
Definition: Battleground.h:671
uint32 GetArenaTeamIdForTeam(uint32 Team) const
Definition: Battleground.h:631
void SetBgMap(BattlegroundMap *map)
Definition: Battleground.h:545
etc mysql my cnf *Then change max_allowed_packet to a bigger value
std::vector< uint64 > BGObjects
Definition: Battleground.h:670
void SetArenaorBGType(bool _isArena)
Definition: Battleground.h:428
void SetMapId(uint32 MapID)
Definition: Battleground.h:535
virtual void EventPlayerClickedOnFlag(Player *, GameObject *)
Definition: Battleground.h:654
BattlegroundTeamId
Definition: Battleground.h:209
bool isBattleground() const
Definition: Battleground.h:485
virtual void RemovePlayer(Player *, uint64)
Definition: Battleground.h:715
BattlegroundScoreMap::const_iterator GetPlayerScoresEnd() const
Definition: Battleground.h:513
void SetRated(bool state)
Definition: Battleground.h:420
uint32 m_InvitedAlliance
Definition: Battleground.h:765
uint32 GetMaxLevel() const
Definition: Battleground.h:346
uint32 GetInstanceID() const
Definition: Battleground.h:313
void SetName(char const *Name)
Definition: Battleground.h:375
TypeID
Definition: ObjectGuid.h:24
ScoreType
Definition: Battleground.h:163
uint32 GetRemovedPlayersSize() const
Definition: Battleground.h:503
BattlegroundMap * m_Map
Definition: Battleground.h:789
ACE_UINT64 uint64
Definition: Define.h:70
bool m_SetDeleteThis
Definition: Battleground.h:746
void IncreaseInvitedCount(uint32 team)
Definition: Battleground.h:466
uint32 GetTypeID() const
Definition: Battleground.h:305
void Update(uint32 diff)
BattlegroundStartTimeIntervals
Definition: Battleground.h:94
void SetWinner(uint8 winner)
Definition: Battleground.h:432
void SetStartTime(uint32 Time)
Definition: Battleground.h:395
uint32 GetStartTime() const
Definition: Battleground.h:321
virtual void EventPlayerDroppedFlag(Player *)
Definition: Battleground.h:653
uint32 GetMaxPlayersPerTeam() const
Definition: Battleground.h:351
void GetTeamStartLoc(uint32 TeamID, float &X, float &Y, float &Z, float &O) const
Definition: Battleground.h:556
BattlegroundSounds
Definition: Battleground.h:29
bool m_InBGFreeSlotQueue
Definition: Battleground.h:745
uint32 m_Status
Definition: Battleground.h:738
void SetBattlegroundGroup(Battleground *bg)
Definition: Group.h:326
void SetArenaTeamIdForTeam(uint32 Team, uint32 ArenaTeamId)
Definition: Battleground.h:627
void SetStatus(uint32 Status)
Definition: Battleground.h:391
char const * GetName() const
Definition: Battleground.h:301
#define ASSERT
Definition: Errors.h:29
uint32 m_LevelMax
Definition: Battleground.h:781
BattlegroundMarks
Definition: Battleground.h:48
uint32 GetMapId() const
Definition: Battleground.h:539
#define BG_STARTING_EVENT_COUNT
Definition: Battleground.h:232
uint32 GetLastResurrectTime() const
Definition: Battleground.h:329
uint32 GetMaxPlayers() const
Definition: Battleground.h:333
uint32 GetMinLevel() const
Definition: Battleground.h:342
ACE_UINT32 uint32
Definition: Define.h:71
const uint32 Buff_Entries[3]
Definition: Battleground.h:110
uint32 GetPlayersCountByTeam(uint32 Team) const
Definition: Battleground.h:613
void ModifyStartDelayTime(int diff)
Definition: Battleground.h:437
void SetMaxPlayers(uint32 MaxPlayers)
Definition: Battleground.h:407
Definition: Player.h:922
void UpdatePlayersCountByTeam(uint32 Team, bool remove)
Definition: Battleground.h:618
std::map< uint64, uint8 > m_RemovedPlayers
Definition: Battleground.h:760
BattlegroundWinner
Definition: Battleground.h:202
void SetTypeID(uint32 TypeID)
Definition: Battleground.h:379
Group * GetBgRaid(uint32 TeamID) const
Definition: Battleground.h:595
Definition: Group.h:154
void SetMinPlayers(uint32 MinPlayers)
Definition: Battleground.h:411
float m_StartMaxDist
Definition: Battleground.h:794
virtual bool HandlePlayerUnderMap(Player *)
Definition: Battleground.h:687
std::vector< uint64 > m_ResurrectQueue
Definition: Battleground.h:759
BGHonorMode m_HonorMode
Definition: Battleground.h:733
int GetStartDelayTime() const
Definition: Battleground.h:360