diff options
author | megamage <none@none> | 2009-01-04 23:25:27 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-01-04 23:25:27 -0600 |
commit | e5575eeaf458f5a07d250af33908c4d603fa259d (patch) | |
tree | 5b5562e8e71cace87e28bb55d60cd8f8eaae50bf | |
parent | 190b0269507fce596d96821dd2d79d3c6c7c7e31 (diff) |
*Mangos [7026] Current arena season id and state send and setting in mangosd.conf. By GriffonHeart.
--HG--
branch : trunk
-rw-r--r-- | sql/updates/7026_01_mangos_battleground_template.sql | 7 | ||||
-rw-r--r-- | sql/updates/TBC-WLK_world.sql | 6 | ||||
-rw-r--r-- | src/game/BattleGround.h | 7 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.cpp | 30 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.h | 2 | ||||
-rw-r--r-- | src/game/Makefile.am | 6 | ||||
-rw-r--r-- | src/game/Player.cpp | 32 | ||||
-rw-r--r-- | src/game/World.cpp | 2 | ||||
-rw-r--r-- | src/game/World.h | 2 | ||||
-rw-r--r-- | src/mangosd/mangosd.conf.dist.in | 2 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 | ||||
-rw-r--r-- | win/VC71/game.vcproj | 18 | ||||
-rw-r--r-- | win/VC80/game.vcproj | 24 | ||||
-rw-r--r-- | win/VC90/game.vcproj | 24 |
14 files changed, 148 insertions, 16 deletions
diff --git a/sql/updates/7026_01_mangos_battleground_template.sql b/sql/updates/7026_01_mangos_battleground_template.sql new file mode 100644 index 00000000000..9da034c3ec5 --- /dev/null +++ b/sql/updates/7026_01_mangos_battleground_template.sql @@ -0,0 +1,7 @@ +ALTER TABLE db_version CHANGE COLUMN required_7024_01_mangos_spell_chain required_7026_01_mangos_battleground_template bit; + +DELETE FROM battleground_template WHERE id IN (9,10,11); +INSERT INTO battleground_template VALUES +(9,0,0,0,0,1367,0,1368,0), +(10,5,5,10,80,1362,0,1363,0), +(11,5,5,10,80,1364,0,1365,0); diff --git a/sql/updates/TBC-WLK_world.sql b/sql/updates/TBC-WLK_world.sql index 7106fecc508..a804e1c41be 100644 --- a/sql/updates/TBC-WLK_world.sql +++ b/sql/updates/TBC-WLK_world.sql @@ -1,3 +1,9 @@ +DELETE FROM battleground_template WHERE id IN (9,10,11); +INSERT INTO battleground_template VALUES +(9,0,0,0,0,1367,0,1368,0), +(10,5,5,10,80,1362,0,1363,0), +(11,5,5,10,80,1364,0,1365,0); + TRUNCATE creature_equip_template; alter table `creature_equip_template` drop column `equipinfo1`, diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 7b93adb7dfb..6f7c8334996 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -154,9 +154,10 @@ enum BattleGroundQueueTypeId BATTLEGROUND_QUEUE_WS = 2, BATTLEGROUND_QUEUE_AB = 3, BATTLEGROUND_QUEUE_EY = 4, - BATTLEGROUND_QUEUE_2v2 = 5, - BATTLEGROUND_QUEUE_3v3 = 6, - BATTLEGROUND_QUEUE_5v5 = 7, + BATTLEGROUND_QUEUE_SA = 5, + BATTLEGROUND_QUEUE_2v2 = 6, + BATTLEGROUND_QUEUE_3v3 = 7, + BATTLEGROUND_QUEUE_5v5 = 8, }; enum ScoreType diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 15178b1398d..d462c246441 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -29,6 +29,9 @@ #include "BattleGroundBE.h" #include "BattleGroundAA.h" #include "BattleGroundRL.h" +#include "BattleGroundSA.h" +#include "BattleGroundDS.h" +#include "BattleGroundRV.h" #include "SharedDefines.h" #include "Policies/SingletonImp.h" #include "MapManager.h" @@ -1195,6 +1198,15 @@ void BattleGroundMgr::BuildBattleGroundStatusPacket(WorldPacket *data, BattleGro case BATTLEGROUND_RL: *data << uint8(8); break; + case BATTLEGROUND_SA: + *data << uint8(9); + break; + case BATTLEGROUND_DS: + *data << uint8(10); + break; + case BATTLEGROUND_RV: + *data << uint8(11); + break; default: // unknown *data << uint8(0); break; @@ -1471,6 +1483,15 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(uint32 bgTypeId) case BATTLEGROUND_RL: bg = new BattleGroundRL(*(BattleGroundRL*)bg_template); break; + case BATTLEGROUND_SA: + bg = new BattleGroundSA(*(BattleGroundSA*)bg_template); + break; + case BATTLEGROUND_DS: + bg = new BattleGroundDS(*(BattleGroundDS*)bg_template); + break; + case BATTLEGROUND_RV: + bg = new BattleGroundRV(*(BattleGroundRV*)bg_template); + break; default: //bg = new BattleGround; return 0; @@ -1517,6 +1538,9 @@ uint32 BattleGroundMgr::CreateBattleGround(uint32 bgTypeId, uint32 MinPlayersPer case BATTLEGROUND_AA: bg = new BattleGroundAA; break; case BATTLEGROUND_EY: bg = new BattleGroundEY; break; case BATTLEGROUND_RL: bg = new BattleGroundRL; break; + case BATTLEGROUND_SA: bg = new BattleGroundSA; break; + case BATTLEGROUND_DS: bg = new BattleGroundDS; break; + case BATTLEGROUND_RV: bg = new BattleGroundRV; break; default:bg = new BattleGround; break; // placeholder for non implemented BG } @@ -1837,10 +1861,14 @@ uint32 BattleGroundMgr::BGQueueTypeId(uint32 bgTypeId, uint8 arenaType) const return BATTLEGROUND_QUEUE_AV; case BATTLEGROUND_EY: return BATTLEGROUND_QUEUE_EY; + case BATTLEGROUND_SA: + return BATTLEGROUND_QUEUE_SA; case BATTLEGROUND_AA: case BATTLEGROUND_NA: case BATTLEGROUND_RL: case BATTLEGROUND_BE: + case BATTLEGROUND_DS: + case BATTLEGROUND_RV: switch(arenaType) { case ARENA_TYPE_2v2: @@ -1869,6 +1897,8 @@ uint32 BattleGroundMgr::BGTemplateId(uint32 bgQueueTypeId) const return BATTLEGROUND_AV; case BATTLEGROUND_QUEUE_EY: return BATTLEGROUND_EY; + case BATTLEGROUND_QUEUE_SA: + return BATTLEGROUND_SA; case BATTLEGROUND_QUEUE_2v2: case BATTLEGROUND_QUEUE_3v3: case BATTLEGROUND_QUEUE_5v5: diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index faf6196979d..b7323a0570f 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -36,7 +36,7 @@ typedef std::deque<BattleGround*> BGFreeSlotQueueType; #define MAX_BATTLEGROUND_TYPES 12 // each BG type will be in array -#define MAX_BATTLEGROUND_QUEUE_TYPES 8 +#define MAX_BATTLEGROUND_QUEUE_TYPES 9 #define BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY 86400 // seconds in a day diff --git a/src/game/Makefile.am b/src/game/Makefile.am index 9ad337d5bd6..37d649c1208 100644 --- a/src/game/Makefile.am +++ b/src/game/Makefile.am @@ -51,18 +51,24 @@ libmangosgame_a_SOURCES = \ BattleGroundAB.cpp \ BattleGroundAV.cpp \ BattleGroundBE.cpp \ + BattleGroundDS.cpp \ BattleGroundEY.cpp \ BattleGroundNA.cpp \ BattleGroundRL.cpp \ + BattleGroundRV.cpp \ + BattleGroundSA.cpp \ BattleGroundWS.cpp \ BattleGround.h \ BattleGroundAA.h \ BattleGroundAB.h \ BattleGroundAV.h \ BattleGroundBE.h \ + BattleGroundDS.h \ BattleGroundEY.h \ BattleGroundNA.h \ BattleGroundRL.h \ + BattleGroundRV.h \ + BattleGroundSA.h \ BattleGroundWS.h \ BattleGroundHandler.cpp \ BattleGroundMgr.cpp \ diff --git a/src/game/Player.cpp b/src/game/Player.cpp index c551a2b8dc8..86cc93e78a0 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7694,7 +7694,13 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) case 1537: case 2257: case 2918: - NumberOfFields = 6; + NumberOfFields = 8; + break; + case 139: + NumberOfFields = 41; + break; + case 1377: + NumberOfFields = 15; break; case 139: NumberOfFields = 39; @@ -7703,37 +7709,37 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) NumberOfFields = 13; break; case 2597: - NumberOfFields = 81; + NumberOfFields = 83; break; case 3277: - NumberOfFields = 14; + NumberOfFields = 16; break; case 3358: case 3820: - NumberOfFields = 38; + NumberOfFields = 40; break; case 3483: - NumberOfFields = 25; + NumberOfFields = 27; break; case 3518: - NumberOfFields = 37; + NumberOfFields = 39; break; case 3519: - NumberOfFields = 36; + NumberOfFields = 38; break; case 3521: - NumberOfFields = 35; + NumberOfFields = 37; break; case 3698: case 3702: case 3968: - NumberOfFields = 9; + NumberOfFields = 11; break; case 3703: - NumberOfFields = 9; + NumberOfFields = 11; break; default: - NumberOfFields = 10; + NumberOfFields = 12; break; } @@ -7748,6 +7754,10 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId) data << uint32(0x8d5) << uint32(0x0); // 4 data << uint32(0x8d4) << uint32(0x0); // 5 data << uint32(0x8d3) << uint32(0x0); // 6 + // 7 1 - Arena season in progress, 0 - end of season + data << uint32(0xC77) << uint32(sWorld.getConfig(CONFIG_ARENA_SEASON_IN_PROGRESS)); + // 8 Arena season id + data << uint32(0xF3D) << uint32(sWorld.getConfig(CONFIG_ARENA_SEASON_ID)); if(mapid == 530) // Outland { data << uint32(0x9bf) << uint32(0x0); // 7 diff --git a/src/game/World.cpp b/src/game/World.cpp index 83543aa4f74..7dac66c99f2 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -754,6 +754,8 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.Enable", false); m_configs[CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY] = sConfig.GetBoolDefault("Battleground.QueueAnnouncer.PlayerOnly", false); m_configs[CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE] = sConfig.GetBoolDefault("Arena.QueueAnnouncer.Enable", false); + m_configs[CONFIG_ARENA_SEASON_ID] = sConfig.GetIntDefault ("Arena.ArenaSeason.ID", 1); + m_configs[CONFIG_ARENA_SEASON_IN_PROGRESS] = sConfig.GetBoolDefault("Arena.ArenaSeason.InProgress", true); m_configs[CONFIG_CAST_UNSTUCK] = sConfig.GetBoolDefault("CastUnstuck", true); m_configs[CONFIG_INSTANCE_RESET_TIME_HOUR] = sConfig.GetIntDefault("Instance.ResetTimeHour", 4); diff --git a/src/game/World.h b/src/game/World.h index 66ea7791ec0..f165a51d2ce 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -186,6 +186,8 @@ enum WorldConfigs CONFIG_ARENA_AUTO_DISTRIBUTE_POINTS, CONFIG_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, + CONFIG_ARENA_SEASON_ID, + CONFIG_ARENA_SEASON_IN_PROGRESS, CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, CONFIG_SKILL_MILLING, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 13ac9d694db..a488c4f1969 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1160,6 +1160,8 @@ Arena.MaxRatingDifference = 0 Arena.RatingDiscardTimer = 60000 Arena.AutoDistributePoints = 0 Arena.AutoDistributeInterval = 7 +Arena.ArenaSeason.ID = 1 +Arena.ArenaSeason.InProgress = 1 ################################################################################################################### # diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8997fd5a28a..eea659c9bd6 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 "7025" + #define REVISION_NR "7026" #endif // __REVISION_NR_H__ diff --git a/win/VC71/game.vcproj b/win/VC71/game.vcproj index 53464487248..dd3bf00427d 100644 --- a/win/VC71/game.vcproj +++ b/win/VC71/game.vcproj @@ -186,6 +186,12 @@ RelativePath="..\..\src\game\BattleGroundBE.h"> </File> <File + RelativePath="..\..\src\game\BattleGroundDS.cpp"> + </File> + <File + RelativePath="..\..\src\game\BattleGroundDS.h"> + </File> + <File RelativePath="..\..\src\game\BattleGroundEY.cpp"> </File> <File @@ -213,6 +219,18 @@ RelativePath="..\..\src\game\BattleGroundRL.h"> </File> <File + RelativePath="..\..\src\game\BattleGroundRV.cpp"> + </File> + <File + RelativePath="..\..\src\game\BattleGroundRV.h"> + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.cpp"> + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.h"> + </File> + <File RelativePath="..\..\src\game\BattleGroundWS.cpp"> </File> <File diff --git a/win/VC80/game.vcproj b/win/VC80/game.vcproj index 010c6dfe43e..b4a4efa6e6c 100644 --- a/win/VC80/game.vcproj +++ b/win/VC80/game.vcproj @@ -419,6 +419,14 @@ > </File> <File + RelativePath="..\..\src\game\BattleGroundDS.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundDS.h" + > + </File> + <File RelativePath="..\..\src\game\BattleGroundEY.cpp" > </File> @@ -455,6 +463,22 @@ > </File> <File + RelativePath="..\..\src\game\BattleGroundRV.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundRV.h" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.h" + > + </File> + <File RelativePath="..\..\src\game\BattleGroundWS.cpp" > </File> diff --git a/win/VC90/game.vcproj b/win/VC90/game.vcproj index 2fdbc62f502..0dc30f88c02 100644 --- a/win/VC90/game.vcproj +++ b/win/VC90/game.vcproj @@ -421,6 +421,14 @@ > </File> <File + RelativePath="..\..\src\game\BattleGroundDS.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundDS.h" + > + </File> + <File RelativePath="..\..\src\game\BattleGroundEY.cpp" > </File> @@ -457,6 +465,22 @@ > </File> <File + RelativePath="..\..\src\game\BattleGroundRV.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundRV.h" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.cpp" + > + </File> + <File + RelativePath="..\..\src\game\BattleGroundSA.h" + > + </File> + <File RelativePath="..\..\src\game\BattleGroundWS.cpp" > </File> |