2010-10-07 15:54:07 +02:00
/*
2011-01-01 15:01:13 +01:00
* Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/>
2010-10-07 15:54:07 +02:00
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
2008-10-02 16:23:55 -05:00
*/
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#ifndef __BATTLEGROUND_H
#define __BATTLEGROUND_H
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
#include "Common.h"
#include "SharedDefines.h"
2010-02-15 15:31:27 +01:00
#include "DBCEnums.h"
2009-10-17 15:51:44 -07:00
2009-02-09 22:08:06 -06:00
class Creature ;
class GameObject ;
class Group ;
class Player ;
class WorldPacket ;
2010-08-08 04:37:24 +02:00
class BattlegroundMap ;
2009-10-17 15:51:44 -07:00
2010-02-15 15:31:27 +01:00
struct PvPDifficultyEntry ;
2009-02-09 22:08:06 -06:00
struct WorldSafeLocsEntry ;
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundSounds
2008-10-02 16:23:55 -05:00
{
SOUND_HORDE_WINS = 8454 ,
SOUND_ALLIANCE_WINS = 8455 ,
2008-10-10 13:37:21 -05:00
SOUND_BG_START = 3439 ,
2009-02-09 08:16:34 -05:00
SOUND_BG_START_L70ETC = 11803 ,
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundQuests
2008-10-02 16:23:55 -05:00
{
SPELL_WS_QUEST_REWARD = 43483 ,
SPELL_AB_QUEST_REWARD = 43484 ,
SPELL_AV_QUEST_REWARD = 43475 ,
SPELL_AV_QUEST_KILLED_BOSS = 23658 ,
SPELL_EY_QUEST_REWARD = 43477 ,
2010-03-02 19:44:54 -06:00
SPELL_SA_QUEST_REWARD = 61213 ,
2008-10-02 16:23:55 -05:00
SPELL_AB_QUEST_REWARD_4_BASES = 24061 ,
SPELL_AB_QUEST_REWARD_5_BASES = 24064
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundMarks
2008-10-02 16:23:55 -05:00
{
2009-08-12 20:54:27 -05:00
SPELL_WS_MARK_LOSER = 24950 ,
SPELL_WS_MARK_WINNER = 24951 ,
SPELL_AB_MARK_LOSER = 24952 ,
SPELL_AB_MARK_WINNER = 24953 ,
SPELL_AV_MARK_LOSER = 24954 ,
SPELL_AV_MARK_WINNER = 24955 ,
2010-03-02 19:44:54 -06:00
SPELL_SA_MARK_WINNER = 61160 ,
SPELL_SA_MARK_LOSER = 61159 ,
2009-03-07 08:41:31 +01:00
ITEM_AV_MARK_OF_HONOR = 20560 ,
ITEM_WS_MARK_OF_HONOR = 20558 ,
ITEM_AB_MARK_OF_HONOR = 20559 ,
2010-03-02 19:44:54 -06:00
ITEM_EY_MARK_OF_HONOR = 29024 ,
ITEM_SA_MARK_OF_HONOR = 42425
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundMarksCount
2008-10-02 16:23:55 -05:00
{
ITEM_WINNER_COUNT = 3 ,
ITEM_LOSER_COUNT = 1
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundCreatures
2009-08-14 22:09:06 +02:00
{
BG_CREATURE_ENTRY_A_SPIRITGUIDE = 13116 , // alliance
BG_CREATURE_ENTRY_H_SPIRITGUIDE = 13117 , // horde
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundSpells
2008-10-02 16:23:55 -05:00
{
SPELL_WAITING_FOR_RESURRECT = 2584 , // Waiting to Resurrect
SPELL_SPIRIT_HEAL_CHANNEL = 22011 , // Spirit Heal Channel
SPELL_SPIRIT_HEAL = 22012 , // Spirit Heal
SPELL_RESURRECTION_VISUAL = 24171 , // Resurrection Impact Visual
2009-03-12 13:59:03 +01:00
SPELL_ARENA_PREPARATION = 32727 , // use this one, 32728 not correct
2008-10-02 16:23:55 -05:00
SPELL_ALLIANCE_GOLD_FLAG = 32724 ,
SPELL_ALLIANCE_GREEN_FLAG = 32725 ,
SPELL_HORDE_GOLD_FLAG = 35774 ,
SPELL_HORDE_GREEN_FLAG = 35775 ,
SPELL_PREPARATION = 44521 , // Preparation
SPELL_SPIRIT_HEAL_MANA = 44535 , // Spirit Heal
SPELL_RECENTLY_DROPPED_FLAG = 42792 , // Recently Dropped Flag
2010-05-12 00:23:00 +02:00
SPELL_AURA_PLAYER_INACTIVE = 43681 , // Inactive
SPELL_HONORABLE_DEFENDER_25Y = 68652 , // +50% honor when standing at a capture point that you control, 25yards radius (added in 3.2)
SPELL_HONORABLE_DEFENDER_60Y = 66157 // +50% honor when standing at a capture point that you control, 60yards radius (added in 3.2), probably for 40+ player battlegrounds
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundTimeIntervals
2008-10-02 16:23:55 -05:00
{
RESURRECTION_INTERVAL = 30000 , // ms
2009-12-17 10:43:12 +01:00
//REMIND_INTERVAL = 10000, // ms
INVITATION_REMIND_TIME = 20000 , // ms
INVITE_ACCEPT_WAIT_TIME = 40000 , // ms
2008-10-02 16:23:55 -05:00
TIME_TO_AUTOREMOVE = 120000 , // ms
2009-03-09 17:07:12 -06:00
MAX_OFFLINE_TIME = 300 , // secs
2008-10-02 16:23:55 -05:00
RESPAWN_ONE_DAY = 86400 , // secs
RESPAWN_IMMEDIATELY = 0 , // secs
2008-11-18 19:40:06 -06:00
BUFF_RESPAWN_TIME = 180 , // secs
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundStartTimeIntervals
2009-03-07 12:05:30 -06:00
{
BG_START_DELAY_2M = 120000 , // ms (2 minutes)
BG_START_DELAY_1M = 60000 , // ms (1 minute)
BG_START_DELAY_30S = 30000 , // ms (30 seconds)
BG_START_DELAY_15S = 15000 , // ms (15 seconds) Used only in arena
BG_START_DELAY_NONE = 0 , // ms
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundBuffObjects
2008-10-02 16:23:55 -05:00
{
BG_OBJECTID_SPEEDBUFF_ENTRY = 179871 ,
BG_OBJECTID_REGENBUFF_ENTRY = 179904 ,
BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundRandomRewards
2010-05-26 11:34:37 +02:00
{
BG_REWARD_WINNER_HONOR_FIRST = 30 ,
BG_REWARD_WINNER_ARENA_FIRST = 25 ,
BG_REWARD_WINNER_HONOR_LAST = 15 ,
BG_REWARD_WINNER_ARENA_LAST = 0 ,
2010-11-14 23:46:34 +02:00
BG_REWARD_LOSER_HONOR_FIRST = 5 ,
BG_REWARD_LOSER_HONOR_LAST = 5
2010-05-26 11:34:37 +02:00
};
2008-10-02 16:23:55 -05:00
const uint32 Buff_Entries [ 3 ] = { BG_OBJECTID_SPEEDBUFF_ENTRY , BG_OBJECTID_REGENBUFF_ENTRY , BG_OBJECTID_BERSERKERBUFF_ENTRY };
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundStatus
2008-10-02 16:23:55 -05:00
{
2009-03-05 19:02:08 -06:00
STATUS_NONE = 0 , // first status, should mean bg is not instance
STATUS_WAIT_QUEUE = 1 , // means bg is empty and waiting for queue
STATUS_WAIT_JOIN = 2 , // this means, that BG has already started and it is waiting for more players
STATUS_IN_PROGRESS = 3 , // means bg is running
STATUS_WAIT_LEAVE = 4 // means some faction has won BG and it is ending
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
struct BattlegroundPlayer
2008-10-02 16:23:55 -05:00
{
2009-03-09 17:07:12 -06:00
time_t OfflineRemoveTime ; // for tracking and removing offline players from queue after 5 minutes
2008-10-02 16:23:55 -05:00
uint32 Team ; // Player's team
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
struct BattlegroundObjectInfo
2008-10-02 16:23:55 -05:00
{
2010-08-08 04:37:24 +02:00
BattlegroundObjectInfo () : object ( NULL ), timer ( 0 ), spellid ( 0 ) {}
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
GameObject * object ;
int32 timer ;
uint32 spellid ;
};
2009-10-17 15:51:44 -07:00
2008-10-05 08:48:32 -05:00
// handle the queue types and bg types separately to enable joining queue for different sized arenas at the same time
2010-08-08 04:37:24 +02:00
enum BattlegroundQueueTypeId
2008-10-05 08:48:32 -05:00
{
2009-02-27 12:13:59 -06:00
BATTLEGROUND_QUEUE_NONE = 0 ,
BATTLEGROUND_QUEUE_AV = 1 ,
BATTLEGROUND_QUEUE_WS = 2 ,
BATTLEGROUND_QUEUE_AB = 3 ,
BATTLEGROUND_QUEUE_EY = 4 ,
BATTLEGROUND_QUEUE_SA = 5 ,
2009-12-17 10:43:12 +01:00
BATTLEGROUND_QUEUE_IC = 6 ,
2010-05-26 11:34:37 +02:00
BATTLEGROUND_QUEUE_RB = 7 ,
BATTLEGROUND_QUEUE_2v2 = 8 ,
BATTLEGROUND_QUEUE_3v3 = 9 ,
BATTLEGROUND_QUEUE_5v5 = 10 ,
2009-12-17 10:43:12 +01:00
MAX_BATTLEGROUND_QUEUE_TYPES
2008-10-05 08:48:32 -05:00
};
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
enum ScoreType
{
SCORE_KILLING_BLOWS = 1 ,
SCORE_DEATHS = 2 ,
SCORE_HONORABLE_KILLS = 3 ,
SCORE_BONUS_HONOR = 4 ,
//EY, but in MSG_PVP_LOG_DATA opcode!
SCORE_DAMAGE_DONE = 5 ,
SCORE_HEALING_DONE = 6 ,
//WS
SCORE_FLAG_CAPTURES = 7 ,
SCORE_FLAG_RETURNS = 8 ,
2011-01-14 23:02:15 +01:00
//AB and IC
2008-10-02 16:23:55 -05:00
SCORE_BASES_ASSAULTED = 9 ,
SCORE_BASES_DEFENDED = 10 ,
//AV
SCORE_GRAVEYARDS_ASSAULTED = 11 ,
SCORE_GRAVEYARDS_DEFENDED = 12 ,
SCORE_TOWERS_ASSAULTED = 13 ,
SCORE_TOWERS_DEFENDED = 14 ,
SCORE_MINES_CAPTURED = 15 ,
SCORE_LEADERS_KILLED = 16 ,
2010-02-14 19:13:14 -07:00
SCORE_SECONDARY_OBJECTIVES = 17 ,
//SOTA
SCORE_DESTROYED_DEMOLISHER = 18 ,
2011-01-09 00:00:08 -03:00
SCORE_DESTROYED_WALL = 19 ,
2008-10-02 16:23:55 -05:00
};
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
enum ArenaType
{
ARENA_TYPE_2v2 = 2 ,
ARENA_TYPE_3v3 = 3 ,
ARENA_TYPE_5v5 = 5
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundType
2008-10-02 16:23:55 -05:00
{
TYPE_BATTLEGROUND = 3 ,
TYPE_ARENA = 4
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundWinner
2008-10-02 16:23:55 -05:00
{
WINNER_HORDE = 0 ,
WINNER_ALLIANCE = 1 ,
WINNER_NONE = 2
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundTeamId
2008-10-02 16:23:55 -05:00
{
BG_TEAM_ALLIANCE = 0 ,
2009-02-27 12:20:33 -06:00
BG_TEAM_HORDE = 1
2008-10-02 16:23:55 -05:00
};
2009-02-27 12:20:33 -06:00
#define BG_TEAMS_COUNT 2
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundStartingEvents
2009-03-07 12:05:30 -06:00
{
BG_STARTING_EVENT_NONE = 0x00 ,
BG_STARTING_EVENT_1 = 0x01 ,
BG_STARTING_EVENT_2 = 0x02 ,
BG_STARTING_EVENT_3 = 0x04 ,
BG_STARTING_EVENT_4 = 0x08
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
enum BattlegroundStartingEventsIds
2009-03-07 12:05:30 -06:00
{
BG_STARTING_EVENT_FIRST = 0 ,
BG_STARTING_EVENT_SECOND = 1 ,
BG_STARTING_EVENT_THIRD = 2 ,
BG_STARTING_EVENT_FOURTH = 3
};
#define BG_STARTING_EVENT_COUNT 4
2009-10-17 15:51:44 -07:00
2010-06-01 23:55:09 +02:00
enum BG_OBJECT_DMG_HIT_TYPE
{
BG_OBJECT_DMG_HIT_TYPE_JUST_DAMAGED = 0 ,
BG_OBJECT_DMG_HIT_TYPE_DAMAGED = 1 ,
BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED = 2 ,
BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED = 3 ,
2010-08-08 19:45:53 +02:00
BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED = 4
2010-06-01 23:55:09 +02:00
};
2010-04-11 11:22:29 +04:00
enum GroupJoinBattlegroundResult
2008-10-05 08:48:32 -05:00
{
2010-04-11 11:22:29 +04:00
// positive values are indexes in BattlemasterList.dbc
ERR_GROUP_JOIN_BATTLEGROUND_FAIL = 0 , // Your group has joined a battleground queue, but you are not eligible (showed for non existing BattlemasterList.dbc indexes)
ERR_BATTLEGROUND_NONE = - 1 , // not show anything
ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS = - 2 , // You cannot join the battleground yet because you or one of your party members is flagged as a Deserter.
ERR_ARENA_TEAM_PARTY_SIZE = - 3 , // Incorrect party size for this arena.
ERR_BATTLEGROUND_TOO_MANY_QUEUES = - 4 , // You can only be queued for 2 battles at once
ERR_BATTLEGROUND_CANNOT_QUEUE_FOR_RATED = - 5 , // You cannot queue for a rated match while queued for other battles
ERR_BATTLEDGROUND_QUEUED_FOR_RATED = - 6 , // You cannot queue for another battle while queued for a rated arena match
ERR_BATTLEGROUND_TEAM_LEFT_QUEUE = - 7 , // Your team has left the arena queue
ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND = - 8 , // You can't do that in a battleground.
ERR_BATTLEGROUND_JOIN_XP_GAIN = - 9 , // wtf, doesn't exist in client...
ERR_BATTLEGROUND_JOIN_RANGE_INDEX = - 10 , // Cannot join the queue unless all members of your party are in the same battleground level range.
ERR_BATTLEGROUND_JOIN_TIMED_OUT = - 11 , // %s was unavailable to join the queue. (uint64 guid exist in client cache)
ERR_BATTLEGROUND_JOIN_FAILED = - 12 , // Join as a group failed (uint64 guid doesn't exist in client cache)
ERR_LFG_CANT_USE_BATTLEGROUND = - 13 , // You cannot queue for a battleground or arena while using the dungeon system.
ERR_IN_RANDOM_BG = - 14 , // Can't do that while in a Random Battleground queue.
ERR_IN_NON_RANDOM_BG = - 15 , // Can't queue for Random Battleground while in another Battleground queue.
2008-10-05 08:48:32 -05:00
};
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
class BattlegroundScore
2008-10-02 16:23:55 -05:00
{
public :
2010-08-08 04:37:24 +02:00
BattlegroundScore () : KillingBlows ( 0 ), Deaths ( 0 ), HonorableKills ( 0 ),
2009-02-24 11:14:28 -06:00
BonusHonor ( 0 ), DamageDone ( 0 ), HealingDone ( 0 )
{}
2010-08-08 04:37:24 +02:00
virtual ~ BattlegroundScore () {} //virtual destructor is used when deleting score from scores map
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
uint32 KillingBlows ;
uint32 Deaths ;
uint32 HonorableKills ;
uint32 BonusHonor ;
uint32 DamageDone ;
uint32 HealingDone ;
};
2009-10-17 15:51:44 -07:00
2008-10-17 16:36:07 -05:00
enum BGHonorMode
{
BG_NORMAL = 0 ,
BG_HOLIDAY ,
BG_HONOR_MODE_NUM
};
2009-10-17 15:51:44 -07:00
2010-08-07 01:58:23 +06:00
#define BG_AWARD_ARENA_POINTS_MIN_LEVEL 71
2010-12-03 23:14:38 +01:00
#define ARENA_TIMELIMIT_POINTS_LOSS -16
2010-08-07 01:58:23 +06:00
2008-10-02 16:23:55 -05:00
/*
This class is used to:
1. Add player to battleground
2. Remove player from battleground
3. some certain cases, same for all battlegrounds
4. It has properties same for all battlegrounds
*/
2010-08-08 04:37:24 +02:00
class Battleground
2008-10-02 16:23:55 -05:00
{
2010-08-08 04:37:24 +02:00
friend class BattlegroundMgr ;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
public :
/* Construction */
2010-08-08 04:37:24 +02:00
Battleground ();
/*Battleground(const Battleground& bg);*/
virtual ~ Battleground ();
2009-01-21 16:18:57 -06:00
virtual void Update ( uint32 diff ); // must be implemented in BG subclass of BG specific update code, but must in begginning call parent version
2010-08-08 04:37:24 +02:00
virtual bool SetupBattleground () // must be implemented in BG subclass
2008-10-02 16:23:55 -05:00
{
return true ;
}
2009-02-13 20:10:14 -06:00
virtual void Reset (); // resets all common properties for battlegrounds, must be implemented and called in BG subclass
2009-03-07 12:05:30 -06:00
virtual void StartingEventCloseDoors () {}
virtual void StartingEventOpenDoors () {}
2009-08-04 23:16:44 +02:00
virtual void ResetBGSubclass () // must be implemented in BG subclass
{
}
2009-10-17 15:51:44 -07:00
2010-08-21 20:08:47 +02:00
virtual void DestroyGate ( Player * /*pl*/ , GameObject * /*go*/ , uint32 /*destroyedEvent*/ ) {}
2010-06-01 23:55:09 +02:00
2009-07-31 11:36:02 +08:00
/* achievement req. */
virtual bool IsAllNodesConrolledByTeam ( uint32 /*team*/ ) const { return false ; }
bool IsTeamScoreInRange ( uint32 team , uint32 minScore , uint32 maxScore ) const ;
2010-08-13 13:48:59 +02:00
void StartTimedAchievement ( AchievementCriteriaTimedTypes type , uint32 entry );
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
/* Battleground */
// Get methods:
char const * GetName () const { return m_Name ; }
2010-08-08 04:37:24 +02:00
BattlegroundTypeId GetTypeID ( bool GetRandom = false ) const { return GetRandom ? m_RandomTypeID : m_TypeID ; }
BattlegroundBracketId GetBracketId () const { return m_BracketId ; }
2008-10-02 16:23:55 -05:00
uint32 GetInstanceID () const { return m_InstanceID ; }
2010-08-08 04:37:24 +02:00
BattlegroundStatus GetStatus () const { return m_Status ; }
2009-03-10 15:30:44 -06:00
uint32 GetClientInstanceID () const { return m_ClientInstanceID ; }
2008-10-02 16:23:55 -05:00
uint32 GetStartTime () const { return m_StartTime ; }
uint32 GetEndTime () const { return m_EndTime ; }
uint32 GetLastResurrectTime () const { return m_LastResurrectTime ; }
uint32 GetMaxPlayers () const { return m_MaxPlayers ; }
uint32 GetMinPlayers () const { return m_MinPlayers ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
uint32 GetMinLevel () const { return m_LevelMin ; }
uint32 GetMaxLevel () const { return m_LevelMax ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
uint32 GetMaxPlayersPerTeam () const { return m_MaxPlayersPerTeam ; }
uint32 GetMinPlayersPerTeam () const { return m_MinPlayersPerTeam ; }
2009-10-17 15:51:44 -07:00
2009-03-05 19:02:08 -06:00
int32 GetStartDelayTime () const { return m_StartDelayTime ; }
2008-10-02 16:23:55 -05:00
uint8 GetArenaType () const { return m_ArenaType ; }
uint8 GetWinner () const { return m_Winner ; }
2010-08-06 13:47:17 +02:00
uint32 GetScriptId () const { return ScriptId ; }
2008-10-02 16:23:55 -05:00
uint32 GetBattlemasterEntry () const ;
2009-03-09 18:14:06 -06:00
uint32 GetBonusHonorFromKill ( uint32 kills ) const ;
2010-12-06 02:07:53 +01:00
bool IsRandom () const { return m_IsRandom ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
// Set methods:
void SetName ( char const * Name ) { m_Name = Name ; }
2010-08-08 04:37:24 +02:00
void SetTypeID ( BattlegroundTypeId TypeID ) { m_TypeID = TypeID ; }
void SetRandomTypeID ( BattlegroundTypeId TypeID ) { m_RandomTypeID = TypeID ; }
2009-02-27 12:13:59 -06:00
//here we can count minlevel and maxlevel for players
2010-02-15 15:31:27 +01:00
void SetBracket ( PvPDifficultyEntry const * bracketEntry );
2008-10-02 16:23:55 -05:00
void SetInstanceID ( uint32 InstanceID ) { m_InstanceID = InstanceID ; }
2010-08-08 04:37:24 +02:00
void SetStatus ( BattlegroundStatus Status ) { m_Status = Status ; }
2009-03-10 15:30:44 -06:00
void SetClientInstanceID ( uint32 InstanceID ) { m_ClientInstanceID = InstanceID ; }
2008-10-02 16:23:55 -05:00
void SetStartTime ( uint32 Time ) { m_StartTime = Time ; }
void SetEndTime ( uint32 Time ) { m_EndTime = Time ; }
void SetLastResurrectTime ( uint32 Time ) { m_LastResurrectTime = Time ; }
void SetMaxPlayers ( uint32 MaxPlayers ) { m_MaxPlayers = MaxPlayers ; }
void SetMinPlayers ( uint32 MinPlayers ) { m_MinPlayers = MinPlayers ; }
void SetLevelRange ( uint32 min , uint32 max ) { m_LevelMin = min ; m_LevelMax = max ; }
void SetRated ( bool state ) { m_IsRated = state ; }
void SetArenaType ( uint8 type ) { m_ArenaType = type ; }
void SetArenaorBGType ( bool _isArena ) { m_IsArena = _isArena ; }
void SetWinner ( uint8 winner ) { m_Winner = winner ; }
2010-08-06 13:47:17 +02:00
void SetScriptId ( uint32 scriptId ) { ScriptId = scriptId ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void ModifyStartDelayTime ( int diff ) { m_StartDelayTime -= diff ; }
void SetStartDelayTime ( int Time ) { m_StartDelayTime = Time ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void SetMaxPlayersPerTeam ( uint32 MaxPlayers ) { m_MaxPlayersPerTeam = MaxPlayers ; }
void SetMinPlayersPerTeam ( uint32 MinPlayers ) { m_MinPlayersPerTeam = MinPlayers ; }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void AddToBGFreeSlotQueue (); //this queue will be useful when more battlegrounds instances will be available
void RemoveFromBGFreeSlotQueue (); //this method could delete whole BG instance, if another free is available
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void DecreaseInvitedCount ( uint32 team ) { ( team == ALLIANCE ) ? -- m_InvitedAlliance : -- m_InvitedHorde ; }
void IncreaseInvitedCount ( uint32 team ) { ( team == ALLIANCE ) ? ++ m_InvitedAlliance : ++ m_InvitedHorde ; }
2010-05-26 11:34:37 +02:00
void SetRandom ( bool isRandom ) { m_IsRandom = isRandom ; }
2011-03-14 19:21:34 +06:00
uint32 GetInvitedCount ( uint32 team ) const { return ( team == ALLIANCE ) ? m_InvitedAlliance : m_InvitedHorde ; }
2008-10-02 16:23:55 -05:00
bool HasFreeSlots () const ;
2008-10-05 08:48:32 -05:00
uint32 GetFreeSlotsForTeam ( uint32 Team ) const ;
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
bool isArena () const { return m_IsArena ; }
2010-08-08 04:37:24 +02:00
bool isBattleground () const { return ! m_IsArena ; }
2008-10-02 16:23:55 -05:00
bool isRated () const { return m_IsRated ; }
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
typedef std :: map < uint64 , BattlegroundPlayer > BattlegroundPlayerMap ;
BattlegroundPlayerMap const & GetPlayers () const { return m_Players ; }
2008-10-02 16:23:55 -05:00
uint32 GetPlayersSize () const { return m_Players . size (); }
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
typedef std :: map < uint64 , BattlegroundScore *> BattlegroundScoreMap ;
BattlegroundScoreMap :: const_iterator GetPlayerScoresBegin () const { return m_PlayerScores . begin (); }
BattlegroundScoreMap :: const_iterator GetPlayerScoresEnd () const { return m_PlayerScores . end (); }
2008-10-02 16:23:55 -05:00
uint32 GetPlayerScoresSize () const { return m_PlayerScores . size (); }
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
uint32 GetReviveQueueSize () const { return m_ReviveQueue . size (); }
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
void AddPlayerToResurrectQueue ( const uint64 & npc_guid , const uint64 & player_guid );
void RemovePlayerFromResurrectQueue ( const uint64 & player_guid );
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
void StartBattleground ();
2009-10-17 15:51:44 -07:00
2008-11-21 19:45:49 -06:00
GameObject * GetBGObject ( uint32 type );
Creature * GetBGCreature ( uint32 type );
2011-03-14 19:21:34 +06:00
// Location
2008-10-02 16:23:55 -05:00
void SetMapId ( uint32 MapID ) { m_MapId = MapID ; }
uint32 GetMapId () const { return m_MapId ; }
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Map pointers
2010-08-08 04:37:24 +02:00
void SetBgMap ( BattlegroundMap * map ) { m_Map = map ; }
BattlegroundMap * GetBgMap ()
2009-12-17 10:43:12 +01:00
{
ASSERT ( m_Map );
return m_Map ;
}
2008-10-02 16:23:55 -05:00
void SetTeamStartLoc ( uint32 TeamID , float X , float Y , float Z , float O );
void GetTeamStartLoc ( uint32 TeamID , float & X , float & Y , float & Z , float & O ) const
{
2010-08-08 04:37:24 +02:00
BattlegroundTeamId idx = GetTeamIndexByTeamId ( TeamID );
2008-10-02 16:23:55 -05:00
X = m_TeamStartLocX [ idx ];
Y = m_TeamStartLocY [ idx ];
Z = m_TeamStartLocZ [ idx ];
O = m_TeamStartLocO [ idx ];
}
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Packet Transfer
2008-10-02 16:23:55 -05:00
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
virtual void FillInitialWorldStates ( WorldPacket & /*data*/ ) {}
2011-03-14 19:21:34 +06:00
void SendPacketToTeam ( uint32 TeamID , WorldPacket * packet , Player * sender = NULL , bool self = true );
void SendPacketToAll ( WorldPacket * packet );
2008-11-21 19:45:49 -06:00
void YellToAll ( Creature * creature , const char * text , uint32 language );
2009-10-17 15:51:44 -07:00
2009-03-09 17:00:31 -06:00
template < class Do >
2009-03-09 17:06:13 -06:00
void BroadcastWorker ( Do & _do );
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void PlaySoundToTeam ( uint32 SoundID , uint32 TeamID );
void PlaySoundToAll ( uint32 SoundID );
void CastSpellOnTeam ( uint32 SpellID , uint32 TeamID );
2011-01-09 00:00:08 -03:00
void RemoveAuraOnTeam ( uint32 SpellID , uint32 TeamID );
2008-10-02 16:23:55 -05:00
void RewardHonorToTeam ( uint32 Honor , uint32 TeamID );
void RewardReputationToTeam ( uint32 faction_id , uint32 Reputation , uint32 TeamID );
void UpdateWorldState ( uint32 Field , uint32 Value );
2011-03-14 19:21:34 +06:00
void UpdateWorldStateForPlayer ( uint32 Field , uint32 Value , Player * Source );
2010-08-08 04:37:24 +02:00
void EndBattleground ( uint32 winner );
2011-03-14 19:21:34 +06:00
void BlockMovement ( Player * plr );
2009-10-17 15:51:44 -07:00
2010-06-01 23:55:09 +02:00
void SendWarningToAll ( int32 entry , ...);
2009-03-09 17:00:31 -06:00
void SendMessageToAll ( int32 entry , ChatMsg type , Player const * source = NULL );
2010-04-07 22:59:46 +02:00
void PSendMessageToAll ( int32 entry , ChatMsg type , Player const * source , ...);
2009-10-17 15:51:44 -07:00
2009-03-09 17:06:13 -06:00
// specialized version with 2 string id args
void SendMessage2ToAll ( int32 entry , ChatMsg type , Player const * source , int32 strId1 = 0 , int32 strId2 = 0 );
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Raid Group
2008-10-02 16:23:55 -05:00
Group * GetBgRaid ( uint32 TeamID ) const { return TeamID == ALLIANCE ? m_BgRaids [ BG_TEAM_ALLIANCE ] : m_BgRaids [ BG_TEAM_HORDE ]; }
2009-02-09 22:08:06 -06:00
void SetBgRaid ( uint32 TeamID , Group * bg_raid );
2009-10-17 15:51:44 -07:00
2010-05-17 17:10:24 +02:00
virtual void UpdatePlayerScore ( Player * Source , uint32 type , uint32 value , bool doAddHonor = true );
2009-10-17 15:51:44 -07:00
2010-08-08 04:37:24 +02:00
static BattlegroundTeamId GetTeamIndexByTeamId ( uint32 Team ) { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE ; }
2008-10-02 16:23:55 -05:00
uint32 GetPlayersCountByTeam ( uint32 Team ) const { return m_PlayersCount [ GetTeamIndexByTeamId ( Team )]; }
2008-10-05 08:48:32 -05:00
uint32 GetAlivePlayersCountByTeam ( uint32 Team ) const ; // used in arenas to correctly handle death in spirit of redemption / last stand etc. (killer = killed) cases
2008-10-02 16:23:55 -05:00
void UpdatePlayersCountByTeam ( uint32 Team , bool remove )
{
2009-04-08 16:33:46 -05:00
if ( remove )
2008-10-02 16:23:55 -05:00
-- m_PlayersCount [ GetTeamIndexByTeamId ( Team )];
else
++ m_PlayersCount [ GetTeamIndexByTeamId ( Team )];
}
2009-10-17 15:51:44 -07:00
2008-10-05 08:48:32 -05:00
// used for rated arena battles
void SetArenaTeamIdForTeam ( uint32 Team , uint32 ArenaTeamId ) { m_ArenaTeamIds [ GetTeamIndexByTeamId ( Team )] = ArenaTeamId ; }
2009-03-09 16:36:58 -06:00
uint32 GetArenaTeamIdForTeam ( uint32 Team ) const { return m_ArenaTeamIds [ GetTeamIndexByTeamId ( Team )]; }
2008-10-05 08:48:32 -05:00
void SetArenaTeamRatingChangeForTeam ( uint32 Team , int32 RatingChange ) { m_ArenaTeamRatingChanges [ GetTeamIndexByTeamId ( Team )] = RatingChange ; }
2009-03-09 16:36:58 -06:00
int32 GetArenaTeamRatingChangeForTeam ( uint32 Team ) const { return m_ArenaTeamRatingChanges [ GetTeamIndexByTeamId ( Team )]; }
2010-08-27 18:18:26 +02:00
void SetArenaMatchmakerRating ( uint32 Team , uint32 MMR ){ m_ArenaTeamMMR [ GetTeamIndexByTeamId ( Team )] = MMR ; }
uint32 GetArenaMatchmakerRating ( uint32 Team ) { return m_ArenaTeamMMR [ GetTeamIndexByTeamId ( Team )]; }
2010-12-02 22:25:32 +01:00
void CheckArenaAfterTimerConditions ();
2009-03-09 16:36:58 -06:00
void CheckArenaWinConditions ();
2009-12-17 10:43:12 +01:00
void UpdateArenaWorldState ();
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Triggers handle
2008-10-02 16:23:55 -05:00
// must be implemented in BG subclass
virtual void HandleAreaTrigger ( Player * /*Source*/ , uint32 /*Trigger*/ ) {}
// must be implemented in BG subclass if need AND call base class generic code
virtual void HandleKillPlayer ( Player * player , Player * killer );
2008-11-21 19:45:49 -06:00
virtual void HandleKillUnit ( Creature * /*unit*/ , Player * /*killer*/ );
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Battleground events
2008-10-02 16:23:55 -05:00
virtual void EventPlayerDroppedFlag ( Player * /*player*/ ) {}
virtual void EventPlayerClickedOnFlag ( Player * /*player*/ , GameObject * /*target_obj*/ ) {}
virtual void EventPlayerCapturedFlag ( Player * /*player*/ ) {}
2011-02-09 16:47:12 +01:00
void EventPlayerLoggedIn ( Player * player );
2009-03-09 16:36:58 -06:00
void EventPlayerLoggedOut ( Player * player );
2010-08-21 20:08:47 +02:00
virtual void EventPlayerDamagedGO ( Player * /*plr*/ , GameObject * /*go*/ , uint8 /*hitType*/ , uint32 /*destroyedEvent*/ ) {}
2010-04-19 09:26:37 +02:00
virtual void EventPlayerUsedGO ( Player * /*player*/ , GameObject * /*go*/ ){}
2009-10-17 15:51:44 -07:00
2011-01-09 00:00:08 -03:00
// this function can be used by spell to interact with the BG map
2011-03-14 19:21:34 +06:00
virtual void DoAction ( uint32 /*action*/ , const uint64 & /*var*/ ) {}
2011-01-09 00:00:08 -03:00
2011-01-11 11:18:00 +01:00
virtual void HandlePlayerResurrect ( Player * /*player*/ ) {}
2011-01-09 00:00:08 -03:00
2011-03-14 19:21:34 +06:00
// Death related
2009-03-02 17:13:12 -06:00
virtual WorldSafeLocsEntry const * GetClosestGraveYard ( Player * player );
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
virtual void AddPlayer ( Player * plr ); // must be implemented in BG subclass
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
void AddOrSetPlayerToCorrectBgGroup ( Player * player , uint32 team );
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
virtual void RemovePlayerAtLeave ( const uint64 & guid , bool Transport , bool SendPacket );
2008-10-02 16:23:55 -05:00
// can be extended in in BG subclass
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
void HandleTriggerBuff ( const uint64 & go_guid );
2008-10-17 16:36:07 -05:00
void SetHoliday ( bool is_holiday );
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
// TODO: make this protected:
typedef std :: vector < uint64 > BGObjects ;
typedef std :: vector < uint64 > BGCreatures ;
BGObjects m_BgObjects ;
BGCreatures m_BgCreatures ;
void SpawnBGObject ( uint32 type , uint32 respawntime );
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 );
2008-10-05 08:48:32 -05:00
Creature * AddCreature ( uint32 entry , uint32 type , uint32 teamval , float x , float y , float z , float o , uint32 respawntime = 0 );
2008-10-02 16:23:55 -05:00
bool DelCreature ( uint32 type );
bool DelObject ( uint32 type );
bool AddSpiritGuide ( uint32 type , float x , float y , float z , float o , uint32 team );
2011-03-14 19:21:34 +06:00
int32 GetObjectType ( const uint64 & guid );
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
void DoorOpen ( uint32 type );
void DoorClose ( uint32 type );
2009-03-09 17:06:13 -06:00
//to be removed
2011-03-14 19:21:34 +06:00
const char * GetTrinityString ( int32 entry );
2009-10-17 15:51:44 -07:00
2009-02-24 11:14:28 -06:00
virtual bool HandlePlayerUnderMap ( Player * /*plr*/ ) { return false ; }
2009-10-17 15:51:44 -07:00
2008-10-05 08:48:32 -05:00
// since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
2011-03-14 19:21:34 +06:00
uint32 GetPlayerTeam ( const uint64 & guid ) const ;
2010-12-06 02:07:53 +01:00
uint32 GetOtherTeam ( uint32 teamId ) const ;
2011-03-14 19:21:34 +06:00
bool IsPlayerInBattleground ( const uint64 & guid ) const ;
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
void SetDeleteThis () { m_SetDeleteThis = true ; }
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// virtual score-array - get's used in bg-subclasses
2009-07-31 11:34:38 +08:00
int32 m_TeamScores [ BG_TEAMS_COUNT ];
2009-10-17 15:51:44 -07:00
2011-03-13 15:28:45 +06:00
void RewardXPAtKill ( Player * killer , Player * victim );
2010-08-07 01:58:23 +06:00
bool CanAwardArenaPoints () const { return m_LevelMin >= BG_AWARD_ARENA_POINTS_MIN_LEVEL ; }
2010-05-11 21:42:39 +02:00
2008-10-02 16:23:55 -05:00
protected :
2011-03-14 19:21:34 +06:00
// this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground
2008-10-02 16:23:55 -05:00
void EndNow ();
2009-03-09 17:07:12 -06:00
void PlayerAddedToBGCheckIfBGIsRunning ( Player * plr );
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
Player * _GetPlayer ( const uint64 & guid , bool offlineRemove , const char * context ) const ;
Player * _GetPlayer ( BattlegroundPlayerMap :: iterator itr , const char * context );
Player * _GetPlayer ( BattlegroundPlayerMap :: const_iterator itr , const char * context ) const ;
Player * _GetPlayerForTeam ( uint32 teamId , BattlegroundPlayerMap :: const_iterator itr , const char * context ) const ;
void _ProcessOfflineQueue ();
void _ProcessRessurect ( uint32 diff );
void _ProcessProgress ( uint32 diff );
void _ProcessLeave ( uint32 diff );
void _ProcessJoin ( uint32 diff );
2009-10-17 16:20:24 -07:00
2011-03-14 19:21:34 +06:00
// Scorekeeping
2010-08-08 04:37:24 +02:00
BattlegroundScoreMap m_PlayerScores ; // Player scores
2008-10-02 16:23:55 -05:00
// must be implemented in BG subclass
virtual void RemovePlayer ( Player * /*player*/ , uint64 /*guid*/ ) {}
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Player lists, those need to be accessible by inherited classes
2010-08-08 04:37:24 +02:00
BattlegroundPlayerMap m_Players ;
2011-03-14 19:21:34 +06:00
// Spirit Guide guid + Player list GUIDS
2008-10-02 16:23:55 -05:00
std :: map < uint64 , std :: vector < uint64 > > m_ReviveQueue ;
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// these are important variables used for starting messages
2008-10-02 16:23:55 -05:00
uint8 m_Events ;
2010-08-08 04:37:24 +02:00
BattlegroundStartTimeIntervals m_StartDelayTimes [ BG_STARTING_EVENT_COUNT ];
2011-03-14 19:21:34 +06:00
// this must be filled in constructors!
2009-03-07 12:05:30 -06:00
uint32 m_StartMessageIds [ BG_STARTING_EVENT_COUNT ];
2009-10-17 15:51:44 -07:00
2008-10-02 16:23:55 -05:00
bool m_BuffChange ;
2010-05-26 11:34:37 +02:00
bool m_IsRandom ;
2009-10-17 15:51:44 -07:00
2008-10-17 16:36:07 -05:00
BGHonorMode m_HonorMode ;
2008-10-02 16:23:55 -05:00
private :
2011-03-14 19:21:34 +06:00
// Battleground
2010-08-08 04:37:24 +02:00
BattlegroundTypeId m_TypeID ;
BattlegroundTypeId m_RandomTypeID ;
2011-03-14 19:21:34 +06:00
uint32 m_InstanceID ; // Battleground Instance's GUID!
2010-08-08 04:37:24 +02:00
BattlegroundStatus m_Status ;
2011-03-14 19:21:34 +06:00
uint32 m_ClientInstanceID ; // the instance-id which is sent to the client and without any other internal use
2008-10-02 16:23:55 -05:00
uint32 m_StartTime ;
2010-12-02 22:50:30 +01:00
uint32 m_ResetStatTimer ;
2009-03-13 18:06:36 -06:00
int32 m_EndTime ; // it is set to 120000 when bg is ending and it decreases itself
2008-10-02 16:23:55 -05:00
uint32 m_LastResurrectTime ;
2010-08-08 04:37:24 +02:00
BattlegroundBracketId m_BracketId ;
2008-10-02 16:23:55 -05:00
uint8 m_ArenaType ; // 2=2v2, 3=3v3, 5=5v5
2010-08-08 04:37:24 +02:00
bool m_InBGFreeSlotQueue ; // used to make sure that BG is only once inserted into the BattlegroundMgr.BGFreeSlotQueue[bgTypeId] deque
2008-10-05 08:48:32 -05:00
bool m_SetDeleteThis ; // used for safe deletion of the bg after end / all players leave
2008-10-02 16:23:55 -05:00
bool m_IsArena ;
uint8 m_Winner ; // 0=alliance, 1=horde, 2=none
int32 m_StartDelayTime ;
bool m_IsRated ; // is this battle rated?
2008-10-05 08:48:32 -05:00
bool m_PrematureCountDown ;
uint32 m_PrematureCountDownTimer ;
2008-10-02 16:23:55 -05:00
char const * m_Name ;
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Player lists
2008-10-02 16:23:55 -05:00
std :: vector < uint64 > m_ResurrectQueue ; // Player GUID
2009-03-09 17:07:12 -06:00
std :: deque < uint64 > m_OfflineQueue ; // Player GUID
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// 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
// Invited counters will be changed only when removing already invited player from queue, removing player from battleground and inviting player to BG
// Invited players counters
2008-10-02 16:23:55 -05:00
uint32 m_InvitedAlliance ;
uint32 m_InvitedHorde ;
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Raid Group
Group * m_BgRaids [ BG_TEAMS_COUNT ]; // 0 - alliance, 1 - horde
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Players count by team
2009-02-27 12:13:59 -06:00
uint32 m_PlayersCount [ BG_TEAMS_COUNT ];
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Arena team ids by team
2009-02-27 12:13:59 -06:00
uint32 m_ArenaTeamIds [ BG_TEAMS_COUNT ];
2009-10-17 15:51:44 -07:00
2009-02-27 12:13:59 -06:00
int32 m_ArenaTeamRatingChanges [ BG_TEAMS_COUNT ];
2010-08-27 18:18:26 +02:00
uint32 m_ArenaTeamMMR [ BG_TEAMS_COUNT ];
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Limits
2008-10-02 16:23:55 -05:00
uint32 m_LevelMin ;
uint32 m_LevelMax ;
uint32 m_MaxPlayersPerTeam ;
uint32 m_MaxPlayers ;
uint32 m_MinPlayersPerTeam ;
uint32 m_MinPlayers ;
2009-10-17 15:51:44 -07:00
2011-03-14 19:21:34 +06:00
// Start location
2008-10-02 16:23:55 -05:00
uint32 m_MapId ;
2010-08-08 04:37:24 +02:00
BattlegroundMap * m_Map ;
2009-02-27 12:13:59 -06:00
float m_TeamStartLocX [ BG_TEAMS_COUNT ];
float m_TeamStartLocY [ BG_TEAMS_COUNT ];
float m_TeamStartLocZ [ BG_TEAMS_COUNT ];
float m_TeamStartLocO [ BG_TEAMS_COUNT ];
2010-08-06 13:47:17 +02:00
uint32 ScriptId ;
2008-10-02 16:23:55 -05:00
};
#endif
2009-02-17 20:07:49 -06:00