diff options
author | click <none@none> | 2010-05-26 11:34:37 +0200 |
---|---|---|
committer | click <none@none> | 2010-05-26 11:34:37 +0200 |
commit | 7a13839178847c682666e507651c49939681365a (patch) | |
tree | 73692e329ac38a71e29d2d6ef580f9bc796e6ce9 /src/game/BattleGround.h | |
parent | e4c03aa55ab1934c89786c271e31317f7bc75687 (diff) |
Add support for random battlegrounds - port by n0n4me, original code by Vladimir and Griffonheart (Big thanks to all of you!)
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.h')
-rw-r--r-- | src/game/BattleGround.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 6d9bdfc5ecd..38f4a0f443d 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -132,6 +132,16 @@ enum BattleGroundBuffObjects BG_OBJECTID_BERSERKERBUFF_ENTRY = 179905 }; +enum BattleGroundRandomRewards +{ + BG_REWARD_WINNER_HONOR_FIRST = 30, + BG_REWARD_WINNER_ARENA_FIRST = 25, + BG_REWARD_WINNER_HONOR_LAST = 15, + BG_REWARD_WINNER_ARENA_LAST = 0, + BG_REWARD_LOOSER_HONOR_FIRST = 5, + BG_REWARD_LOOSER_HONOR_LAST = 5 +}; + const uint32 Buff_Entries[3] = { BG_OBJECTID_SPEEDBUFF_ENTRY, BG_OBJECTID_REGENBUFF_ENTRY, BG_OBJECTID_BERSERKERBUFF_ENTRY }; enum BattleGroundStatus @@ -168,9 +178,10 @@ enum BattleGroundQueueTypeId BATTLEGROUND_QUEUE_EY = 4, BATTLEGROUND_QUEUE_SA = 5, BATTLEGROUND_QUEUE_IC = 6, - BATTLEGROUND_QUEUE_2v2 = 7, - BATTLEGROUND_QUEUE_3v3 = 8, - BATTLEGROUND_QUEUE_5v5 = 9, + BATTLEGROUND_QUEUE_RB = 7, + BATTLEGROUND_QUEUE_2v2 = 8, + BATTLEGROUND_QUEUE_3v3 = 9, + BATTLEGROUND_QUEUE_5v5 = 10, MAX_BATTLEGROUND_QUEUE_TYPES }; @@ -326,7 +337,7 @@ class BattleGround /* Battleground */ // Get methods: char const* GetName() const { return m_Name; } - BattleGroundTypeId GetTypeID() const { return m_TypeID; } + BattleGroundTypeId GetTypeID(bool GetRandom = false) const { return GetRandom ? m_RandomTypeID : m_TypeID; } BattleGroundBracketId GetBracketId() const { return m_BracketId; } uint32 GetInstanceID() const { return m_InstanceID; } BattleGroundStatus GetStatus() const { return m_Status; } @@ -348,10 +359,12 @@ class BattleGround uint8 GetWinner() const { return m_Winner; } uint32 GetBattlemasterEntry() const; uint32 GetBonusHonorFromKill(uint32 kills) const; + bool IsRandom() { return m_IsRandom; } // Set methods: void SetName(char const* Name) { m_Name = Name; } void SetTypeID(BattleGroundTypeId TypeID) { m_TypeID = TypeID; } + void SetRandomTypeID(BattleGroundTypeId TypeID) { m_RandomTypeID = TypeID; } //here we can count minlevel and maxlevel for players void SetBracket(PvPDifficultyEntry const* bracketEntry); void SetInstanceID(uint32 InstanceID) { m_InstanceID = InstanceID; } @@ -379,6 +392,8 @@ class BattleGround void DecreaseInvitedCount(uint32 team) { (team == ALLIANCE) ? --m_InvitedAlliance : --m_InvitedHorde; } void IncreaseInvitedCount(uint32 team) { (team == ALLIANCE) ? ++m_InvitedAlliance : ++m_InvitedHorde; } + + void SetRandom(bool isRandom) { m_IsRandom = isRandom; } uint32 GetInvitedCount(uint32 team) const { if (team == ALLIANCE) @@ -571,11 +586,13 @@ class BattleGround uint32 m_StartMessageIds[BG_STARTING_EVENT_COUNT]; bool m_BuffChange; + bool m_IsRandom; BGHonorMode m_HonorMode; private: /* Battleground */ BattleGroundTypeId m_TypeID; + BattleGroundTypeId m_RandomTypeID; uint32 m_InstanceID; //BattleGround Instance's GUID! BattleGroundStatus m_Status; uint32 m_ClientInstanceID; //the instance-id which is sent to the client and without any other internal use |