root/trunk/src/game/BattleGround.h @ 9

Revision 9, 22.0 kB (checked in by yumileroy, 17 years ago)

[svn] -enabled instantiated battlegrounds
-enabled arena matches
-rewritten battleground queuing to support joining as group
-removed queue announcements

Original author: w12x
Date: 2008-10-05 08:48:32-05:00

Line 
1/*
2 * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18
19#ifndef __BATTLEGROUND_H
20#define __BATTLEGROUND_H
21
22#include "Common.h"
23#include "WorldPacket.h"
24#include "WorldSession.h"
25#include "Opcodes.h"
26#include "ObjectMgr.h"
27#include "BattleGroundMgr.h"
28#include "SharedDefines.h"
29
30enum BattleGroundSounds
31{
32    SOUND_HORDE_WINS                = 8454,
33    SOUND_ALLIANCE_WINS             = 8455,
34    SOUND_BG_START                  = 3439
35};
36
37enum BattleGroundQuests
38{
39    SPELL_WS_QUEST_REWARD           = 43483,
40    SPELL_AB_QUEST_REWARD           = 43484,
41    SPELL_AV_QUEST_REWARD           = 43475,
42    SPELL_AV_QUEST_KILLED_BOSS      = 23658,
43    SPELL_EY_QUEST_REWARD           = 43477,
44    SPELL_AB_QUEST_REWARD_4_BASES   = 24061,
45    SPELL_AB_QUEST_REWARD_5_BASES   = 24064
46};
47
48enum BattleGroundMarks
49{
50    SPELL_WS_MARK_LOSER             = 24950,
51    SPELL_WS_MARK_WINNER            = 24951,
52    SPELL_AB_MARK_LOSER             = 24952,
53    SPELL_AB_MARK_WINNER            = 24953,
54    SPELL_AV_MARK_LOSER             = 24954,
55    SPELL_AV_MARK_WINNER            = 24955,
56    ITEM_EY_MARK_OF_HONOR           = 29024
57};
58
59enum BattleGroundMarksCount
60{
61    ITEM_WINNER_COUNT               = 3,
62    ITEM_LOSER_COUNT                = 1
63};
64
65enum BattleGroundSpells
66{
67    SPELL_WAITING_FOR_RESURRECT     = 2584,                 // Waiting to Resurrect
68    SPELL_SPIRIT_HEAL_CHANNEL       = 22011,                // Spirit Heal Channel
69    SPELL_SPIRIT_HEAL               = 22012,                // Spirit Heal
70    SPELL_RESURRECTION_VISUAL       = 24171,                // Resurrection Impact Visual
71    SPELL_ARENA_PREPARATION         = 32727,                // use this one, 32728 not correct
72    SPELL_ALLIANCE_GOLD_FLAG        = 32724,
73    SPELL_ALLIANCE_GREEN_FLAG       = 32725,
74    SPELL_HORDE_GOLD_FLAG           = 35774,
75    SPELL_HORDE_GREEN_FLAG          = 35775,
76    SPELL_PREPARATION               = 44521,                // Preparation
77    SPELL_SPIRIT_HEAL_MANA          = 44535,                // Spirit Heal
78    SPELL_RECENTLY_DROPPED_FLAG     = 42792,                // Recently Dropped Flag
79    SPELL_AURA_PLAYER_INACTIVE      = 43681                 // Inactive
80};
81
82enum BattleGroundTimeIntervals
83{
84    RESURRECTION_INTERVAL           = 30000,                // ms
85    REMIND_INTERVAL                 = 30000,                // ms
86    INVITE_ACCEPT_WAIT_TIME         = 120000,               // ms
87    TIME_TO_AUTOREMOVE              = 120000,               // ms
88    MAX_OFFLINE_TIME                = 300000,               // ms
89    START_DELAY0                    = 120000,               // ms
90    START_DELAY1                    = 60000,                // ms
91    START_DELAY2                    = 30000,                // ms
92    START_DELAY3                    = 15000,                // ms used only in arena
93    RESPAWN_ONE_DAY                 = 86400,                // secs
94    RESPAWN_IMMEDIATELY             = 0,                    // secs
95    BUFF_RESPAWN_TIME               = 180,                  // secs
96    BG_HONOR_SCORE_TICKS            = 330                   // points
97};
98
99enum BattleGroundBuffObjects
100{
101    BG_OBJECTID_SPEEDBUFF_ENTRY     = 179871,
102    BG_OBJECTID_REGENBUFF_ENTRY     = 179904,
103    BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905
104};
105
106const uint32 Buff_Entries[3] = { BG_OBJECTID_SPEEDBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY };
107
108enum BattleGroundStatus
109{
110    STATUS_NONE         = 0,
111    STATUS_WAIT_QUEUE   = 1,
112    STATUS_WAIT_JOIN    = 2,
113    STATUS_IN_PROGRESS  = 3,
114    STATUS_WAIT_LEAVE   = 4                                 // custom
115};
116
117struct BattleGroundPlayer
118{
119    uint32  LastOnlineTime;                                 // for tracking and removing offline players from queue after 5 minutes
120    uint32  Team;                                           // Player's team
121};
122
123struct BattleGroundObjectInfo
124{
125    BattleGroundObjectInfo() : object(NULL), timer(0), spellid(0) {}
126
127    GameObject  *object;
128    int32       timer;
129    uint32      spellid;
130};
131
132#define MAX_QUEUED_PLAYERS_MAP 7
133
134enum BattleGroundTypeId
135{
136    BATTLEGROUND_AV     = 1,
137    BATTLEGROUND_WS     = 2,
138    BATTLEGROUND_AB     = 3,
139    BATTLEGROUND_NA     = 4,
140    BATTLEGROUND_BE     = 5,
141    BATTLEGROUND_AA     = 6,
142    BATTLEGROUND_EY     = 7,
143    BATTLEGROUND_RL     = 8
144};
145
146// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
147enum BattleGroundQueueTypeId
148{
149    BATTLEGROUND_QUEUE_AV     = 1,
150    BATTLEGROUND_QUEUE_WS     = 2,
151    BATTLEGROUND_QUEUE_AB     = 3,
152    BATTLEGROUND_QUEUE_EY     = 4,
153    BATTLEGROUND_QUEUE_2v2     = 5,
154    BATTLEGROUND_QUEUE_3v3     = 6,
155    BATTLEGROUND_QUEUE_5v5     = 7,
156};
157
158enum ScoreType
159{
160    SCORE_KILLING_BLOWS         = 1,
161    SCORE_DEATHS                = 2,
162    SCORE_HONORABLE_KILLS       = 3,
163    SCORE_BONUS_HONOR           = 4,
164    //EY, but in MSG_PVP_LOG_DATA opcode!
165    SCORE_DAMAGE_DONE           = 5,
166    SCORE_HEALING_DONE          = 6,
167    //WS
168    SCORE_FLAG_CAPTURES         = 7,
169    SCORE_FLAG_RETURNS          = 8,
170    //AB
171    SCORE_BASES_ASSAULTED       = 9,
172    SCORE_BASES_DEFENDED        = 10,
173    //AV
174    SCORE_GRAVEYARDS_ASSAULTED  = 11,
175    SCORE_GRAVEYARDS_DEFENDED   = 12,
176    SCORE_TOWERS_ASSAULTED      = 13,
177    SCORE_TOWERS_DEFENDED       = 14,
178    SCORE_MINES_CAPTURED        = 15,
179    SCORE_LEADERS_KILLED        = 16,
180    SCORE_SECONDARY_OBJECTIVES  = 17
181    // TODO : implement them
182};
183
184enum ArenaType
185{
186    ARENA_TYPE_2v2          = 2,
187    ARENA_TYPE_3v3          = 3,
188    ARENA_TYPE_5v5          = 5
189};
190
191enum BattleGroundType
192{
193    TYPE_BATTLEGROUND     = 3,
194    TYPE_ARENA            = 4
195};
196
197enum BattleGroundWinner
198{
199    WINNER_HORDE            = 0,
200    WINNER_ALLIANCE         = 1,
201    WINNER_NONE             = 2
202};
203
204enum BattleGroundTeamId
205{
206    BG_TEAM_ALLIANCE        = 0,
207    BG_TEAM_HORDE           = 1
208};
209
210enum BattleGroundJoinError
211{
212    BG_JOIN_ERR_OK = 0,
213    BG_JOIN_ERR_OFFLINE_MEMBER = 1,
214    BG_JOIN_ERR_GROUP_TOO_MANY = 2,
215    BG_JOIN_ERR_MIXED_FACTION = 3,
216    BG_JOIN_ERR_MIXED_LEVELS = 4,
217    BG_JOIN_ERR_MIXED_ARENATEAM = 5,
218    BG_JOIN_ERR_GROUP_MEMBER_ALREADY_IN_QUEUE = 6,
219    BG_JOIN_ERR_GROUP_DESERTER = 7,
220    BG_JOIN_ERR_ALL_QUEUES_USED = 8,
221    BG_JOIN_ERR_GROUP_NOT_ENOUGH = 9
222};
223
224class BattleGroundScore
225{
226    public:
227        BattleGroundScore() : KillingBlows(0), HonorableKills(0), Deaths(0), DamageDone(0), HealingDone(0), BonusHonor(0) {};
228        virtual ~BattleGroundScore()                        //virtual destructor is used when deleting score from scores map
229        {
230        };
231        uint32 KillingBlows;
232        uint32 Deaths;
233        uint32 HonorableKills;
234        uint32 BonusHonor;
235        uint32 DamageDone;
236        uint32 HealingDone;
237};
238
239/*
240This class is used to:
2411. Add player to battleground
2422. Remove player from battleground
2433. some certain cases, same for all battlegrounds
2444. It has properties same for all battlegrounds
245*/
246class BattleGround
247{
248    friend class BattleGroundMgr;
249
250    public:
251        /* Construction */
252        BattleGround();
253        virtual ~BattleGround();
254        virtual void Update(time_t diff);                   // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
255        virtual bool SetupBattleGround()                    // must be implemented in BG subclass
256        {
257            return true;
258        }
259        void Reset();                                       // resets all common properties for battlegrounds
260        virtual void ResetBGSubclass()                      // must be implemented in BG subclass
261        {
262        }
263
264        /* Battleground */
265        // Get methods:
266        char const* GetName() const         { return m_Name; }
267        uint32 GetTypeID() const            { return m_TypeID; }
268        uint32 GetQueueType() const         { return m_Queue_type; }
269        uint32 GetInstanceID() const        { return m_InstanceID; }
270        uint32 GetStatus() const            { return m_Status; }
271        uint32 GetStartTime() const         { return m_StartTime; }
272        uint32 GetEndTime() const           { return m_EndTime; }
273        uint32 GetLastResurrectTime() const { return m_LastResurrectTime; }
274        uint32 GetMaxPlayers() const        { return m_MaxPlayers; }
275        uint32 GetMinPlayers() const        { return m_MinPlayers; }
276
277        uint32 GetMinLevel() const          { return m_LevelMin; }
278        uint32 GetMaxLevel() const          { return m_LevelMax; }
279
280        uint32 GetMaxPlayersPerTeam() const { return m_MaxPlayersPerTeam; }
281        uint32 GetMinPlayersPerTeam() const { return m_MinPlayersPerTeam; }
282
283        int GetStartDelayTime() const       { return m_StartDelayTime; }
284        uint8 GetArenaType() const          { return m_ArenaType; }
285        uint8 GetWinner() const             { return m_Winner; }
286        uint32 GetBattlemasterEntry() const;
287
288        // Set methods:
289        void SetName(char const* Name)      { m_Name = Name; }
290        void SetTypeID(uint32 TypeID)       { m_TypeID = TypeID; }
291        void SetQueueType(uint32 ID)        { m_Queue_type = ID; }
292        void SetInstanceID(uint32 InstanceID) { m_InstanceID = InstanceID; }
293        void SetStatus(uint32 Status)       { m_Status = Status; }
294        void SetStartTime(uint32 Time)      { m_StartTime = Time; }
295        void SetEndTime(uint32 Time)        { m_EndTime = Time; }
296        void SetLastResurrectTime(uint32 Time) { m_LastResurrectTime = Time; }
297        void SetMaxPlayers(uint32 MaxPlayers) { m_MaxPlayers = MaxPlayers; }
298        void SetMinPlayers(uint32 MinPlayers) { m_MinPlayers = MinPlayers; }
299        void SetLevelRange(uint32 min, uint32 max) { m_LevelMin = min; m_LevelMax = max; }
300        void SetRated(bool state)           { m_IsRated = state; }
301        void SetArenaType(uint8 type)       { m_ArenaType = type; }
302        void SetArenaorBGType(bool _isArena) { m_IsArena = _isArena; }
303        void SetWinner(uint8 winner)        { m_Winner = winner; }
304
305        void ModifyStartDelayTime(int diff) { m_StartDelayTime -= diff; }
306        void SetStartDelayTime(int Time)    { m_StartDelayTime = Time; }
307
308        void SetMaxPlayersPerTeam(uint32 MaxPlayers) { m_MaxPlayersPerTeam = MaxPlayers; }
309        void SetMinPlayersPerTeam(uint32 MinPlayers) { m_MinPlayersPerTeam = MinPlayers; }
310
311        void AddToBGFreeSlotQueue();                        //this queue will be useful when more battlegrounds instances will be available
312        void RemoveFromBGFreeSlotQueue();                   //this method could delete whole BG instance, if another free is available
313
314        void DecreaseInvitedCount(uint32 team)      { (team == ALLIANCE) ? --m_InvitedAlliance : --m_InvitedHorde; }
315        void IncreaseInvitedCount(uint32 team)      { (team == ALLIANCE) ? ++m_InvitedAlliance : ++m_InvitedHorde; }
316        uint32 GetInvitedCount(uint32 team) const
317        {
318            if( team == ALLIANCE )
319                return m_InvitedAlliance;
320            else
321                return m_InvitedHorde;
322        }
323        bool HasFreeSlotsForTeam(uint32 Team) const;
324        bool HasFreeSlots() const;
325        uint32 GetFreeSlotsForTeam(uint32 Team) const;
326
327        bool isArena() const        { return m_IsArena; }
328        bool isBattleGround() const { return !m_IsArena; }
329        bool isRated() const        { return m_IsRated; }
330
331        typedef std::map<uint64, BattleGroundPlayer> BattleGroundPlayerMap;
332        BattleGroundPlayerMap const& GetPlayers() const { return m_Players; }
333        uint32 GetPlayersSize() const { return m_Players.size(); }
334        uint32 GetRemovedPlayersSize() const { return m_RemovedPlayers.size(); }
335
336        std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
337        std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
338        uint32 GetPlayerScoresSize() const { return m_PlayerScores.size(); }
339
340        uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); }
341
342        void AddPlayerToResurrectQueue(uint64 npc_guid, uint64 player_guid);
343        void RemovePlayerFromResurrectQueue(uint64 player_guid);
344
345        void StartBattleGround();
346
347        /* Location */
348        void SetMapId(uint32 MapID) { m_MapId = MapID; }
349        uint32 GetMapId() const { return m_MapId; }
350
351        void SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O);
352        void GetTeamStartLoc(uint32 TeamID, float &X, float &Y, float &Z, float &O) const
353        {
354            uint8 idx = GetTeamIndexByTeamId(TeamID);
355            X = m_TeamStartLocX[idx];
356            Y = m_TeamStartLocY[idx];
357            Z = m_TeamStartLocZ[idx];
358            O = m_TeamStartLocO[idx];
359        }
360
361        /* Packet Transfer */
362        // method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
363        virtual void FillInitialWorldStates(WorldPacket& /*data*/) {}
364        void SendPacketToTeam(uint32 TeamID, WorldPacket *packet, Player *sender = NULL, bool self = true);
365        void SendPacketToAll(WorldPacket *packet);
366        void PlaySoundToTeam(uint32 SoundID, uint32 TeamID);
367        void PlaySoundToAll(uint32 SoundID);
368        void CastSpellOnTeam(uint32 SpellID, uint32 TeamID);
369        void RewardHonorToTeam(uint32 Honor, uint32 TeamID);
370        void RewardReputationToTeam(uint32 faction_id, uint32 Reputation, uint32 TeamID);
371        void RewardMark(Player *plr,uint32 count);
372        void SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count);
373        void RewardQuest(Player *plr);
374        void UpdateWorldState(uint32 Field, uint32 Value);
375        void UpdateWorldStateForPlayer(uint32 Field, uint32 Value, Player *Source);
376        void EndBattleGround(uint32 winner);
377        void BlockMovement(Player *plr);
378
379        void SendMessageToAll(char const* text);
380        void SendMessageToAll(int32 entry);
381
382        /* Raid Group */
383        Group *GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE]; }
384        void SetBgRaid(uint32 TeamID, Group *bg_raid)
385        {
386            Group* &old_raid = TeamID == ALLIANCE ? m_BgRaids[BG_TEAM_ALLIANCE] : m_BgRaids[BG_TEAM_HORDE];
387            if(old_raid) old_raid->SetBattlegroundGroup(NULL);
388            if(bg_raid) bg_raid->SetBattlegroundGroup(this);
389            old_raid = bg_raid;
390        }
391
392        virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value);
393
394        uint8 GetTeamIndexByTeamId(uint32 Team) const { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; }
395        uint32 GetPlayersCountByTeam(uint32 Team) const { return m_PlayersCount[GetTeamIndexByTeamId(Team)]; }
396        uint32 GetAlivePlayersCountByTeam(uint32 Team) const;   // used in arenas to correctly handle death in spirit of redemption / last stand etc. (killer = killed) cases
397        void UpdatePlayersCountByTeam(uint32 Team, bool remove)
398        {
399            if(remove)
400                --m_PlayersCount[GetTeamIndexByTeamId(Team)];
401            else
402                ++m_PlayersCount[GetTeamIndexByTeamId(Team)];
403        }
404
405        // used for rated arena battles
406        void SetArenaTeamIdForTeam(uint32 Team, uint32 ArenaTeamId) { m_ArenaTeamIds[GetTeamIndexByTeamId(Team)] = ArenaTeamId; }
407        uint32 GetArenaTeamIdForTeam(uint32 Team) const { return m_ArenaTeamIds[GetTeamIndexByTeamId(Team)]; }
408        void SetArenaTeamRatingChangeForTeam(uint32 Team, int32 RatingChange) { m_ArenaTeamRatingChanges[GetTeamIndexByTeamId(Team)] = RatingChange; }
409        int32 GetArenaTeamRatingChangeForTeam(uint32 Team) const { return m_ArenaTeamRatingChanges[GetTeamIndexByTeamId(Team)]; }
410
411        /* Triggers handle */
412        // must be implemented in BG subclass
413        virtual void HandleAreaTrigger(Player* /*Source*/, uint32 /*Trigger*/) {}
414        // must be implemented in BG subclass if need AND call base class generic code
415        virtual void HandleKillPlayer(Player *player, Player *killer);
416
417        /* Battleground events */
418        /* these functions will return true event is possible, but false if player is bugger */
419        virtual void EventPlayerDroppedFlag(Player* /*player*/) {}
420        virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) {}
421        virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
422
423        /* Death related */
424        virtual WorldSafeLocsEntry const* GetClosestGraveYard(float /*x*/, float /*y*/, float /*z*/, uint32 /*team*/)  { return NULL; }
425
426        virtual void AddPlayer(Player *plr);                // must be implemented in BG subclass
427
428        virtual void RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPacket);
429                                                            // can be extended in in BG subclass
430
431        void HandleTriggerBuff(uint64 const& go_guid);
432
433        // TODO: make this protected:
434        typedef std::vector<uint64> BGObjects;
435        typedef std::vector<uint64> BGCreatures;
436        BGObjects m_BgObjects;
437        BGCreatures m_BgCreatures;
438        void SpawnBGObject(uint32 type, uint32 respawntime);
439        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);
440//        void SpawnBGCreature(uint32 type, uint32 respawntime);
441        Creature* AddCreature(uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime = 0);
442        bool DelCreature(uint32 type);
443        bool DelObject(uint32 type);
444        bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, uint32 team);
445
446        void DoorOpen(uint32 type);
447        void DoorClose(uint32 type);
448        const char *GetMangosString(int32 entry);
449
450        virtual bool HandlePlayerUnderMap(Player * plr) {return false;}
451
452        // since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
453        uint32 GetPlayerTeam(uint64 guid);
454
455        void SetDeleteThis() {m_SetDeleteThis = true;}
456
457    protected:
458        //this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround
459        void EndNow();
460
461        /* Scorekeeping */
462                                                            // Player scores
463        std::map<uint64, BattleGroundScore*>    m_PlayerScores;
464        // must be implemented in BG subclass
465        virtual void RemovePlayer(Player * /*player*/, uint64 /*guid*/) {}
466
467        /* Player lists, those need to be accessible by inherited classes */
468        BattleGroundPlayerMap  m_Players;
469                                                            // Spirit Guide guid + Player list GUIDS
470        std::map<uint64, std::vector<uint64> >  m_ReviveQueue;
471
472        /*
473        this is important variable used for invitation messages
474        */
475        uint8 m_Events;
476
477        bool   m_BuffChange;
478
479    private:
480        /* Battleground */
481        uint32 m_TypeID;                                    //Battleground type, defined in enum BattleGroundTypeId
482        uint32 m_InstanceID;                                //BattleGround Instance's GUID!
483        uint32 m_Status;
484        uint32 m_StartTime;
485        uint32 m_EndTime;
486        uint32 m_LastResurrectTime;
487        uint32 m_Queue_type;
488        uint8  m_ArenaType;                                 // 2=2v2, 3=3v3, 5=5v5
489        bool   m_InBGFreeSlotQueue;                         // used to make sure that BG is only once inserted into the BattleGroundMgr.BGFreeSlotQueue[bgTypeId] deque
490        bool   m_SetDeleteThis;                             // used for safe deletion of the bg after end / all players leave
491        // this variable is not used .... it can be found in many other ways... but to store it in BG object instance is useless
492        //uint8  m_BattleGroundType;                        // 3=BG, 4=arena
493        //instead of uint8 (in previous line) is bool used
494        bool   m_IsArena;
495        uint8  m_Winner;                                    // 0=alliance, 1=horde, 2=none
496        int32  m_StartDelayTime;
497        bool   m_IsRated;                                   // is this battle rated?
498        bool   m_PrematureCountDown;
499        uint32 m_PrematureCountDownTimer;
500        char const *m_Name;
501
502        /* Player lists */
503        std::vector<uint64> m_ResurrectQueue;               // Player GUID
504        std::map<uint64, uint8> m_RemovedPlayers;           // uint8 is remove type (0 - bgqueue, 1 - bg, 2 - resurrect queue)
505
506        /* 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 */
507        /* Invited counters will be changed only when removing already invited player from queue, removing player from battleground and inviting player to BG */
508        /* Invited players counters*/
509        uint32 m_InvitedAlliance;
510        uint32 m_InvitedHorde;
511
512        /* Raid Group */
513        Group *m_BgRaids[2];                                // 0 - alliance, 1 - horde
514
515        /* Players count by team */
516        uint32 m_PlayersCount[2];
517
518        /* Arena team ids by team */
519        uint32 m_ArenaTeamIds[2];
520
521        int32 m_ArenaTeamRatingChanges[2];
522
523        /* Limits */
524        uint32 m_LevelMin;
525        uint32 m_LevelMax;
526        uint32 m_MaxPlayersPerTeam;
527        uint32 m_MaxPlayers;
528        uint32 m_MinPlayersPerTeam;
529        uint32 m_MinPlayers;
530
531        /* Location */
532        uint32 m_MapId;
533        float m_TeamStartLocX[2];
534        float m_TeamStartLocY[2];
535        float m_TeamStartLocZ[2];
536        float m_TeamStartLocO[2];
537};
538#endif
Note: See TracBrowser for help on using the browser.