Permalink
Browse files

Merge branch 'master' of git://github.com/mangos-wotlk/server

  • Loading branch information...
2 parents cde8934 + d8b0c2a commit ebae82421835f4aa1672e1e0f7933515ed82343d @blueboy blueboy committed Sep 21, 2012
Showing with 4,066 additions and 2,555 deletions.
  1. +167 −123 doc/EventAI.txt
  2. +2 −2 doc/script_commands.txt
  3. +25 −16 sql/mangos.sql
  4. +3 −0 sql/updates/12112_01_mangos_spell_template.sql
  5. +12 −0 sql/updates/12113_01_mangos_spell_template.sql
  6. +3 −0 sql/updates/12148_01_mangos_areatrigger_teleport.sql
  7. +5 −0 sql/updates/12148_02_mangos_mangos_string.sql
  8. +5 −5 src/game/AchievementMgr.cpp
  9. +3 −3 src/game/AuctionHouseBot/AuctionHouseBot.cpp
  10. +4 −4 src/game/AuctionHouseBot/AuctionHouseBot.h
  11. +1 −0 src/game/AuctionHouseMgr.cpp
  12. +2 −2 src/game/{ → BattleGround}/BattleGround.cpp
  13. +8 −2 src/game/{ → BattleGround}/BattleGround.h
  14. 0 src/game/{ → BattleGround}/BattleGroundAA.cpp
  15. 0 src/game/{ → BattleGround}/BattleGroundAA.h
  16. +15 −16 src/game/{ → BattleGround}/BattleGroundAB.cpp
  17. +8 −8 src/game/{ → BattleGround}/BattleGroundAB.h
  18. +1 −1 src/game/{ → BattleGround}/BattleGroundAV.cpp
  19. 0 src/game/{ → BattleGround}/BattleGroundAV.h
  20. 0 src/game/{ → BattleGround}/BattleGroundBE.cpp
  21. 0 src/game/{ → BattleGround}/BattleGroundBE.h
  22. 0 src/game/{ → BattleGround}/BattleGroundDS.cpp
  23. 0 src/game/{ → BattleGround}/BattleGroundDS.h
  24. +638 −0 src/game/BattleGround/BattleGroundEY.cpp
  25. +328 −0 src/game/BattleGround/BattleGroundEY.h
  26. +43 −29 src/game/{ → BattleGround}/BattleGroundHandler.cpp
  27. 0 src/game/{ → BattleGround}/BattleGroundIC.cpp
  28. 0 src/game/{ → BattleGround}/BattleGroundIC.h
  29. +3 −2 src/game/{ → BattleGround}/BattleGroundMgr.cpp
  30. 0 src/game/{ → BattleGround}/BattleGroundMgr.h
  31. 0 src/game/{ → BattleGround}/BattleGroundNA.cpp
  32. 0 src/game/{ → BattleGround}/BattleGroundNA.h
  33. 0 src/game/{ → BattleGround}/BattleGroundRB.cpp
  34. 0 src/game/{ → BattleGround}/BattleGroundRB.h
  35. 0 src/game/{ → BattleGround}/BattleGroundRL.cpp
  36. 0 src/game/{ → BattleGround}/BattleGroundRL.h
  37. 0 src/game/{ → BattleGround}/BattleGroundRV.cpp
  38. 0 src/game/{ → BattleGround}/BattleGroundRV.h
  39. 0 src/game/{ → BattleGround}/BattleGroundSA.cpp
  40. 0 src/game/{ → BattleGround}/BattleGroundSA.h
  41. +46 −48 src/game/{ → BattleGround}/BattleGroundWS.cpp
  42. +16 −16 src/game/{ → BattleGround}/BattleGroundWS.h
  43. +0 −764 src/game/BattleGroundEY.cpp
  44. +0 −327 src/game/BattleGroundEY.h
  45. +2 −1 src/game/CMakeLists.txt
  46. +1 −1 src/game/Channel.cpp
  47. +2 −1 src/game/CharacterHandler.cpp
  48. +39 −12 src/game/Creature.cpp
  49. +2 −0 src/game/Creature.h
  50. +1 −0 src/game/CreatureEventAIMgr.cpp
  51. +27 −0 src/game/DBCEnums.h
  52. +3 −5 src/game/DBCStores.cpp
  53. +2 −2 src/game/DBCStores.h
  54. +0 −9 src/game/DBCStructure.h
  55. +1 −1 src/game/GameEventMgr.cpp
  56. +44 −44 src/game/GameObject.cpp
  57. +4 −6 src/game/GameObject.h
  58. +1 −1 src/game/GridNotifiers.cpp
  59. +3 −3 src/game/GridNotifiers.h
  60. +3 −3 src/game/Group.cpp
  61. +1 −1 src/game/Group.h
  62. +0 −1 src/game/InstanceData.h
  63. +2 −1 src/game/Language.h
  64. +3 −3 src/game/Level2.cpp
  65. +2 −2 src/game/Level3.cpp
  66. +1 −1 src/game/LootHandler.cpp
  67. +1 −1 src/game/LootMgr.cpp
  68. +18 −42 src/game/Map.cpp
  69. +2 −3 src/game/Map.h
  70. +2 −60 src/game/MapManager.cpp
  71. +0 −1 src/game/MapManager.h
  72. +5 −5 src/game/MapPersistentStateMgr.cpp
  73. +3 −3 src/game/MapPersistentStateMgr.h
  74. +52 −112 src/game/MiscHandler.cpp
  75. +18 −22 src/game/MovementHandler.cpp
  76. +2 −5 src/game/NPCHandler.cpp
  77. +13 −5 src/game/Object.cpp
  78. +8 −0 src/game/Object.h
  79. +117 −34 src/game/ObjectMgr.cpp
  80. +12 −1 src/game/ObjectMgr.h
  81. +4 −4 src/game/Opcodes.cpp
  82. +27 −13 src/game/OutdoorPvP/OutdoorPvP.cpp
  83. +11 −8 src/game/OutdoorPvP/OutdoorPvP.h
  84. +9 −7 src/game/OutdoorPvP/OutdoorPvPEP.cpp
  85. +2 −2 src/game/OutdoorPvP/OutdoorPvPEP.h
  86. +11 −9 src/game/OutdoorPvP/OutdoorPvPGH.cpp
  87. +8 −6 src/game/OutdoorPvP/OutdoorPvPHP.cpp
  88. +2 −2 src/game/OutdoorPvP/OutdoorPvPHP.h
  89. +5 −6 src/game/OutdoorPvP/OutdoorPvPMgr.cpp
  90. +6 −4 src/game/OutdoorPvP/OutdoorPvPMgr.h
  91. +15 −13 src/game/OutdoorPvP/OutdoorPvPNA.cpp
  92. +3 −3 src/game/OutdoorPvP/OutdoorPvPNA.h
  93. +6 −6 src/game/OutdoorPvP/OutdoorPvPSI.cpp
  94. +1 −1 src/game/OutdoorPvP/OutdoorPvPSI.h
  95. +16 −12 src/game/OutdoorPvP/OutdoorPvPTF.cpp
  96. +1 −1 src/game/OutdoorPvP/OutdoorPvPTF.h
  97. +9 −7 src/game/OutdoorPvP/OutdoorPvPZM.cpp
  98. +2 −2 src/game/OutdoorPvP/OutdoorPvPZM.h
  99. +1 −1 src/game/PathFinder.cpp
  100. +6 −1 src/game/Pet.cpp
  101. +273 −124 src/game/Player.cpp
  102. +11 −19 src/game/Player.h
  103. +1 −1 src/game/QuestHandler.cpp
  104. +4 −4 src/game/SQLStorages.cpp
  105. +2 −0 src/game/ScriptMgr.cpp
  106. +56 −1 src/game/SharedDefines.h
  107. +65 −34 src/game/Spell.cpp
  108. +13 −15 src/game/Spell.h
  109. +68 −32 src/game/SpellAuras.cpp
  110. +4 −4 src/game/SpellAuras.h
  111. +128 −37 src/game/SpellEffects.cpp
  112. +4 −4 src/game/SpellHandler.cpp
  113. +1 −1 src/game/SpellMgr.cpp
  114. +4 −3 src/game/SpellMgr.h
  115. +4 −2 src/game/TargetedMovementGenerator.h
  116. +189 −0 src/game/TransportSystem.cpp
  117. +128 −0 src/game/TransportSystem.h
  118. +172 −85 src/game/Unit.cpp
  119. +19 −12 src/game/Unit.h
  120. +1 −1 src/game/UnitAuraProcHandler.cpp
  121. +439 −3 src/game/Vehicle.cpp
  122. +64 −8 src/game/Vehicle.h
  123. +133 −0 src/game/VehicleHandler.cpp
  124. +10 −2 src/game/World.cpp
  125. +2 −0 src/game/World.h
  126. +26 −1 src/game/WorldSession.cpp
  127. +14 −2 src/game/WorldSession.h
  128. +1 −1 src/game/debugcmds.cpp
  129. +7 −5 src/game/movement/MoveSplineFlag.h
  130. +17 −2 src/game/movement/MoveSplineInit.cpp
  131. +11 −1 src/game/movement/MoveSplineInit.h
  132. +1 −1 src/game/pchdef.cpp
  133. +1 −1 src/mangosd/RASocket.cpp
  134. +1 −6 src/mangosd/WorldRunnable.cpp
  135. +4 −2 src/shared/Database/Database.h
  136. +2 −2 src/shared/Database/DatabaseMysql.cpp
  137. +1 −1 src/shared/Database/DatabaseMysql.h
  138. +2 −1 src/shared/Database/SqlPreparedStatement.cpp
  139. +4 −1 src/shared/Database/SqlPreparedStatement.h
  140. +1 −1 src/shared/Timer.h
  141. +1 −1 src/shared/Util.cpp
  142. +1 −1 src/shared/revision_nr.h
  143. +1 −1 src/shared/revision_sql.h
  144. +41 −38 win/VC100/game.vcxproj
  145. +105 −93 win/VC100/game.vcxproj.filters
  146. +149 −133 win/VC90/game.vcproj
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -236,11 +236,11 @@ Where "A -> B" means that the command is executed from A with B as target.
23 SCRIPT_COMMAND_MORPH_TO_ENTRY_OR_MODEL resultingSource = Creature
* datalong=creature entry/modelid (depend on data_flags) OR 0 to demorph
- * data_flags= 0x01 to use datalong value as modelid explicit
+ * data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL: use datalong value as modelid explicit
24 SCRIPT_COMMAND_MOUNT_TO_ENTRY_OR_MODEL resultingSource = Creature
* datalong=creature entry/modelid (depend on data_flags) OR 0 to dismount
- * data_flags= 0x01 to use datalong value as modelid explicit
+ * data_flags & SCRIPT_FLAG_COMMAND_ADDITIONAL: use datalong value as modelid explicit
25 SCRIPT_COMMAND_SET_RUN resultingSource = Creature
* datalong= bool 0=off, 1=on
View
@@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`creature_ai_version` varchar(120) default NULL,
`cache_id` int(10) default '0',
- `required_12097_01_mangos_mangos_string` bit(1) default NULL
+ `required_12148_02_mangos_mangos_string` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@@ -141,7 +141,6 @@ CREATE TABLE `areatrigger_teleport` (
`heroic_key2` mediumint(8) unsigned NOT NULL default '0',
`required_quest_done` int(11) unsigned NOT NULL default '0',
`required_quest_done_heroic` int(11) unsigned NOT NULL default '0',
- `required_failed_text` text,
`target_map` smallint(5) unsigned NOT NULL default '0',
`target_position_x` float NOT NULL default '0',
`target_position_y` float NOT NULL default '0',
@@ -3932,6 +3931,7 @@ INSERT INTO `mangos_string` VALUES
(815,'Initiate',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(816,'Your body is too exhausted to travel to the Spectral Realm.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(817,'Warning: You\'ve entered a no-fly zone and are about to be dismounted!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+(818,'You can\'t enter Black Morass until you rescue Thrall from Durnholde Keep.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1000,'Exiting daemon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1001,'Account deleted: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(1002,'Account %s NOT deleted (probably sql file format was updated)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
@@ -18040,6 +18040,7 @@ CREATE TABLE `spell_template` (
`effect0_radius_idx` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_apply_aura_name` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_misc_value` int(11) unsigned NOT NULL DEFAULT '0',
+ `effect0_misc_value_b` int(11) unsigned NOT NULL DEFAULT '0',
`effect0_trigger_spell` int(11) unsigned NOT NULL DEFAULT '0',
`comments` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
@@ -18051,20 +18052,28 @@ CREATE TABLE `spell_template` (
LOCK TABLES `spell_template` WRITE;
/*!40000 ALTER TABLE `spell_template` DISABLE KEYS */;
INSERT INTO `spell_template` VALUES
--- ID proc_flags chnce dur ef0 tarA0 rad aur misc trigger
-(21387, 0x00000028, 15, 21, 6, 1, 0, 42, 0, 21388, 'Melt-Weapon trigger aura related used by Ragnaros'),
-(23363, 0x00000000, 101, 21, 76, 18, 0, 0, 179804, 0, 'Summon Drakonid Corpse Trigger'),
-(25192, 0x00000000, 101, 21, 76, 18, 0, 0, 180619, 0, 'Summon Ossirian Crystal'),
-(26133, 0x00000000, 101, 21, 76, 18, 0, 0, 180795, 0, 'Summon Sandworm Base'),
-(44920, 0x00000000, 101, 21, 6, 1, 0, 56, 24941, 0, 'Model - Shattered Sun Marksman - BE Male Tier 4'),
-(44924, 0x00000000, 101, 21, 6, 1, 0, 56, 24945, 0, 'Model - Shattered Sun Marksman - BE Female Tier 4'),
-(44928, 0x00000000, 101, 21, 6, 1, 0, 56, 24949, 0, 'Model - Shattered Sun Marksman - Draenei Male Tier 4'),
-(44932, 0x00000000, 101, 21, 6, 1, 0, 56, 24953, 0, 'Model - Shattered Sun Marksman - Draenei Female Tier 4'),
-(45158, 0x00000000, 101, 21, 6, 1, 0, 56, 25119, 0, 'Model - Shattered Sun Warrior - BE Female Tier 4'),
-(45162, 0x00000000, 101, 21, 6, 1, 0, 56, 25123, 0, 'Model - Shattered Sun Warrior - BE Male Tier 4'),
-(45166, 0x00000000, 101, 21, 6, 1, 0, 56, 25127, 0, 'Model - Shattered Sun Warrior - Draenei Female Tier 4'),
-(45170, 0x00000000, 101, 21, 6, 1, 0, 56, 25131, 0, 'Model - Shattered Sun Warrior - Draenei Male Tier 4'),
-(62388, 0x00000000, 101, 21, 6, 1, 0, 4, 0, 0, 'Aura required for Demonic Circle 48020');
+-- id proc_flags chnce dur ef0 tarA0 rad aur misc miscB, trigger
+(21387, 0x00000028, 15, 21, 6, 1, 0, 42, 0, 0, 21388, 'Melt-Weapon trigger aura related used by Ragnaros'),
+(23363, 0x00000000, 101, 21, 76, 18, 0, 0, 179804, 0, 0, 'Summon Drakonid Corpse Trigger'),
+(25192, 0x00000000, 101, 21, 76, 18, 0, 0, 180619, 0, 0, 'Summon Ossirian Crystal'),
+(26133, 0x00000000, 101, 21, 76, 18, 0, 0, 180795, 0, 0, 'Summon Sandworm Base'),
+(34810, 0x00000000, 101, 21, 28, 42, 8, 0, 20083, 64, 0, 'Summon Summoned Bloodwarder Mender behind of the caster'),
+(34817, 0x00000000, 101, 21, 28, 44, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist right of the caster'),
+(34818, 0x00000000, 101, 21, 28, 43, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist left of the caster'),
+(34819, 0x00000000, 101, 21, 28, 41, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist front of the caster'),
+(35153, 0x00000000, 101, 21, 28, 42, 8, 0, 20405, 64, 0, 'Summon Nether Charge behind of the caster'),
+(35904, 0x00000000, 101, 21, 28, 44, 8, 0, 20405, 64, 0, 'Summon Nether Charge right of the caster'),
+(35905, 0x00000000, 101, 21, 28, 43, 8, 0, 20405, 64, 0, 'Summon Nether Charge left of the caster'),
+(35906, 0x00000000, 101, 21, 28, 41, 8, 0, 20405, 64, 0, 'Summon Nether Charge front of the caster'),
+(44920, 0x00000000, 101, 21, 6, 1, 0, 56, 24941, 0, 0, 'Model - Shattered Sun Marksman - BE Male Tier 4'),
+(44924, 0x00000000, 101, 21, 6, 1, 0, 56, 24945, 0, 0, 'Model - Shattered Sun Marksman - BE Female Tier 4'),
+(44928, 0x00000000, 101, 21, 6, 1, 0, 56, 24949, 0, 0, 'Model - Shattered Sun Marksman - Draenei Male Tier 4'),
+(44932, 0x00000000, 101, 21, 6, 1, 0, 56, 24953, 0, 0, 'Model - Shattered Sun Marksman - Draenei Female Tier 4'),
+(45158, 0x00000000, 101, 21, 6, 1, 0, 56, 25119, 0, 0, 'Model - Shattered Sun Warrior - BE Female Tier 4'),
+(45162, 0x00000000, 101, 21, 6, 1, 0, 56, 25123, 0, 0, 'Model - Shattered Sun Warrior - BE Male Tier 4'),
+(45166, 0x00000000, 101, 21, 6, 1, 0, 56, 25127, 0, 0, 'Model - Shattered Sun Warrior - Draenei Female Tier 4'),
+(45170, 0x00000000, 101, 21, 6, 1, 0, 56, 25131, 0, 0, 'Model - Shattered Sun Warrior - Draenei Male Tier 4'),
+(62388, 0x00000000, 101, 21, 6, 1, 0, 4, 0, 0, 0, 'Aura required for Demonic Circle 48020');
/*!40000 ALTER TABLE `spell_template` ENABLE KEYS */;
UNLOCK TABLES;
@@ -0,0 +1,3 @@
+ALTER TABLE db_version CHANGE COLUMN required_12097_01_mangos_mangos_string required_12112_01_mangos_spell_template bit;
+
+ALTER TABLE spell_template ADD COLUMN effect0_misc_value_b int(11) unsigned NOT NULL DEFAULT '0' AFTER effect0_misc_value;
@@ -0,0 +1,12 @@
+ALTER TABLE db_version CHANGE COLUMN required_12112_01_mangos_spell_template required_12113_01_mangos_spell_template bit;
+
+DELETE FROM spell_template WHERE id IN (34810, 34817, 34818, 34819, 35153, 35904, 35905, 35906);
+INSERT INTO spell_template VALUES
+(34810, 0x00000000, 101, 21, 28, 42, 8, 0, 20083, 64, 0, 'Summon Summoned Bloodwarder Mender behind of the caster'),
+(34817, 0x00000000, 101, 21, 28, 44, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist right of the caster'),
+(34818, 0x00000000, 101, 21, 28, 43, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist left of the caster'),
+(34819, 0x00000000, 101, 21, 28, 41, 8, 0, 20078, 64, 0, 'Summon Summoned Bloodwarder Reservist front of the caster'),
+(35153, 0x00000000, 101, 21, 28, 42, 8, 0, 20405, 64, 0, 'Summon Nether Charge behind of the caster'),
+(35904, 0x00000000, 101, 21, 28, 44, 8, 0, 20405, 64, 0, 'Summon Nether Charge right of the caster'),
+(35905, 0x00000000, 101, 21, 28, 43, 8, 0, 20405, 64, 0, 'Summon Nether Charge left of the caster'),
+(35906, 0x00000000, 101, 21, 28, 41, 8, 0, 20405, 64, 0, 'Summon Nether Charge front of the caster');
@@ -0,0 +1,3 @@
+ALTER TABLE db_version CHANGE COLUMN required_12113_01_mangos_spell_template required_12148_01_mangos_areatrigger_teleport bit;
+
+ALTER TABLE areatrigger_teleport DROP COLUMN required_failed_text;
@@ -0,0 +1,5 @@
+ALTER TABLE db_version CHANGE COLUMN required_12148_01_mangos_areatrigger_teleport required_12148_02_mangos_mangos_string bit;
+
+DELETE FROM mangos_string WHERE entry=818;
+INSERT INTO mangos_string VALUES
+(818,'You can\'t enter Black Morass until you rescue Thrall from Durnholde Keep.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -36,8 +36,8 @@
#include "CellImpl.h"
#include "Language.h"
#include "MapManager.h"
-#include "BattleGround.h"
-#include "BattleGroundAB.h"
+#include "BattleGround/BattleGround.h"
+#include "BattleGround/BattleGroundAB.h"
#include "Map.h"
#include "InstanceData.h"
#include "DBCStructure.h"
@@ -922,7 +922,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
case 156: // AB, win while controlling all 5 flags (all nodes)
case 784: // EY, win while holding 4 bases (all nodes)
{
- if (!bg->IsAllNodesConrolledByTeam(GetPlayer()->GetTeam()))
+ if (!bg->IsAllNodesControlledByTeam(GetPlayer()->GetTeam()))
continue;
break;
}
@@ -2556,7 +2556,7 @@ void AchievementGlobalMgr::LoadCompletedAchievements()
delete result;
sLog.outString();
- sLog.outString(">> Loaded %lu realm completed achievements.", (unsigned long)m_allCompletedAchievements.size());
+ sLog.outString(">> Loaded " SIZEFMTD " realm completed achievements.", m_allCompletedAchievements.size());
}
void AchievementGlobalMgr::LoadRewards()
@@ -2783,5 +2783,5 @@ void AchievementGlobalMgr::LoadRewardLocales()
delete result;
sLog.outString();
- sLog.outString(">> Loaded %lu achievement reward locale strings", (unsigned long)m_achievementRewardLocales.size());
+ sLog.outString(">> Loaded " SIZEFMTD " achievement reward locale strings", m_achievementRewardLocales.size());
}
@@ -1,10 +1,10 @@
#include "AuctionHouseBot.h"
#include "ProgressBar.h"
#include "Log.h"
-#include "../ObjectMgr.h"
-#include "../AuctionHouseMgr.h"
+#include "ObjectMgr.h"
+#include "AuctionHouseMgr.h"
#include "SystemConfig.h"
-#include "../SQLStorages.h"
+#include "SQLStorages.h"
// Format is YYYYMMDDRR where RR is the change in the conf file
// for that day.
@@ -1,11 +1,11 @@
#ifndef AUCTION_HOUSE_BOT_H
#define AUCTION_HOUSE_BOT_H
-#include "../World.h"
+#include "World.h"
#include "Config/Config.h"
-#include "../AuctionHouseMgr.h"
-#include "../SharedDefines.h"
-#include "../Item.h"
+#include "AuctionHouseMgr.h"
+#include "SharedDefines.h"
+#include "Item.h"
// shadow of ItemQualities with skipped ITEM_QUALITY_HEIRLOOM, anything after ITEM_QUALITY_ARTIFACT(6) in fact
enum AuctionQuality
@@ -557,6 +557,7 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(Unit* unit)
{
case ALLIANCE: houseid = player->GetAuctionAccessMode() == 0 ? 1 : 6; break;
case HORDE: houseid = player->GetAuctionAccessMode() == 0 ? 6 : 1; break;
+ default: break;
}
}
}
@@ -73,7 +73,7 @@ namespace MaNGOS
data << ObjectGuid(targetGuid);
data << uint32(strlen(text) + 1);
data << text;
- data << uint8(i_source ? i_source->GetChatTag() : CHAT_TAG_NONE);
+ data << uint8(i_source ? i_source->GetChatTag() : uint8(CHAT_TAG_NONE));
}
ChatMsg i_msgtype;
@@ -152,7 +152,7 @@ namespace MaNGOS
data << ObjectGuid(targetGuid);
data << uint32(strlen(str) + 1);
data << str;
- data << uint8(i_source ? i_source->GetChatTag() : CHAT_TAG_NONE);
+ data << uint8(i_source ? i_source->GetChatTag() : uint8(CHAT_TAG_NONE));
}
private:
@@ -290,7 +290,7 @@ class BattleGround
virtual void StartingEventOpenDoors() {}
/* achievement req. */
- virtual bool IsAllNodesConrolledByTeam(Team /*team*/) const { return false; }
+ virtual bool IsAllNodesControlledByTeam(Team /*team*/) const { return false; }
bool IsTeamScoreInRange(Team team, uint32 minScore, uint32 maxScore) const;
/* Battleground */
@@ -458,7 +458,13 @@ class BattleGround
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);
- virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/) { return; };
+ virtual void HandleKillUnit(Creature* /*unit*/, Player* /*killer*/) {}
+
+ // Process Capture event
+ virtual bool HandleEvent(uint32 /*eventId*/, GameObject* /*go*/) { return false; }
+
+ // Called when a gameobject is created
+ virtual void HandleGameObjectCreate(GameObject* /*go*/) {}
/* Battleground events */
virtual void EventPlayerDroppedFlag(Player* /*player*/) {}
File renamed without changes.
@@ -27,7 +27,7 @@
#include "Util.h"
#include "WorldPacket.h"
#include "MapManager.h"
-#include "DBCStores.h" // TODO REMOVE this when graveyard handling for pvp is updated
+#include "DBCStores.h" // TODO REMOVE this when graveyard handling for pvp is updated
BattleGroundAB::BattleGroundAB()
{
@@ -113,17 +113,17 @@ void BattleGroundAB::Update(uint32 diff)
{
m_lastTick[team] -= BG_AB_TickIntervals[points];
m_TeamScores[team] += BG_AB_TickPoints[points];
- m_HonorScoreTics[team] += BG_AB_TickPoints[points];
+ m_honorScoreTicks[team] += BG_AB_TickPoints[points];
m_ReputationScoreTics[team] += BG_AB_TickPoints[points];
if (m_ReputationScoreTics[team] >= m_ReputationTics)
{
(team == BG_TEAM_ALLIANCE) ? RewardReputationToTeam(509, 10, ALLIANCE) : RewardReputationToTeam(510, 10, HORDE);
m_ReputationScoreTics[team] -= m_ReputationTics;
}
- if (m_HonorScoreTics[team] >= m_HonorTics)
+ if (m_honorScoreTicks[team] >= m_honorTicks)
{
RewardHonorToTeam(GetBonusHonorFromKill(1), (team == BG_TEAM_ALLIANCE) ? ALLIANCE : HORDE);
- m_HonorScoreTics[team] -= m_HonorTics;
+ m_honorScoreTicks[team] -= m_honorTicks;
}
if (!m_IsInformedNearVictory && m_TeamScores[team] > BG_AB_WARNING_NEAR_VICTORY_SCORE)
{
@@ -177,7 +177,7 @@ void BattleGroundAB::StartingEventOpenDoors()
OpenDoorEvent(BG_EVENT_DOOR);
// Players that join battleground after start are not eligible to get achievement.
- StartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, BG_AB_EVENT_START_BATTLE);
+ StartTimedAchievement(ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, AB_EVENT_START_BATTLE);
}
void BattleGroundAB::AddPlayer(Player* plr)
@@ -463,17 +463,17 @@ void BattleGroundAB::Reset()
for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i)
{
- m_TeamScores[i] = 0;
- m_lastTick[i] = 0;
- m_HonorScoreTics[i] = 0;
+ m_TeamScores[i] = 0;
+ m_lastTick[i] = 0;
+ m_honorScoreTicks[i] = 0;
m_ReputationScoreTics[i] = 0;
m_TeamScores500Disadvantage[i] = false;
}
- m_IsInformedNearVictory = false;
+ m_IsInformedNearVictory = false;
bool isBGWeekend = BattleGroundMgr::IsBGWeekend(GetTypeID());
- m_HonorTics = (isBGWeekend) ? BG_AB_ABBGWeekendHonorTicks : BG_AB_NotABBGWeekendHonorTicks;
- m_ReputationTics = (isBGWeekend) ? BG_AB_ABBGWeekendReputationTicks : BG_AB_NotABBGWeekendReputationTicks;
+ m_honorTicks = isBGWeekend ? AB_WEEKEND_HONOR_INTERVAL : AB_NORMAL_HONOR_INTERVAL;
+ m_ReputationTics = isBGWeekend ? AB_WEEKEND_REPUTATION_INTERVAL : AB_NORMAL_REPUTATION_INTERVAL;
for (uint8 i = 0; i < BG_AB_NODES_MAX; ++i)
{
@@ -563,11 +563,10 @@ void BattleGroundAB::UpdatePlayerScore(Player* source, uint32 type, uint32 value
bool BattleGroundAB::IsAllNodesControlledByTeam(Team team) const
{
- uint8 count = 0;
for (uint8 i = 0; i < BG_AB_NODES_MAX; ++i)
- if ((team == ALLIANCE && m_Nodes[i] == BG_AB_NODE_STATUS_ALLY_OCCUPIED) ||
- (team == HORDE && m_Nodes[i] == BG_AB_NODE_STATUS_HORDE_OCCUPIED))
- ++count;
+ if ((team == ALLIANCE && m_Nodes[i] != BG_AB_NODE_STATUS_ALLY_OCCUPIED) ||
+ (team == HORDE && m_Nodes[i] != BG_AB_NODE_STATUS_HORDE_OCCUPIED))
+ return false;
- return count == BG_AB_NODES_MAX;
+ return true;
}
@@ -135,11 +135,11 @@ enum BG_AB_Sounds
BG_AB_SOUND_NEAR_VICTORY = 8456
};
-#define BG_AB_NotABBGWeekendHonorTicks 330
-#define BG_AB_ABBGWeekendHonorTicks 200
-#define BG_AB_NotABBGWeekendReputationTicks 200
-#define BG_AB_ABBGWeekendReputationTicks 150
-#define BG_AB_EVENT_START_BATTLE 9158
+#define AB_NORMAL_HONOR_INTERVAL 260
+#define AB_WEEKEND_HONOR_INTERVAL 160
+#define AB_NORMAL_REPUTATION_INTERVAL 160
+#define AB_WEEKEND_REPUTATION_INTERVAL 120
+#define AB_EVENT_START_BATTLE 9158
// Tick intervals and given points: case 0,1,2,3,4,5 captured nodes
const uint32 BG_AB_TickIntervals[6] = {0, 12000, 9000, 6000, 3000, 1000};
@@ -202,7 +202,7 @@ class BattleGroundAB : public BattleGround
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/* achievement req. */
- bool IsAllNodesControlledByTeam(Team team) const; // overwrited
+ bool IsAllNodesControlledByTeam(Team team) const override;
bool IsTeamScores500Disadvantage(Team team) const { return m_TeamScores500Disadvantage[GetTeamIndexByTeamId(team)]; }
private:
/* Gameobject spawning/despawning */
@@ -227,10 +227,10 @@ class BattleGroundAB : public BattleGround
BG_AB_BannerTimer m_BannerTimers[BG_AB_NODES_MAX];
uint32 m_NodeTimers[BG_AB_NODES_MAX];
uint32 m_lastTick[BG_TEAMS_COUNT];
- uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
+ uint32 m_honorScoreTicks[BG_TEAMS_COUNT];
uint32 m_ReputationScoreTics[BG_TEAMS_COUNT];
bool m_IsInformedNearVictory;
- uint32 m_HonorTics;
+ uint32 m_honorTicks;
uint32 m_ReputationTics;
// need for achievements
bool m_TeamScores500Disadvantage[BG_TEAMS_COUNT];
Oops, something went wrong.

0 comments on commit ebae824

Please sign in to comment.