mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 23:11:56 -04:00
*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
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
DROP TABLE IF EXISTS `character_db_version`;
|
||||
CREATE TABLE `character_db_version` (
|
||||
`required_7207_03_characters_corpse` bit(1) default NULL
|
||||
`required_7251_02_characters_character_spell` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
|
||||
|
||||
--
|
||||
|
||||
+6
-6
@@ -22,7 +22,7 @@
|
||||
DROP TABLE IF EXISTS `db_version`;
|
||||
CREATE TABLE `db_version` (
|
||||
`version` varchar(120) default NULL,
|
||||
`required_7249_01_mangos_spell_proc_event` bit(1) default NULL
|
||||
`required_7251_01_mangos_spell_chain` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
@@ -15934,11 +15934,11 @@ INSERT INTO spell_chain VALUES
|
||||
(49937,49936,43265,3,0),
|
||||
(49938,49937,43265,4,0),
|
||||
/*DeathCoil*/
|
||||
(52375,0,52375,1,0),
|
||||
(49892,52375,52375,2,0),
|
||||
(49893,49892,52375,3,0),
|
||||
(49894,49893,52375,4,0),
|
||||
(49895,49894,52375,5,0),
|
||||
(47541,0,47541,1,0),
|
||||
(49892,47541,47541,2,0),
|
||||
(49893,49892,47541,3,0),
|
||||
(49894,49893,47541,4,0),
|
||||
(49895,49894,47541,5,0),
|
||||
/*DeathStrike*/
|
||||
(49998,0,49998,1,0),
|
||||
(49999,49998,49998,2,0),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 }
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7250"
|
||||
#define REVISION_NR "7251"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
||||
Reference in New Issue
Block a user