diff options
author | megamage <none@none> | 2009-02-10 00:39:03 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-10 00:39:03 -0600 |
commit | 7f39dbd8481bbc629deb0726e8fad976bf6995ed (patch) | |
tree | d8ca6e0d15b98c152259468137980c97b58ddf41 /src | |
parent | d696381f325278d2243ec5072e872ebfd38f8568 (diff) |
*add .debug bg to allow starting a battleground with just one player it's implemented like .debug arena - so you toggle debug bg on or off By balrok
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/BattleGroundMgr.cpp | 12 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.h | 3 | ||||
-rw-r--r-- | src/game/Chat.cpp | 1 | ||||
-rw-r--r-- | src/game/Chat.h | 1 | ||||
-rw-r--r-- | src/game/Debugcmds.cpp | 6 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
6 files changed, 23 insertions, 2 deletions
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 90b7c2a02a8..83d2373ebe2 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -675,7 +675,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, uint32 queue_id, uin sLog.outDebug("Battleground: horde pool wasn't created"); // if selection pools are ready, create the new bg - if (bAllyOK && bHordeOK) + if ((bAllyOK && bHordeOK) || ( sBattleGroundMgr.isTesting() && (bAllyOK || bHordeOK))) { BattleGround * bg2 = 0; // special handling for arenas @@ -1031,6 +1031,7 @@ BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTe { m_BattleGrounds.clear(); m_NextRatingDiscardUpdate = sWorld.getConfig(CONFIG_ARENA_RATING_DISCARD_TIMER); + m_Testing=false; } BattleGroundMgr::~BattleGroundMgr() @@ -1848,6 +1849,15 @@ uint8 BattleGroundMgr::BGArenaType(uint32 bgQueueTypeId) } } +void BattleGroundMgr::ToggleTesting() +{ + m_Testing = !m_Testing; + if(m_Testing) + sWorld.SendGlobalText("Battlegrounds are set to 1v0 for debugging.", NULL); + else + sWorld.SendGlobalText("Battlegrounds are set to normal playercount.", NULL); +} + void BattleGroundMgr::ToggleArenaTesting() { m_ArenaTesting = !m_ArenaTesting; diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index d9b517fc23b..578c9c3fe01 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -224,6 +224,7 @@ class BattleGroundMgr void InitAutomaticArenaPointDistribution(); void DistributeArenaPoints(); void ToggleArenaTesting(); + void ToggleTesting(); void SetHolidayWeekends(uint32 mask); void LoadBattleMastersEntry(); @@ -236,6 +237,7 @@ class BattleGroundMgr } bool isArenaTesting() const { return m_ArenaTesting; } + bool isTesting() const { return m_Testing; } static bool IsArenaType(BattleGroundTypeId bgTypeId); static bool IsBattleGroundType(BattleGroundTypeId bgTypeId) { return !BattleGroundMgr::IsArenaType(bgTypeId); } @@ -251,6 +253,7 @@ class BattleGroundMgr uint64 m_NextAutoDistributionTime; uint32 m_AutoDistributionTimeChecker; bool m_ArenaTesting; + bool m_Testing; }; #define sBattleGroundMgr Trinity::Singleton<BattleGroundMgr>::Instance() diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index 1fb6bad508e..42ea2724619 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -226,6 +226,7 @@ ChatCommand * ChatHandler::getCommandTable() { "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleAnimCommand, "", NULL }, { "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleGetLootRecipient, "", NULL }, { "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL }, + { "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL }, { "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendLargePacketCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; diff --git a/src/game/Chat.h b/src/game/Chat.h index 111f8163093..da5cf93d397 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -496,6 +496,7 @@ class ChatHandler bool HandleUnPossessCommand(const char* args); bool HandleBindSightCommand(const char* args); bool HandleUnbindSightCommand(const char* args); + bool HandleDebugBattlegroundCommand(const char * args); bool HandleSpawnVehicle(const char * args); bool HandleSendLargePacketCommand(const char * args); diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 22b7fb389fb..60f1536963f 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -535,6 +535,12 @@ bool ChatHandler::HandleGetItemState(const char* args) return true; } +bool ChatHandler::HandleDebugBattlegroundCommand(const char * /*args*/) +{ + sBattleGroundMgr.ToggleTesting(); + return true; +} + bool ChatHandler::HandleDebugArenaCommand(const char * /*args*/) { sBattleGroundMgr.ToggleArenaTesting(); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a14834d0866..a1df9c63aca 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7250" + #define REVISION_NR "7251" #endif // __REVISION_NR_H__ |