This commit is contained in:
Ovalord committed 2018-02-08 22:28:13 +01:00
commit 0d3daf1120
66 files changed
+1111 -552

No files matched your search

@@ -0,0 +1,4 @@
-- Quest: The Burning Blade
DELETE FROM `creature_loot_template` WHERE `Item`= 52564;
INSERT INTO `creature_loot_template` (`Entry`,`Item`,`Chance`,`QuestRequired`,`MinCount`,`MaxCount`) VALUES
(3196,52564,86,1,1,1),(3199,52564,64,1,1,1),(3195,52564,43,1,1,1);
@@ -0,0 +1,63 @@
/* creature */
SET @CGUID := 251569; -- Set necessary
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
(@CGUID+0,42560,0,40,109,1,1,169,0,0,0,-9855.52,1277.67,40.8733,5.64321,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+1,42403,0,40,109,1,1,169,0,0,0,-9854.61,1277.01,40.8672,5.54896,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+2,42386,0,40,109,1,1,169,0,32826,0,-9859.24,1279.61,41.0337,5.58039,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+3,42384,0,40,109,1,1,169,0,32819,0,-9861.03,1276.97,40.7707,0.110977,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+4,42384,0,40,109,1,1,169,0,32818,0,-9851.09,1273.94,41.0974,2.4279,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+5,42559,0,40,109,1,1,169,0,0,0,-9852.11,1274.83,41.0164,5.54593,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+6,42559,0,40,109,1,1,169,0,0,0,-9859.83,1276.11,40.7818,2.44651,120,0,0,0,0,0,0,0,0,'',18019),
(@CGUID+7,42558,0,40,109,1,1,169,0,0,0,-9854.99,1275.83,40.9068,1.43605,120,0,0,2865,0,0,0,0,0,'',18019);
UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276241;
UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276239;
UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276262;
UPDATE `creature` SET `spawndist` = 3 , `MovementType` = 1 WHERE `guid` = 276256;
/* creature addon */
DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7;
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES
(@CGUID+0,0,0,65536,0,0,0,0,0,29266),
(@CGUID+2,0,0,0,0,430,0,0,0,NULL),
(@CGUID+3,0,0,0,0,430,0,0,0,NULL),
(@CGUID+4,0,0,0,0,430,0,0,0,NULL),
(@CGUID+7,0,0,8,0,0,0,0,0,NULL);
DELETE FROM `creature_addon` WHERE `guid` IN (349939, 349940, 349978, 349979, 349980, 349981, 349982, 349983);
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES
(349939,0,0,0,1,333,0,0,0,NULL),
(349940,0,0,0,1,333,0,0,0,NULL),
(349978,0,0,0,1,333,0,0,0,NULL),
(349979,0,0,0,1,333,0,0,0,NULL),
(349980,0,0,0,1,333,0,0,0,NULL),
(349981,0,0,0,1,333,0,0,0,NULL),
(349982,0,0,0,1,333,0,0,0,NULL),
(349983,0,0,0,1,333,0,0,0,NULL);
/* quest template addon */
DELETE FROM `quest_template_addon` WHERE `ID` IN (26209, 26213, 26214, 26215, 26229, 26230, 26241, 26270, 26237, 26286, 26289, 26292, 26287, 26236, 26266);
INSERT INTO `quest_template_addon` (`ID`, `MaxLevel`, `AllowableClasses`, `SourceSpellID`, `PrevQuestID`, `NextQuestID`, `ExclusiveGroup`, `RewardMailTemplateID`, `RewardMailDelay`, `RequiredSkillID`, `RequiredSkillPoints`, `RequiredMinRepFaction`, `RequiredMaxRepFaction`, `RequiredMinRepValue`, `RequiredMaxRepValue`, `ProvidedItemCount`, `SpecialFlags`) VALUES
(26209,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(26215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
(26213,0,0,0,26209,26215,-26213,0,0,0,0,0,0,0,0,0,0),
(26214,0,0,0,26209,26215,-26213,0,0,0,0,0,0,0,0,0,0),
(26229,0,0,0,26215,0,0,0,0,0,0,0,0,0,0,0,0),
(26230,0,0,0,26215,0,0,0,0,0,0,0,0,0,0,0,0),
(26241,0,0,0,26236,0,0,0,0,0,0,0,0,0,0,0,0),
(26270,0,0,0,26241,0,0,0,0,0,0,0,0,0,0,0,0),
(26237,0,0,0,26236,0,0,0,0,0,0,0,0,0,0,0,0),
(26286,0,0,0,26266,0,0,0,0,0,0,0,0,0,0,0,0),
(26289,0,0,0,26286,0,0,0,0,0,0,0,0,0,0,0,0),
(26292,0,0,0,26291,0,0,0,0,0,0,0,0,0,0,0,0),
(26287,0,0,0,26266,0,0,0,0,0,0,0,0,0,0,0,0),
(26236,0,0,0,26232,0,0,0,0,0,0,0,0,0,0,0,0),
(26266,0,0,0,26270,0,0,0,0,0,0,0,0,0,0,1,0);
/* creature loot template */
DELETE FROM `creature_loot_template` WHERE `Entry`=114 AND `Item`=57935;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(114,57935,0,8.75,0,1,0,1,1,NULL);
UPDATE `creature_loot_template` SET `QuestRequired` = 1 WHERE `Entry` = 42677 AND `Item` = 58118;
@@ -0,0 +1,3 @@
--
UPDATE `smart_scripts` SET `target_param1`=(1 << `target_param1`) WHERE `target_type`=29;
--
@@ -0,0 +1,5 @@
-- Reanimated Abomination Abilities
UPDATE `creature_template` SET `spell1` = 59564, `spell2` = 59576 WHERE `entry` = 31692;
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_q13264_thats_abominable';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(59576, 'spell_q13264_thats_abominable');
@@ -0,0 +1,3 @@
-- amphitheater of anguish (12932) should be startable without completing "The Champion's Call!" (12974)
UPDATE `quest_template` SET `RewardNextQuest`=12932 WHERE `ID`=12974;
UPDATE `quest_template_addon` SET `PrevQuestID`=0 WHERE `ID`=12932;
@@ -0,0 +1,11 @@
/*
DELETE FROM `spell_custom_attr` WHERE `entry` IN (8187,10579,10580,10581,25550,58732,58735);
INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES
(8187, 0x10),
(10579,0x10),
(10580,0x10),
(10581,0x10),
(25550,0x10),
(58732,0x10),
(58735,0x10);
*/
@@ -0,0 +1,4 @@
-- A Rough Ride
UPDATE `smart_scripts` SET `target_type` = 23 WHERE `entryorguid` = 28308 and `id` IN (2,3);
-- Black Knights Order
UPDATE `smart_scripts` SET `target_type` = 23 WHERE `entryorguid` = 33519 and `id` IN (1,2);
@@ -0,0 +1,5 @@
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 600 AND 704;
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 724 AND 726;
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 753 AND 755;
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 1205 AND 1333;
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 10056 AND 10066;
@@ -0,0 +1,2 @@
-- Argent Guard Thaelrid
-- UPDATE `creature_template` SET `faction`=794 WHERE `entry`=4787;
@@ -0,0 +1,2 @@
-- UPDATE `spell_bonus_data` SET `direct_bonus`=0 WHERE `entry`=33763;
-- UPDATE `spell_bonus_data` SET `direct_bonus`=0.51623296 WHERE `entry`=33778;
@@ -0,0 +1 @@
DELETE FROM `spell_dbc` WHERE `Id`=100000;
@@ -0,0 +1,51 @@
UPDATE `smart_scripts` SET `event_param3`=240000, `event_param4`=240000 WHERE `entryorguid`=5734 AND `source_type`=0 AND `id`=0 AND `link`=0;
DELETE FROM `creature` WHERE `guid`=45218;
DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=5736;
DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=573400 ;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(573400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 0'),
(573400, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 11, 7794, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Cast Teleport'),
(573400, 9, 2, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 5736, 8, 0, 0, 0, 0, 8, 0, 0, 0, 1400.85, 363.242, -84.868, 1.11701, 'Apothecary Keever <Royal Apothecary Society> - Script - Spawn Caged Human Male'),
(573400, 9, 4, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(573400, 9, 5, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 1'),
(573400, 9, 6, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 2'),
(573400, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 8, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 5736, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Set Data 1 1 on Caged Human'),
(573400, 9, 9, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 3'),
(573400, 9, 10, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 4'),
(573400, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(573400, 9, 12, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 5'),
(573400, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 14, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 5742, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Set Data 2 2 on Caged Toad'),
(573400, 9, 15, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 6'),
(573400, 9, 16, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 7'),
(573400, 9, 17, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(573400, 9, 18, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 8'),
(573400, 9, 19, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 20, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 19, 5739, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Set Data 3 3 on Caged Squirrel'),
(573400, 9, 21, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 6'),
(573400, 9, 22, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 7'),
(573400, 9, 23, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(573400, 9, 24, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 11, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 8'),
(573400, 9, 25, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 26, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 4, 4, 0, 0, 0, 0, 19, 5741, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Set Data 4 4 on Caged Rabbit'),
(573400, 9, 27, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 1, 12, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 6'),
(573400, 9, 28, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(573400, 9, 29, 0, 0, 0, 100, 0, 13000, 13000, 0, 0, 1, 13, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 7'),
(573400, 9, 30, 0, 0, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Kneel'),
(573400, 9, 31, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 5, 5, 0, 0, 0, 0, 19, 5743, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Set Data 5 5 on Caged Sheep'),
(573400, 9, 32, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 1, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Say Line 8'),
(573400, 9, 33, 0, 0, 0, 100, 0, 0, 0, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Apothecary Keever <Royal Apothecary Society> - Script - Stand'),
(5736, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 36, 5742, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Toad'),
(5736, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5742, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Toad'),
(5736, 0, 2, 3, 38, 0, 100, 0, 2, 2, 0, 0, 36, 5739, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 2 2 Change Entry to Caged Sqirrel'),
(5736, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5739, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Squirrel'),
(5736, 0, 4, 5, 38, 0, 100, 0, 3, 3, 0, 0, 36, 5741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 3 3 Change Entry to Caged Rabbit'),
(5736, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5741, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Rabbit'),
(5736, 0, 6, 7, 38, 0, 100, 0, 4, 4, 0, 0, 36, 5743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 4 4 Change Entry to Caged Sheep'),
(5736, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 3, 5743, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 1 1 Change Entry to Caged Sheep'),
(5736, 0, 8, 9, 38, 0, 100, 0, 5, 5, 0, 0, 11, 7670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 Cast Explode'),
(5736, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 1000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Caged Human Male - On Data Set 5 5 - Run Script');
@@ -0,0 +1,14 @@
/*
-- Gavis Greyshield
DELETE FROM `smart_scripts` WHERE `entryorguid`= 23941 AND `source_type`= 0;
DELETE FROM `smart_scripts` WHERE `entryorguid`= 2394100 AND `source_type`= 9;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(23941, 0,0,0, 2,0,100, 1, 0, 15,0,0, 11, 42660,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Cast 'Gavis Greyshield Credit' (No Repeat)"),
(23941, 0,1,2, 2,0,100, 1, 0, 15,0,0, 80,2394100,2,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Run Script (No Repeat)"),
(23941, 0,2,3,61,0,100,512, 0, 0,0,0, 2, 35,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Set Faction 35"),
(23941, 0,3,4,61,0,100,512, 0, 0,0,0, 24, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Evade"),
(23941, 0,4,0,61,0,100,512, 0, 0,0,0,103, 1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - Between 0-15% Health - Set Root On"),
(2394100,9,0,0, 0,0,100, 0, 1000, 1000,0,0, 1, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 0"),
(2394100,9,1,0, 0,0,100, 0, 4000, 4000,0,0, 1, 1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Say Line 1"),
(2394100,9,2,0, 0,0,100, 0,10000,10000,0,0, 41, 0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Gavis Greyshield - On Script - Despawn");
*/
@@ -0,0 +1,7 @@
/*
-- Master Smith Burninate --> Fix gossip conditions
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=5962;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14,5962,7121,0,0,8,0,7722,0,0,0,0,0,"","Show gossip text 7121 if player has quest 'What the Flux?' rewarded"),
(14,5962,7121,0,0,5,0,59,128,0,0,0,0,"","Show gossip text 7121 if player is exalted with Thorium Brotherhood");
*/
@@ -0,0 +1,2 @@
-- Call to Arms! --> Fix Gossip Text
-- UPDATE `gossip_menu` SET `TextID`=7274 WHERE `MenuID`=6121;
@@ -0,0 +1,8 @@
/*
-- Primal Torntusk --> Add Gossip Text
UPDATE `creature_template` SET `gossip_menu_id`=6084 WHERE `entry`=14736;
DELETE FROM `gossip_menu` WHERE `MenuID`=6084;
INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
(6084,7238,0);
*/
@@ -0,0 +1,22 @@
/*
-- Fallen Hero of the Horde --> Fix gossip texts
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=840;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(14,840,1451,0,1,9,0,2801,0,0,0,0,0,"","Show gossip text 1451 if player has quest 'A Tale of Sorrow' taken");
DELETE FROM `gossip_menu` WHERE `MenuID` IN (841, 842);
INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
(841,1392,0),
(842,1411,0);
UPDATE `gossip_menu_option` SET `OptionText`="Why are you here?", `OptionBroadcastTextID`=3582, `ActionMenuID`=841 WHERE `MenuID`=840 AND `OptionID`=0;
DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (841, 842);
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(841,0,0,"Continue with your story.",3601,1,1,842,0,0,0,"",0,0),
(842,0,0,"Tragic...",3830,1,1,0,0,0,0,"",0,0);
DELETE FROM `smart_scripts` WHERE `entryorguid`=7572 AND `source_type`=0 AND `id` IN (0,1);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(7572,0,0,2,62,0,100,512,842,0,0,0,26,2784,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'Fall From Grace'"),
(7572,0,1,2,62,0,100,512,881,0,0,0,26,2801,0,0,0,0,0,7,0,0,0,0,0,0,0,"Fallen Hero of the Horde - On Gossip Option 0 Selected - Quest Credit 'A Tale of Sorrow'");
*/
@@ -0,0 +1,20 @@
/*
UPDATE `creature_template` SET `gossip_menu_id`=6522, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15127; -- Samuel Hawke
UPDATE `creature_template` SET `gossip_menu_id`=6521, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=15126; -- Rutherford Twing
UPDATE `creature_template` SET `gossip_menu_id`=6142, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=14753; -- Illiyana Moonblaze
UPDATE `creature_template` SET `gossip_menu_id`=6141, `npcflag`=4227, `type_flags`=134217728 WHERE `entry`=14754; -- Kelm Hargunth
DELETE FROM `gossip_menu` WHERE `MenuID` IN (6521,6522,6141,6142);
INSERT INTO `gossip_menu` (`MenuID`, `TextID`, `VerifiedBuild`) VALUES
(6522,7724,0), -- Samuel Hawke
(6521,7723,0), -- Rutherford Twing
(6142,7295,0), -- Illiyana Moonblaze
(6141,7294,0); -- Kelm Hargunth
DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (6521,6522,6141,6142);
INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES
(6522,0,1,"What goods have I earned the right to purchase from the League of Arathor?",10625,3,128,0,0,0,0,"",0,0), -- Samuel Hawke
(6521,0,1,"What goods have I earned the right to purchase from the Defilers?",10623,3,128,0,0,0,0,"",0,0), -- Rutherford Twing
(6142,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10021,3,128,0,0,0,0,"",0,0), -- Illiyana Moonblaze
(6141,0,1,"What goods have I earned the right to purchase for use in Warsong Gulch?",10019,3,128,0,0,0,0,"",0,0); -- Kelm Hargunth
*/
@@ -0,0 +1,2 @@
-- Kalaran Windblade --> Fix condition
-- UPDATE `conditions` SET `NegativeCondition`=1 WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=1323 AND `ConditionTypeOrReference`=2;
@@ -0,0 +1,30 @@
/*
-- Quest "The Torch of Retribution"
DELETE FROM `smart_scripts` WHERE `entryorguid`=847900 AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(847900,9,0,0,0,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Close Gossip"),
(847900,9,1,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Remove Npc Flags Gossip & Questgiver"),
(847900,9,2,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 0"),
(847900,9,3,0,0,0,100,0,0,0,0,0,17,69,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Emote State 69"),
(847900,9,4,0,0,0,100,0,10000,10000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"),
(847900,9,5,0,0,0,100,0,8000,8000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"),
(847900,9,6,0,0,0,100,0,7000,7000,0,0,11,12511,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Torch Combine'"),
(847900,9,7,0,0,0,100,0,10000,10000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 1"),
(847900,9,8,0,0,0,100,0,7000,7000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Emote State 0"),
(847900,9,9,0,0,0,100,0,1000,1000,0,0,11,12512,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Cast 'Kalaran Conjures Torch'"),
(847900,9,10,0,0,0,100,0,1000,1000,0,0,70,180,0,0,0,0,0,14,24166,149410,0,0,0,0,0,"Kalaran Windblade - On Script - Respawn Light of Retribution"),
(847900,9,11,0,0,0,100,0,0,0,0,0,70,180,0,0,0,0,0,14,16762,149047,0,0,0,0,0,"Kalaran Windblade - On Script - Respawn Torch of Retribution"),
(847900,9,12,0,0,0,100,0,3000,3000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 2"),
(847900,9,13,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Set Flag Standstate Kneel"),
(847900,9,14,0,0,0,100,0,2000,2000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Say Line 3"),
(847900,9,15,0,0,0,100,0,2000,2000,0,0,15,3453,0,0,0,0,0,7,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Quest Credit 'The Torch of Retribution'"),
(847900,9,16,0,0,0,100,0,2000,2000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Remove Flag Standstate Kneel"),
(847900,9,17,0,0,0,100,0,0,0,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Script - Add Npc Flags Gossip & Questgiver");
DELETE FROM `creature_text` WHERE `CreatureID`=8479;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(8479,0,0,"%s chants in an unknown tongue.",16,0,100,0,0,0,4447,0,"Kalaran Windblade"),
(8479,1,0,"Be patient, $n. The torch is almost complete.",12,0,100,1,0,0,4448,0,"Kalaran Windblade"),
(8479,2,0,"%s falls to one knee. He looks exhausted.",16,0,100,0,0,0,4449,0,"Kalaran Windblade"),
(8479,3,0,"It is done...",12,0,100,0,0,0,4450,0,"Kalaran Windblade");
*/
@@ -0,0 +1,24 @@
/*
-- Quest "The Key to Freedom"
-- Wooden Outhouse
DELETE FROM `smart_scripts` WHERE `entryorguid`=173265 AND `source_type`=1 AND `id` IN (1,2,3);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(173265,1,1,0,20,0,100,0,4451,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Store Targetlist"),
(173265,1,2,0,20,0,100,0,4451,0,0,0,12,9876,3,30000,0,0,0,8,0,0,0,-7026.11,-1784.73,265.782,2.11562,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Summon Creature 'Locheed'"),
(173265,1,3,0,20,0,100,0,4451,0,0,0,100,1,0,0,0,0,0,19,9876,0,0,0,0,0,0,"Goodsteel Ledger - On Quest 'The Key to Freedom' Finished - Send Targetlist to Locheed");
-- Locheed
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9876;
DELETE FROM `smart_scripts` WHERE `entryorguid`=9876 AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=987600 AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(9876,0,0,0,11,0,100,0,0,0,0,0,80,987600,0,0,0,0,0,1,0,0,0,0,0,0,0,"Locheed - On Respawn - Run Script"),
(987600,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Locheed - On Respawn - Say Line 0"),
(987600,9,1,0,0,0,100,0,4000,4000,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,"Locheed - On Respawn - Say Line 1"),
(987600,9,2,0,0,0,100,0,6000,6000,0,0,69,0,0,0,0,0,0,8,0,0,0,-7165.31,-1802.59,272.783,3.01882,"Locheed - On Respawn - Move to Position");
DELETE FROM `creature_text` WHERE `CreatureID`=9876;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(9876,0,0,"Ach! Thank you so much, $n! I'm free! Finally!",12,0,100,4,0,0,5407,0,"Locheed"),
(9876,1,0,"You take care of yourself! I'm gettin' out o' here.",12,0,100,5,0,0,5408,0,"Locheed");
*/
@@ -0,0 +1,49 @@
/*
-- Quest "Set Them Ablaze!"
-- Squire Maltrake
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8509;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8509 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8509,0,0,0,20,0,100,0,3463,0,0,0,45,1,1,0,0,0,0,19,8479,0,0,0,0,0,0,"Squire Maltrake - On Quest 'Set Them Ablaze!' Finished - Set Data to Kalaran Windblade");
-- Kalaran Windblade
DELETE FROM `smart_scripts` WHERE `entryorguid`=8479 AND `source_type`=0 AND `id` IN (7,8);
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8479,0,7,0,38,0,100,0,1,1,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Data Set - Despawn"),
(8479,0,8,0,38,0,100,0,1,1,0,0,12,8480,3,68000,0,0,0,1,0,0,0,0,0,0,0,"Kalaran Windblade - On Data Set - Summon Creature 'Kalaran the Deceiver'");
-- Kalaran the Deceiver
UPDATE `creature_template` SET `AIName`="SmartAI", `InhabitType`=7, `speed_run`=2 WHERE `entry`=8480;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8480 AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=848000 AND `source_type`=9;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8480,0,0,0,54,0,100,0,0,0,0,0,80,848000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - Just Summoned - Run Script"),
(848000,9,0,0,0,0,100,0,1000,1000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 0"),
(848000,9,1,0,0,0,100,0,3000,3000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 1"),
(848000,9,2,0,0,0,100,0,4000,4000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 2"),
(848000,9,3,0,0,0,100,0,6000,6000,0,0,1,0,0,0,0,0,0,19,8509,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 0 (Squire Maltrake)"),
(848000,9,4,0,0,0,100,0,2000,2000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.65994,"Kalaran the Deceiver - On Script - Set Orientation"),
(848000,9,5,0,0,0,100,0,3000,3000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 3"),
(848000,9,6,0,0,0,100,0,3000,3000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 4"),
(848000,9,7,0,0,0,100,0,9000,9000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 5"),
(848000,9,8,0,0,0,100,0,5000,5000,0,0,1,1,0,0,0,0,0,19,8509,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 1 (Squire Maltrake)"),
(848000,9,9,0,0,0,100,0,3000,3000,0,0,1,6,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 6"),
(848000,9,10,0,0,0,100,0,4000,4000,0,0,1,7,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 7"),
(848000,9,11,0,0,0,100,0,5000,5000,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Kalaran the Deceiver - On Script - Say Line 8"),
(848000,9,12,0,0,0,100,0,6000,6000,0,0,69,0,0,0,0,0,0,8,0,0,0,-6879.3,-1187.34,293.384,0,"Kalaran the Deceiver - On Script - Move to Position");
-- Texts
DELETE FROM `creature_text` WHERE `CreatureID` IN (8480, 8509);
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(8480,0,0,"Glorious, indeed, Maltrake. It looks as if my plan worked perfectly. Wouldn't you say so, mortal?",12,0,100,0,0,0,4456,0,"Kalaran the Deceiver"),
(8480,1,0,"%s lets loose a reptilian laugh... at least you think it's a laugh.",16,0,100,0,0,0,4458,0,"Kalaran the Deceiver"),
(8480,2,0,"You would not have helped the legion of Blackrock had we just asked for your assistance, now would you?",12,0,100,0,0,0,4457,0,"Kalaran the Deceiver"),
(8480,3,0,"SILENCE FOOL!",12,0,100,0,0,0,4460,0,"Kalaran the Deceiver"),
(8480,4,0,"They will live, if only to see the fruits of their labor: the destruction and chaos that will surely ensue as the legion of Blackrock invade the gorge.",12,0,100,0,0,0,4461,0,"Kalaran the Deceiver"),
(8480,5,0,"I leave you now, mortals. Alive and with these trinkets. Maltrake! Present them with the trinkets!",12,0,100,0,0,0,4462,0,"Kalaran the Deceiver"),
(8480,6,0,"Oh yes, the molt - do not lose it. There are those of my kin in the Burning Steppes that would craft items that only the molt of the black Dragonflight could fortify.",12,0,100,0,0,0,4463,0,"Kalaran the Deceiver"),
(8480,7,0,"%s begins to flap his massive wings faster. He is preparing for flight.",16,0,100,0,0,0,4464,0,"Kalaran the Deceiver"),
(8480,8,0,"The legion of Blackrock comes, dwarflings! We shall scorch the earth and set fire to the heavens. None shall survive...",14,0,100,0,0,0,4465,0,"Kalaran the Deceiver"),
(8509,0,0,"What will we do with them, master? They are of no use to us anymore.",12,0,100,6,0,0,4459,0,"Squire Maltrake"),
(8509,1,0,"Right away, master!",12,0,100,2,0,0,4468,0,"Squire Maltrake");
*/
@@ -0,0 +1,142 @@
/*
-- Glassweb Spider
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5856;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5856 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5856,0,0,0,25,0,100,0,0,0,0,0,11,13299,0,0,0,0,0,1,0,0,0,0,0,0,0,"Glassweb Spider - On Reset - Cast Poison Proc"),
(5856,0,1,0,9,0,100,0,0,20,8000,11000,11,745,0,0,0,0,0,2,0,0,0,0,0,0,0,"Glassweb Spider - Within 0-20 Range - Cast Web");
-- Shleipnarr
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8280;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8280 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8280,0,0,0,0,0,100,0,3000,4000,12000,15000,11,13321,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shleipnarr - In Combat - Cast Mana Burn"),
(8280,0,1,0,0,0,100,0,8000,10000,25000,32000,11,7399,0,0,0,0,0,5,0,0,0,0,0,0,0,"Shleipnarr - In Combat - Cast Terrify");
-- Dark Iron Geologist
UPDATE `smart_scripts` SET `event_param3`=3000, `event_param4`=5000 WHERE `entryorguid`=5839 AND `source_type`=0 AND `id`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5839 AND `source_type`=0 AND `id`=1;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5839,0,1,0,9,0,100,0,5,30,12000,14000,11,8858,0,0,0,0,0,2,0,0,0,0,0,0,0,"Dark Iron Geologist - Within 5-30 Range - Cast Bomb");
-- Magma Elemental
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5855;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5855 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5855,0,0,0,0,0,100,0,5000,9000,12000,16000,11,11970,2,0,0,0,0,2,0,0,0,0,0,0,0,"Magma Elemental - In Combat - Cast Fire Nova");
-- Heavy War Golem
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5854;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5854 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5854,0,0,0,9,0,100,0,0,5,13000,19000,11,12612,0,0,0,0,0,1,0,0,0,0,0,0,0,"Heavy War Golem - Within 0-5 Range - Cast Stomp"),
(5854,0,1,0,0,0,100,0,5000,8000,11000,17000,11,5568,0,0,0,0,0,1,0,0,0,0,0,0,0,"Heavy War Golem - In Combat - Cast Trample");
-- Inferno Elemental
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5852;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5852 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5852,0,0,0,0,0,100,0,6000,9000,11000,14000,11,10733,0,0,0,0,0,2,0,0,0,0,0,0,0,"Inferno Elemental - In Combat - Cast Flame Spray");
-- Margol the Rager
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5833;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5833 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5833,0,0,0,0,0,100,0,3000,5000,8000,14000,11,15549,0,0,0,0,0,2,0,0,0,0,0,0,0,"Margol the Rager - In Combat - Cast Chained Bolt"),
(5833,0,1,0,0,0,100,0,8000,12000,16000,20000,11,8147,0,0,0,0,0,1,0,0,0,0,0,0,0,"Margol the Rager - In Combat - Cast Thunderclap");
-- Rekk'tilac
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8277;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8277 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8277,0,0,0,0,0,100,0,7000,9000,16000,18000,11,3583,2,0,0,0,0,2,0,0,0,0,0,0,0,"Rekk'tilac - In Combat - Cast Deadly Poison");
-- Scald
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8281;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8281 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8281,0,0,0,0,0,100,0,3000,5000,14000,16000,11,11962,0,0,0,0,0,2,0,0,0,0,0,0,0,"Scald - In Combat - Cast Immolate");
-- Greater Lava Spider
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5858;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5858 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5858,0,0,0,0,0,100,0,1000,5000,7000,13000,11,11985,0,0,0,0,0,2,0,0,0,0,0,0,0,"Greater Lava Spider - In Combat - Cast Fireball");
-- Slave Worker
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5843;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5843 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5843,0,0,0,0,0,100,0,5000,7000,12000,15000,11,11971,0,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Worker - In Combat - Cast Sunder Armor"),
(5843,0,1,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Slave Worker - Between 0-15% Health - Flee For Assist (No Repeat)");
-- Smoldar
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8278;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8278 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8278,0,0,0,0,0,100,0,7000,9000,17000,19000,11,5213,0,0,0,0,0,2,0,0,0,0,0,0,0,"Smoldar - In Combat - Cast Molten Metal");
-- Twilight Fire Guard
UPDATE `creature_template` SET `unit_class`=2, `AIName`="SmartAI" WHERE `entry`=5861;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5861 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5861,0,0,0,0,0,100,0,4000,12000,18000,22000,11,11988,0,0,0,0,0,1,0,0,0,0,0,0,0,"Twilight Fire Guard - In Combat - Cast Fireball Volley"),
(5861,0,1,0,4,0,100,0,0,0,0,0,11,18968,0,0,0,0,0,1,0,0,0,0,0,0,0,"Twilight Fire Guard - On Aggro - Cast Fire Shield");
-- Twilight Dark Shaman
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5860;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5860 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5860,0,0,0,0,0,100,0,3000,5000,10000,14000,11,11824,0,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Dark Shaman - In Combat - Cast Shock"),
(5860,0,1,0,0,0,100,0,7000,9000,15000,25000,11,7289,32,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Dark Shaman - In Combat - Cast Shrink"),
(5860,0,2,0,14,0,100,0,700,40,16000,20000,11,11986,0,0,0,0,0,7,0,0,0,0,0,0,0,"Twilight Dark Shaman - On Aggro - Cast Healing Wave");
-- Twilight Geomancer
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=5862;
DELETE FROM `smart_scripts` WHERE `entryorguid`=5862 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(5862,0,0,0,0,0,100,0,0,0,3000,5000,11,9053,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Fireball"),
(5862,0,1,0,0,0,100,0,7000,11000,18000,24000,11,11990,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Rain of Fire"),
(5862,0,2,0,0,0,100,0,9000,13000,15000,19000,11,11436,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Geomancer - In Combat - Cast Slow");
-- Twilight Idolater
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8419;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8419 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8419,0,0,0,0,0,100,0,0,0,3000,5000,11,9053,64,0,0,0,0,2,0,0,0,0,0,0,0,"Twilight Idolater - In Combat - Cast Fireball"),
(8419,0,1,0,0,0,100,0,6000,9000,18000,22000,11,11962,0,0,0,0,0,5,0,0,0,0,0,0,0,"Twilight Idolater - In Combat - Cast Immolate");
-- Highlord Mastrogonde
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8282;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8282 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8282,0,0,0,0,0,100,0,0,0,3000,5000,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Shadow Bolt"),
(8282,0,1,0,0,0,100,0,8000,14000,21000,25000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Shadow Word: Pain"),
(8282,0,2,0,0,0,100,0,6000,9000,15000,18000,11,13323,0,0,0,0,0,6,0,0,0,0,0,0,0,"Highlord Mastrogonde - In Combat - Cast Polymorph"),
(8282,0,3,0,2,0,100,0,0,50,50000,70000,11,11974,0,0,0,0,0,1,0,0,0,0,0,0,0,"Slave Worker - Between 0-50% Health - Cast Power Word: Shield");
-- Slave Master Blackheart
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=8283;
DELETE FROM `smart_scripts` WHERE `entryorguid`=8283 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(8283,0,0,0,0,0,100,0,0,0,2000,3000,11,6660,64,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Master Blackheart - In Combat - Cast Shoot"),
(8283,0,1,0,9,0,100,0,0,20,8000,9000,11,6533,0,0,0,0,0,2,0,0,0,0,0,0,0,"Slave Master Blackheart - Within 0-20 Range - Cast Net");
-- Incendosaur
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9318;
DELETE FROM `smart_scripts` WHERE `entryorguid`=9318 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(9318,0,0,0,0,0,100,0,5000,9000,12000,16000,11,11985,0,0,0,0,0,2,0,0,0,0,0,0,0,"Incendosaur - In Combat - Cast Fireball");
-- Overseer Maltorius
UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=14621;
DELETE FROM `smart_scripts` WHERE `entryorguid`=14621 AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(14621,0,0,0,0,0,100,0,0,0,3000,5000,11,9613,64,0,0,0,0,2,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Shadow Bolt"),
(14621,0,1,0,0,0,100,0,4000,12000,16000,22000,11,11639,0,0,0,0,0,5,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Shadow Word: Pain"),
(14621,0,2,0,0,0,100,0,6000,9000,13000,16000,11,13323,0,0,0,0,0,6,0,0,0,0,0,0,0,"Overseer Maltorius - In Combat - Cast Polymorph"),
(14621,0,3,0,2,0,100,0,0,50,40000,60000,11,11974,0,0,0,0,0,1,0,0,0,0,0,0,0,"Overseer Maltorius - Between 0-50% Health - Cast Power Word: Shield");
-- Fix bytes2 for some creatures
UPDATE `creature_addon` SET `bytes2`=2 WHERE `guid` IN (SELECT `guid` FROM `creature` WHERE `id` IN (8283,8566));
*/
@@ -0,0 +1,12 @@
--
DELETE FROM `event_scripts` WHERE `id` = 19714;
INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(19714,0,9,5272,60,0,0,0,0,0),
(19714,0,9,5273,60,0,0,0,0,0),
(19714,0,9,5274,60,0,0,0,0,0),
(19714,0,9,5271,60,0,0,0,0,0),
(19714,0,9,5275,60,0,0,0,0,0),
(19714,0,10,30461,600000,0,6947.48,-859.518,1147.6,5.67487);
UPDATE `gameobject` SET `position_z`=1066.73991 WHERE `guid`=5275;
UPDATE `gameobject` SET `position_z`=1067.04003 WHERE `guid`=5274;
@@ -0,0 +1,2 @@
--
DELETE FROM `creature` WHERE `guid`=86933;
@@ -0,0 +1,3 @@
--
DELETE FROM `creature` WHERE `guid` = 326468;
@@ -0,0 +1,25 @@
--
UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry`=42562;
UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33536 WHERE `entry` IN (42560);
DELETE FROM `creature` WHERE `id`IN (42403,42402,42401,42399);
SET @CGUID := 251569;
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7;
INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `PhaseId`, `PhaseGroup`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
(@CGUID+0,42560,0,40,109,1,169,0,0,0,-9855.679, 1277.568, 40.96358,5.427974,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+1,42386,0,40,109,1,169,0,0,0,-9851.216, 1273.403, 41.19444,2.583087,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+2,42384,0,40,109,1,169,0,0,0,-9859.457, 1279.47, 41.09737,5.480334,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+3,42384,0,40,109,1,169,0,0,0,-9861.16, 1276.556, 40.83781,0.122173,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+4,42559,0,40,109,1,169,0,0,0,-9852.603, 1274.115, 41.0983,5.88176,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+5,42559,0,40,109,1,169,0,0,0,-9859.658, 1275.504, 40.86245,2.373648,120,0,0,0,0,0,0,0,0,'',0),
(@CGUID+6,42558,0,40,109,1,169,0,0,0,-9855.285, 1275.561, 40.97787,1.413717,120,0,0,0,0,0,0,0,0,'',0);
DELETE FROM `creature_addon` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+7;
INSERT INTO `creature_addon` (`guid`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `aiAnimKit`, `movementAnimKit`, `meleeAnimKit`, `auras`) VALUES
(@CGUID+0,0,0,65536,1,0,0,0,0,'79343 79372 29266'),
(@CGUID+1,0,0,65536,1,431,0,0,0,'79343'),
(@CGUID+2,0,0,65536,1,431,0,0,0,'79343'),
(@CGUID+3,0,0,65536,1,431,0,0,0,'79343'),
(@CGUID+4,0,0,65536,1,0,0,0,0,'79343'),
(@CGUID+5,0,0,65536,1,0,0,0,0,'79343'),
(@CGUID+6,0,0,65544,1,0,0,0,0,'79343');
@@ -0,0 +1,5 @@
--
SET @OGUID := 200630;
DELETE FROM `gameobject` WHERE `guid`=@OGUID;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`zoneId`,`areaId`,`spawnMask`,`PhaseId`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(@OGUID,203957, 0, 40, 111, 1, 169, -9848.62, 1390.5, 38.0731, 3.92641, 0, 0, 0.92399, -0.382416, 300, 255, 1);
@@ -0,0 +1,9 @@
DELETE FROM `creature_loot_template` WHERE `Entry`=118;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(118, 2672, 0, 85, 0, 1, 0, 1, 1, NULL), -- Stringy wolf meat
(118, 62328, 0, 85, 0, 1, 1, 1, 1, NULL), -- Shed fur
(118, 3299, 0, 15, 0, 1, 1, 1, 1, NULL), -- Fractured canine
(118, 24073, 24073, 2, 0, 1, 2, 1, 1, NULL), -- Junk
(118, 24074, 24074, 1, 0, 1, 2, 1, 1, NULL), -- Greens ilvl 10-11
(118, 24075, 24075, 0.5, 0, 1, 2, 1, 1, NULL), -- Greens ilvl 12-13
(118, 11111, 11111, 0.1, 0, 1, 0, 1, 1, NULL); -- Bags
+3 -3
View File
@@ -232,11 +232,11 @@ TurretAI::TurretAI(Creature* c) : CreatureAI(c)
me->m_SightDistance = me->m_CombatDistance;
}
bool TurretAI::CanAIAttack(const Unit* /*who*/) const
bool TurretAI::CanAIAttack(Unit const* who) const
{
/// @todo use one function to replace it
if (!me->IsWithinCombatRange(me->GetVictim(), me->m_CombatDistance)
|| (m_minRange && me->IsWithinCombatRange(me->GetVictim(), m_minRange)))
if (!me->IsWithinCombatRange(who, me->m_CombatDistance)
|| (m_minRange && me->IsWithinCombatRange(who, m_minRange)))
return false;
return true;
}
@@ -787,7 +787,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
if (e.action.fleeAssist.withEmote)
{
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST);
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_FLEE_FOR_ASSIST, me->getGender());
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_FLEE_FOR_ASSIST: Creature %u DoFleeToGetAssistance", me->GetGUID().GetCounter());
@@ -1074,7 +1074,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
(*itr)->ToCreature()->CallForHelp((float)e.action.callHelp.range);
if (e.action.callHelp.withEmote)
{
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP);
Trinity::BroadcastTextBuilder builder(me, CHAT_MSG_MONSTER_EMOTE, BROADCAST_TEXT_CALL_FOR_HELP, me->getGender());
sCreatureTextMgr->SendChatPacket(me, builder, CHAT_MSG_MONSTER_EMOTE);
}
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction: SMART_ACTION_CALL_FOR_HELP: Creature %u, target: %u", me->GetGUID().GetCounter(), (*itr)->GetGUID().GetCounter());
@@ -3135,13 +3135,13 @@ ObjectList* SmartScript::GetTargets(SmartScriptHolder const& e, Unit* invoker /*
}
break;
}
case SMART_TARGET_VEHICLE_ACCESSORY:
case SMART_TARGET_VEHICLE_PASSENGER:
{
if (me && me->IsVehicle())
{
if (Unit* target = me->GetVehicleKit()->GetPassenger(e.target.vehicle.seat))
l->push_back(target);
}
for (auto seatItr = me->GetVehicleKit()->Seats.begin(); seatItr != me->GetVehicleKit()->Seats.end(); ++seatItr)
if (!e.target.vehicle.seatMask || (e.target.vehicle.seatMask & (1 << seatItr->first)))
if (Unit* u = ObjectAccessor::GetUnit(*me, seatItr->second.Passenger.Guid))
l->push_back(u);
break;
}
case SMART_TARGET_POSITION:
@@ -454,7 +454,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_STORED:
case SMART_TARGET_LOOT_RECIPIENTS:
case SMART_TARGET_FARTHEST:
case SMART_TARGET_VEHICLE_ACCESSORY:
case SMART_TARGET_VEHICLE_PASSENGER:
break;
default:
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Not handled target_type(%u), Entry %d SourceType %u Event %u Action %u, skipped.", e.GetTargetType(), e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
@@ -1217,7 +1217,7 @@ enum SMARTAI_TARGETS
SMART_TARGET_CLOSEST_FRIENDLY = 26, // maxDist, playerOnly
SMART_TARGET_LOOT_RECIPIENTS = 27, // all players that have tagged this creature (for kill credit)
SMART_TARGET_FARTHEST = 28, // maxDist, playerOnly, isInLos
SMART_TARGET_VEHICLE_ACCESSORY = 29, // seat number (vehicle can target it's own accessory)
SMART_TARGET_VEHICLE_PASSENGER = 29, // seatMask (0 - all seats)
SMART_TARGET_END = 30
};
@@ -1345,7 +1345,7 @@ struct SmartTarget
struct
{
uint32 seat;
uint32 seatMask;
} vehicle;
};
};
@@ -869,7 +869,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen
if (Guild* guild = sGuildMgr->GetGuildById(GetOwner()->GetGuildId()))
{
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner(), achievement->ID);
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_GUILD_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> _localizer(_builder);
guild->BroadcastWorker(_localizer, GetOwner());
}
@@ -887,7 +887,7 @@ void AchievementMgr<T>::SendAchievementEarned(AchievementEntry const* achievemen
// if player is in world he can tell his friends about new achievement
else if (GetOwner()->IsInWorld())
{
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner(), achievement->ID);
Trinity::BroadcastTextBuilder _builder(GetOwner(), CHAT_MSG_ACHIEVEMENT, BROADCAST_TEXT_ACHIEVEMENT_EARNED, GetOwner()->getGender(), _owner, achievement->ID);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> _localizer(_builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder>> _worker(GetOwner(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), _localizer);
Cell::VisitWorldObjects(GetOwner(), _worker, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY));
+4 -5
View File
@@ -20,7 +20,6 @@
#include "ArenaTeamMgr.h"
#include "GuildMgr.h"
#include "Guild.h"
#include "Language.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "World.h"
@@ -33,10 +32,10 @@ Arena::Arena()
StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_15S;
StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_ARENA_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_ARENA_THIRTY_SECONDS;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_ARENA_FIFTEEN_SECONDS;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_ARENA_HAS_BEGUN;
StartMessageIds[BG_STARTING_EVENT_FIRST] = ARENA_TEXT_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_SECOND] = ARENA_TEXT_START_THIRTY_SECONDS;
StartMessageIds[BG_STARTING_EVENT_THIRD] = ARENA_TEXT_START_FIFTEEN_SECONDS;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = ARENA_TEXT_START_BATTLE_HAS_BEGUN;
}
void Arena::AddPlayer(Player* player)
+8
View File
@@ -20,6 +20,14 @@
#include "Battleground.h"
enum ArenaBroadcastTexts
{
ARENA_TEXT_START_ONE_MINUTE = 15740,
ARENA_TEXT_START_THIRTY_SECONDS = 15741,
ARENA_TEXT_START_FIFTEEN_SECONDS = 15739,
ARENA_TEXT_START_BATTLE_HAS_BEGUN = 15742,
};
enum ArenaSpellIds
{
SPELL_ALLIANCE_GOLD_FLAG = 32724,
+41 -125
View File
@@ -22,7 +22,7 @@
#include "BattlegroundScore.h"
#include "Creature.h"
#include "CreatureTextMgr.h"
#include "Chat.h"
#include "ChatTextBuilder.h"
#include "Formulas.h"
#include "GridNotifiersImpl.h"
#include "Group.h"
@@ -38,72 +38,6 @@
#include "Transport.h"
#include "GameTime.h"
namespace Trinity
{
class BattlegroundChatBuilder
{
public:
BattlegroundChatBuilder(ChatMsg msgtype, uint32 textId, Player const* source, va_list* args = NULL)
: _msgtype(msgtype), _textId(textId), _source(source), _args(args) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(_textId, loc_idx);
if (_args)
{
// we need copy va_list before use or original va_list will corrupted
va_list ap;
va_copy(ap, *_args);
char str[2048];
vsnprintf(str, 2048, text, ap);
va_end(ap);
do_helper(data, &str[0]);
}
else
do_helper(data, text);
}
private:
void do_helper(WorldPacket& data, char const* text)
{
ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _source, text);
}
ChatMsg _msgtype;
uint32 _textId;
Player const* _source;
va_list* _args;
};
class Battleground2ChatBuilder
{
public:
Battleground2ChatBuilder(ChatMsg msgtype, uint32 textId, Player const* source, uint32 arg1, uint32 arg2)
: _msgtype(msgtype), _textId(textId), _source(source), _arg1(arg1), _arg2(arg2) { }
void operator()(WorldPacket& data, LocaleConstant loc_idx)
{
char const* text = sObjectMgr->GetTrinityString(_textId, loc_idx);
char const* arg1str = _arg1 ? sObjectMgr->GetTrinityString(_arg1, loc_idx) : "";
char const* arg2str = _arg2 ? sObjectMgr->GetTrinityString(_arg2, loc_idx) : "";
char str[2048];
snprintf(str, 2048, text, arg1str, arg2str);
ChatHandler::BuildChatPacket(data, _msgtype, LANG_UNIVERSAL, _source, _source, str);
}
private:
ChatMsg _msgtype;
uint32 _textId;
Player const* _source;
uint32 _arg1;
uint32 _arg2;
};
} // namespace Trinity
template<class Do>
void Battleground::BroadcastWorker(Do& _do)
{
@@ -175,11 +109,11 @@ Battleground::Battleground()
StartDelayTimes[BG_STARTING_EVENT_SECOND] = BG_START_DELAY_1M;
StartDelayTimes[BG_STARTING_EVENT_THIRD] = BG_START_DELAY_30S;
StartDelayTimes[BG_STARTING_EVENT_FOURTH] = BG_START_DELAY_NONE;
//we must set to some default existing values
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
StartMessageIds[BG_STARTING_EVENT_FIRST] = BG_TEXT_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_TEXT_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_TEXT_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_TEXT_BATTLE_HAS_BEGUN;
}
Battleground::~Battleground()
@@ -498,19 +432,22 @@ inline void Battleground::_ProcessJoin(uint32 diff)
StartingEventCloseDoors();
SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FIRST]);
// First start warning - 2 or 1 minute
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
if (StartMessageIds[BG_STARTING_EVENT_FIRST])
SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_FIRST], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 1 minute or 30 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_SECOND] && !(m_Events & BG_STARTING_EVENT_2))
{
m_Events |= BG_STARTING_EVENT_2;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
if (StartMessageIds[BG_STARTING_EVENT_SECOND])
SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_SECOND], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// After 30 or 15 seconds, warning is signaled
else if (GetStartDelayTime() <= StartDelayTimes[BG_STARTING_EVENT_THIRD] && !(m_Events & BG_STARTING_EVENT_3))
{
m_Events |= BG_STARTING_EVENT_3;
SendMessageToAll(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
if (StartMessageIds[BG_STARTING_EVENT_THIRD])
SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_THIRD], CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
// Delay expired (after 2 or 1 minute)
else if (GetStartDelayTime() <= 0 && !(m_Events & BG_STARTING_EVENT_4))
@@ -519,7 +456,8 @@ inline void Battleground::_ProcessJoin(uint32 diff)
StartingEventOpenDoors();
SendWarningToAll(StartMessageIds[BG_STARTING_EVENT_FOURTH]);
if (StartMessageIds[BG_STARTING_EVENT_FOURTH])
SendBroadcastText(StartMessageIds[BG_STARTING_EVENT_FOURTH], CHAT_MSG_BG_SYSTEM_NEUTRAL);
SetStatus(STATUS_IN_PROGRESS);
SetStartDelayTime(StartDelayTimes[BG_STARTING_EVENT_FOURTH]);
@@ -666,10 +604,23 @@ void Battleground::SendChatMessage(Creature* source, uint8 textId, WorldObject*
sCreatureTextMgr->SendChat(source, textId, target);
}
void Battleground::PlaySoundToAll(uint32 SoundID)
void Battleground::SendBroadcastText(uint32 id, ChatMsg msgType, WorldObject const* target)
{
if (!sObjectMgr->GetBroadcastText(id))
{
TC_LOG_ERROR("bg.battleground", "Battleground::SendBroadcastText: `broadcast_text` (ID: %u) was not found", id);
return;
}
Trinity::BroadcastTextBuilder builder(nullptr, msgType, id, GENDER_MALE, target);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> localizer(builder);
BroadcastWorker(localizer);
}
void Battleground::PlaySoundToAll(uint32 soundID)
{
WorldPacket data;
sBattlegroundMgr->BuildPlaySoundPacket(&data, SoundID);
sBattlegroundMgr->BuildPlaySoundPacket(&data, soundID);
SendPacketToAll(&data);
}
@@ -742,12 +693,12 @@ void Battleground::EndBattleground(uint32 winner)
{
RemoveFromBGFreeSlotQueue();
int32 winmsg_id = 0;
bool guildAwarded = false;
if (winner == ALLIANCE)
{
winmsg_id = isBattleground() ? LANG_BG_A_WINS : LANG_ARENA_GOLD_WINS;
if (isBattleground())
SendBroadcastText(BG_TEXT_ALLIANCE_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound
@@ -755,7 +706,8 @@ void Battleground::EndBattleground(uint32 winner)
}
else if (winner == HORDE)
{
winmsg_id = isBattleground() ? LANG_BG_H_WINS : LANG_ARENA_GREEN_WINS;
if (isBattleground())
SendBroadcastText(BG_TEXT_HORDE_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound
@@ -896,9 +848,6 @@ void Battleground::EndBattleground(uint32 winner)
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
}
if (winmsg_id)
SendMessageToAll(winmsg_id, CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
uint32 Battleground::GetBonusHonorFromKill(uint32 kills) const
@@ -1700,17 +1649,17 @@ bool Battleground::AddSpiritGuide(uint32 type, Position const& pos, TeamId teamI
return AddSpiritGuide(type, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teamId);
}
void Battleground::SendMessageToAll(uint32 entry, ChatMsg type, Player const* source)
void Battleground::SendMessageToAll(uint32 entry, ChatMsg msgType, Player const* source)
{
if (!entry)
return;
Trinity::BattlegroundChatBuilder bg_builder(type, entry, source);
Trinity::LocalizedPacketDo<Trinity::BattlegroundChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do);
Trinity::TrinityStringChatBuilder builder(nullptr, msgType, entry, source);
Trinity::LocalizedPacketDo<Trinity::TrinityStringChatBuilder> localizer(builder);
BroadcastWorker(localizer);
}
void Battleground::PSendMessageToAll(uint32 entry, ChatMsg type, Player const* source, ...)
void Battleground::PSendMessageToAll(uint32 entry, ChatMsg msgType, Player const* source, ...)
{
if (!entry)
return;
@@ -1718,46 +1667,13 @@ void Battleground::PSendMessageToAll(uint32 entry, ChatMsg type, Player const* s
va_list ap;
va_start(ap, source);
Trinity::BattlegroundChatBuilder bg_builder(type, entry, source, &ap);
Trinity::LocalizedPacketDo<Trinity::BattlegroundChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do);
Trinity::TrinityStringChatBuilder builder(nullptr, msgType, entry, source, &ap);
Trinity::LocalizedPacketDo<Trinity::TrinityStringChatBuilder> localizer(builder);
BroadcastWorker(localizer);
va_end(ap);
}
void Battleground::SendWarningToAll(uint32 entry, ...)
{
if (!entry)
return;
std::map<uint32, WorldPacket> localizedPackets;
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
if (Player* player = _GetPlayer(itr, "SendWarningToAll"))
{
if (localizedPackets.find(player->GetSession()->GetSessionDbLocaleIndex()) == localizedPackets.end())
{
char const* format = sObjectMgr->GetTrinityString(entry, player->GetSession()->GetSessionDbLocaleIndex());
char str[1024];
va_list ap;
va_start(ap, entry);
vsnprintf(str, 1024, format, ap);
va_end(ap);
ChatHandler::BuildChatPacket(localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()], CHAT_MSG_RAID_BOSS_EMOTE, LANG_UNIVERSAL, NULL, NULL, str);
}
player->SendDirectMessage(&localizedPackets[player->GetSession()->GetSessionDbLocaleIndex()]);
}
}
void Battleground::SendMessage2ToAll(uint32 entry, ChatMsg type, Player const* source, uint32 arg1, uint32 arg2)
{
Trinity::Battleground2ChatBuilder bg_builder(type, entry, source, arg1, arg2);
Trinity::LocalizedPacketDo<Trinity::Battleground2ChatBuilder> bg_do(bg_builder);
BroadcastWorker(bg_do);
}
void Battleground::EndNow()
{
RemoveFromBGFreeSlotQueue();
+14 -5
View File
@@ -59,6 +59,17 @@ enum BattlegroundCriteriaId
BG_CRITERIA_CHECK_NOT_EVEN_A_SCRATCH,
};
enum BattlegroundBroadcastTexts
{
BG_TEXT_ALLIANCE_WINS = 10633,
BG_TEXT_HORDE_WINS = 10634,
BG_TEXT_START_TWO_MINUTES = 18193,
BG_TEXT_START_ONE_MINUTE = 18194,
BG_TEXT_START_HALF_MINUTE = 18195,
BG_TEXT_BATTLE_HAS_BEGUN = 18196,
};
enum BattlegroundSounds
{
SOUND_HORDE_WINS = 8454,
@@ -357,10 +368,11 @@ class TC_GAME_API Battleground
// Packet Transfer
// method that should fill worldpacket with actual world states (not yet implemented for all battlegrounds!)
virtual void FillInitialWorldStates(WorldPacket& /*data*/) { }
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = NULL, bool self = true);
void SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* sender = nullptr, bool self = true);
void SendPacketToAll(WorldPacket* packet);
void SendChatMessage(Creature* source, uint8 textId, WorldObject* target = NULL);
void SendChatMessage(Creature* source, uint8 textId, WorldObject* target = nullptr);
void SendBroadcastText(uint32 id, ChatMsg msgType, WorldObject const* target = nullptr);
template<class Do>
void BroadcastWorker(Do& _do);
@@ -380,9 +392,6 @@ class TC_GAME_API Battleground
void SendMessageToAll(uint32 entry, ChatMsg type, Player const* source = NULL);
void PSendMessageToAll(uint32 entry, ChatMsg type, Player const* source, ...);
// specialized version with 2 string id args
void SendMessage2ToAll(uint32 entry, ChatMsg type, Player const* source, uint32 strId1 = 0, uint32 strId2 = 0);
// Raid Group
Group* GetBgRaid(uint32 TeamID) const { return TeamID == ALLIANCE ? m_BgRaids[TEAM_ALLIANCE] : m_BgRaids[TEAM_HORDE]; }
void SetBgRaid(uint32 TeamID, Group* bg_raid);
@@ -37,6 +37,7 @@
#include "BattlegroundTP.h"
#include "BattlegroundBFG.h"
#include "Chat.h"
#include "Language.h"
#include "Map.h"
#include "MapManager.h"
#include "Player.h"
@@ -20,7 +20,6 @@
#include "WorldPacket.h"
#include "BattlegroundMgr.h"
#include "Creature.h"
#include "Language.h"
#include "Player.h"
#include "Util.h"
#include "WorldSession.h"
@@ -52,11 +51,6 @@ BattlegroundAB::BattlegroundAB()
m_HonorTics = 0;
m_ReputationTics = 0;
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AB_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AB_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AB_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AB_HAS_BEGUN;
}
BattlegroundAB::~BattlegroundAB() { }
@@ -98,19 +92,17 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
// create new occupied banner
_CreateBanner(node, BG_AB_NODE_TYPE_OCCUPIED, teamIndex, true);
_SendNodeUpdate(node);
_NodeOccupied(node, (teamIndex == 0) ? ALLIANCE:HORDE);
_NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE : HORDE);
// Message to chatlog
if (teamIndex == 0)
if (teamIndex == TEAM_ALLIANCE)
{
// FIXME: team and node names not localized
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE);
PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_ALLIANCE);
}
else
{
// FIXME: team and node names not localized
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE);
PlaySoundToAll(BG_AB_SOUND_NODE_CAPTURED_HORDE);
}
}
@@ -152,9 +144,9 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
if (!m_IsInformedNearVictory && m_TeamScores[team] > BG_AB_WARNING_NEAR_VICTORY_SCORE)
{
if (team == TEAM_ALLIANCE)
SendMessageToAll(LANG_BG_AB_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_AB_TEXT_ALLIANCE_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
else
SendMessageToAll(LANG_BG_AB_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_AB_TEXT_HORDE_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_AB_SOUND_NEAR_VICTORY);
m_IsInformedNearVictory = true;
}
@@ -299,21 +291,6 @@ void BattlegroundAB::_DelBanner(uint8 node, uint8 type, uint8 teamIndex)
SpawnBGObject(obj, RESPAWN_ONE_DAY);
}
int32 BattlegroundAB::_GetNodeNameId(uint8 node)
{
switch (node)
{
case BG_AB_NODE_STABLES: return LANG_BG_AB_NODE_STABLES;
case BG_AB_NODE_BLACKSMITH: return LANG_BG_AB_NODE_BLACKSMITH;
case BG_AB_NODE_FARM: return LANG_BG_AB_NODE_FARM;
case BG_AB_NODE_LUMBER_MILL:return LANG_BG_AB_NODE_LUMBER_MILL;
case BG_AB_NODE_GOLD_MINE: return LANG_BG_AB_NODE_GOLD_MINE;
default:
ABORT();
}
return 0;
}
void BattlegroundAB::FillInitialWorldStates(WorldPacket& data)
{
const uint8 plusArray[] = {0, 2, 3, 0, 1};
@@ -461,11 +438,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
_SendNodeUpdate(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
// FIXME: team and node names not localized
if (teamIndex == 0)
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node), LANG_BG_AB_ALLY);
if (teamIndex == TEAM_ALLIANCE)
SendBroadcastText(ABNodes[node].TextAllianceClaims, CHAT_MSG_BG_SYSTEM_ALLIANCE, source);
else
SendMessage2ToAll(LANG_BG_AB_NODE_CLAIMED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node), LANG_BG_AB_HORDE);
SendBroadcastText(ABNodes[node].TextHordeClaims, CHAT_MSG_BG_SYSTEM_HORDE, source);
sound = BG_AB_SOUND_NODE_CLAIMED;
}
@@ -485,11 +461,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
_SendNodeUpdate(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextAllianceAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, source);
else
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextHordeAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, source);
}
// If contested, change back to occupied
else
@@ -503,13 +478,12 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
_CreateBanner(node, BG_AB_NODE_TYPE_OCCUPIED, teamIndex, true);
_SendNodeUpdate(node);
m_NodeTimers[node] = 0;
_NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE:HORDE);
_NodeOccupied(node, (teamIndex == TEAM_ALLIANCE) ? ALLIANCE : HORDE);
// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextAllianceDefended, CHAT_MSG_BG_SYSTEM_ALLIANCE, source);
else
SendMessage2ToAll(LANG_BG_AB_NODE_DEFENDED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextHordeDefended, CHAT_MSG_BG_SYSTEM_HORDE, source);
}
sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE;
}
@@ -527,11 +501,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
_NodeDeOccupied(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
// FIXME: node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_ALLIANCE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextAllianceAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, source);
else
SendMessage2ToAll(LANG_BG_AB_NODE_ASSAULTED, CHAT_MSG_BG_SYSTEM_HORDE, source, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextHordeAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, source);
sound = (teamIndex == TEAM_ALLIANCE) ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE;
}
@@ -539,11 +512,10 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
// If node is occupied again, send "X has taken the Y" msg.
if (m_Nodes[node] >= BG_AB_NODE_TYPE_OCCUPIED)
{
// FIXME: team and node names not localized
if (teamIndex == TEAM_ALLIANCE)
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, LANG_BG_AB_ALLY, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE);
else
SendMessage2ToAll(LANG_BG_AB_NODE_TAKEN, CHAT_MSG_BG_SYSTEM_HORDE, NULL, LANG_BG_AB_HORDE, _GetNodeNameId(node));
SendBroadcastText(ABNodes[node].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE);
}
PlaySoundToAll(sound);
}
@@ -152,6 +152,34 @@ enum BG_AB_BattlegroundNodes
BG_AB_ALL_NODES_COUNT = 7 // all nodes (dynamic and static)
};
enum BG_AB_BroadcastTexts
{
BG_AB_TEXT_ALLIANCE_NEAR_VICTORY = 10598,
BG_AB_TEXT_HORDE_NEAR_VICTORY = 10599,
};
struct ABNodeInfo
{
uint32 NodeId;
uint32 TextAllianceAssaulted;
uint32 TextHordeAssaulted;
uint32 TextAllianceTaken;
uint32 TextHordeTaken;
uint32 TextAllianceDefended;
uint32 TextHordeDefended;
uint32 TextAllianceClaims;
uint32 TextHordeClaims;
};
ABNodeInfo const ABNodes[BG_AB_DYNAMIC_NODES_COUNT] =
{
{ BG_AB_NODE_STABLES, 10199, 10200, 10203, 10204, 10201, 10202, 10286, 10287 },
{ BG_AB_NODE_BLACKSMITH, 10211, 10212, 10213, 10214, 10215, 10216, 10290, 10291 },
{ BG_AB_NODE_FARM, 10217, 10218, 10219, 10220, 10221, 10222, 10288, 10289 },
{ BG_AB_NODE_LUMBER_MILL, 10224, 10225, 10226, 10227, 10228, 10229, 10284, 10285 },
{ BG_AB_NODE_GOLD_MINE, 10230, 10231, 10232, 10233, 10234, 10235, 10282, 10283 }
};
enum BG_AB_NodeStatus
{
BG_AB_NODE_TYPE_NEUTRAL = 0,
@@ -315,8 +343,6 @@ class BattlegroundAB : public Battleground
void _NodeOccupied(uint8 node, Team team);
void _NodeDeOccupied(uint8 node);
int32 _GetNodeNameId(uint8 node);
/* Nodes info:
0: neutral
1: ally contested
@@ -22,7 +22,6 @@
#include "WorldPacket.h"
#include "GameObject.h"
#include "Language.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "WorldSession.h"
@@ -50,10 +49,9 @@ BattlegroundAV::BattlegroundAV()
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
InitNode(i, 0, false);
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_AV_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_AV_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_AV_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_AV_HAS_BEGUN;
StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_AV_TEXT_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_AV_TEXT_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_AV_TEXT_BATTLE_HAS_BEGUN;
}
BattlegroundAV::~BattlegroundAV() { }
@@ -263,7 +261,10 @@ void BattlegroundAV::UpdateScore(uint16 team, int16 points)
}
else if (!m_IsInformedNearVictory[teamindex] && m_Team_Scores[teamindex] < SEND_MSG_NEAR_LOSE)
{
SendMessageToAll(teamindex == TEAM_HORDE?LANG_BG_AV_H_NEAR_LOSE:LANG_BG_AV_A_NEAR_LOSE, teamindex == TEAM_HORDE ? CHAT_MSG_BG_SYSTEM_HORDE : CHAT_MSG_BG_SYSTEM_ALLIANCE);
if (teamindex == TEAM_ALLIANCE)
SendBroadcastText(BG_AV_TEXT_ALLIANCE_NEAR_LOSE, CHAT_MSG_BG_SYSTEM_ALLIANCE);
else
SendBroadcastText(BG_AV_TEXT_HORDE_NEAR_LOSE, CHAT_MSG_BG_SYSTEM_HORDE);
PlaySoundToAll(AV_SOUND_NEAR_VICTORY);
m_IsInformedNearVictory[teamindex] = true;
}
@@ -55,6 +55,16 @@ enum SharedActions
ACTION_BUFF_YELL = -30001
};
enum BG_AV_BroadcastTexts
{
BG_AV_TEXT_START_ONE_MINUTE = 10638,
BG_AV_TEXT_START_HALF_MINUTE = 10639,
BG_AV_TEXT_BATTLE_HAS_BEGUN = 10640,
BG_AV_TEXT_ALLIANCE_NEAR_LOSE = 23210,
BG_AV_TEXT_HORDE_NEAR_LOSE = 23211
};
enum BG_AV_Sounds
{ /// @todo: get out if there comes a sound when neutral team captures mine
@@ -20,7 +20,6 @@
#include "WorldPacket.h"
#include "BattlegroundMgr.h"
#include "Creature.h"
#include "Language.h"
#include "Player.h"
#include "Util.h"
#include "ObjectAccessor.h"
@@ -63,11 +62,6 @@ BattlegroundEY::BattlegroundEY()
for (uint8 i = 0; i < 2 * EY_POINTS_MAX; ++i)
m_CurrentPointPlayersCount[i] = 0;
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_EY_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_EY_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_EY_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_EY_HAS_BEGUN;
}
BattlegroundEY::~BattlegroundEY() { }
@@ -292,16 +286,6 @@ void BattlegroundEY::UpdatePointStatuses()
void BattlegroundEY::UpdateTeamScore(uint32 Team)
{
uint32 score = GetTeamScore(Team);
/// @todo there should be some sound played when one team is near victory!! - and define variables
/*if (!m_IsInformedNearVictory && score >= BG_EY_WARNING_NEAR_VICTORY_SCORE)
{
if (Team == ALLIANCE)
SendMessageToAll(LANG_BG_EY_A_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
else
SendMessageToAll(LANG_BG_EY_H_NEAR_VICTORY, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_EY_SOUND_NEAR_VICTORY);
m_IsInformedNearVictory = true;
}*/
if (score >= BG_EY_MAX_TEAM_SCORE)
{
@@ -578,7 +562,7 @@ void BattlegroundEY::RespawnFlag(bool send_message)
if (send_message)
{
SendMessageToAll(LANG_BG_EY_RESETED_FLAG, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_EY_TEXT_FLAG_RESET, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_EY_SOUND_FLAG_RESET); // flags respawned sound...
}
@@ -639,9 +623,9 @@ void BattlegroundEY::EventPlayerDroppedFlag(Player* player)
UpdateWorldState(NETHERSTORM_FLAG_STATE_ALLIANCE, BG_EY_FLAG_STATE_WAIT_RESPAWN);
if (player->GetTeam() == ALLIANCE)
SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL);
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE);
else
SendMessageToAll(LANG_BG_EY_DROPPED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL);
SendBroadcastText(BG_EY_TEXT_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE);
}
void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* target_obj)
@@ -671,9 +655,9 @@ void BattlegroundEY::EventPlayerClickedOnFlag(Player* player, GameObject* target
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
if (player->GetTeam() == ALLIANCE)
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, NULL, player->GetName().c_str());
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
PSendMessageToAll(LANG_BG_EY_HAS_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, NULL, player->GetName().c_str());
SendBroadcastText(BG_EY_TEXT_TAKEN_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
}
void BattlegroundEY::EventTeamLostPoint(Player* player, uint32 Point)
@@ -712,10 +696,9 @@ void BattlegroundEY::EventTeamLostPoint(Player* player, uint32 Point)
m_PointState[Point] = EY_POINT_NO_OWNER;
if (Team == ALLIANCE)
SendMessageToAll(m_LosingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
SendBroadcastText(m_LosingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
SendMessageToAll(m_LosingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
SendBroadcastText(m_LosingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
UpdatePointsIcons(Team, Point);
UpdatePointsCount(Team);
@@ -755,9 +738,9 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
m_PointState[Point] = EY_POINT_UNDER_CONTROL;
if (Team == ALLIANCE)
SendMessageToAll(m_CapturingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
SendBroadcastText(m_CapturingPointTypes[Point].MessageIdAlliance, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
SendMessageToAll(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
SendBroadcastText(m_CapturingPointTypes[Point].MessageIdHorde, CHAT_MSG_BG_SYSTEM_HORDE, player);
if (BgCreatures[Point])
DelCreature(Point);
@@ -798,27 +781,22 @@ void BattlegroundEY::EventPlayerCapturedFlag(Player* player, uint32 BgObjectType
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
if (player->GetTeam() == ALLIANCE)
{
SendBroadcastText(BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE);
}
else
{
SendBroadcastText(BG_EY_TEXT_HORDE_CAPTURED_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
PlaySoundToAll(BG_EY_SOUND_FLAG_CAPTURED_HORDE);
}
SpawnBGObject(BgObjectType, RESPAWN_IMMEDIATELY);
m_FlagsTimer = BG_EY_FLAG_RESPAWN_TIME;
m_FlagCapturedBgObjectType = BgObjectType;
uint8 team_id = 0;
if (player->GetTeam() == ALLIANCE)
{
team_id = TEAM_ALLIANCE;
SendMessageToAll(LANG_BG_EY_CAPTURED_FLAG_A, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
}
else
{
team_id = TEAM_HORDE;
SendMessageToAll(LANG_BG_EY_CAPTURED_FLAG_H, CHAT_MSG_BG_SYSTEM_HORDE, player);
}
uint8 team_id = player->GetTeam() == ALLIANCE ? TEAM_ALLIANCE : TEAM_HORDE;
if (m_TeamPointsCount[team_id] > 0)
AddPoints(player->GetTeam(), BG_EY_FlagPoints[m_TeamPointsCount[team_id] - 1]);
@@ -21,7 +21,6 @@
#include "Battleground.h"
#include "BattlegroundScore.h"
#include "Language.h"
#include "Object.h"
enum BG_EY_Misc
@@ -248,6 +247,35 @@ enum BG_EY_Objectives
EY_OBJECTIVE_CAPTURE_FLAG = 183
};
enum BG_EY_BroadcastTexts
{
BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS = 17828,
BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS = 17829,
BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS = 17835,
BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS = 17836,
BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER = 17819,
BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER = 17823,
BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER = 17831,
BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER = 17832,
BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS = 17826,
BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS = 17827,
BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS = 17833,
BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS = 17834,
BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER = 17824,
BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER = 17825,
BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER = 17837,
BG_EY_TEXT_HORDE_LOST_MAGE_TOWER = 17838,
BG_EY_TEXT_TAKEN_FLAG = 18359,
BG_EY_TEXT_FLAG_DROPPED = 18361,
BG_EY_TEXT_FLAG_RESET = 18364,
BG_EY_TEXT_ALLIANCE_CAPTURED_FLAG = 18375,
BG_EY_TEXT_HORDE_CAPTURED_FLAG = 18384,
};
struct BattlegroundEYPointIconsStruct
{
BattlegroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex)
@@ -310,17 +338,17 @@ const BattlegroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX] =
};
const BattlegroundEYLosingPointStruct m_LosingPointTypes[EY_POINTS_MAX] =
{
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_LOST_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_LOST_H_F_RUINS),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_H_B_TOWER),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_H_D_RUINS),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_H_M_TOWER)
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_LOST_FEL_REAVER_RUINS),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_LOST_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_LOST_BLOOD_ELF_TOWER),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_LOST_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_LOST_DRAENEI_RUINS),
BattlegroundEYLosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_LOST_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_LOST_MAGE_TOWER)
};
const BattlegroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX] =
{
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_TAKEN_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, LANG_BG_EY_HAS_TAKEN_H_F_RUINS, EY_GRAVEYARD_FEL_REAVER),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_H_B_TOWER, EY_GRAVEYARD_BLOOD_ELF),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_H_D_RUINS, EY_GRAVEYARD_DRAENEI_RUINS),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_H_M_TOWER, EY_GRAVEYARD_MAGE_TOWER)
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REAVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_FEL_REAVER_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REAVER_CENTER, BG_EY_TEXT_HORDE_TAKEN_FEL_REAVER_RUINS, EY_GRAVEYARD_FEL_REAVER),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_BLOOD_ELF_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, BG_EY_TEXT_HORDE_TAKEN_BLOOD_ELF_TOWER, EY_GRAVEYARD_BLOOD_ELF),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_DRAENEI_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, BG_EY_TEXT_HORDE_TAKEN_DRAENEI_RUINS, EY_GRAVEYARD_DRAENEI_RUINS),
BattlegroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_ALLIANCE_TAKEN_MAGE_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, BG_EY_TEXT_HORDE_TAKEN_MAGE_TOWER, EY_GRAVEYARD_MAGE_TOWER)
};
struct BattlegroundEYScore final : public BattlegroundScore
@@ -19,7 +19,6 @@
#include "Player.h"
#include "Battleground.h"
#include "BattlegroundIC.h"
#include "Language.h"
#include "WorldPacket.h"
#include "GameObject.h"
#include "ObjectMgr.h"
@@ -32,11 +31,6 @@ BattlegroundIC::BattlegroundIC()
BgObjects.resize(MAX_NORMAL_GAMEOBJECTS_SPAWNS + MAX_AIRSHIPS_SPAWNS + MAX_HANGAR_TELEPORTERS_SPAWNS + MAX_FORTRESS_TELEPORTERS_SPAWNS + MAX_HANGAR_TELEPORTER_EFFECTS_SPAWNS + MAX_FORTRESS_TELEPORTER_EFFECTS_SPAWNS);
BgCreatures.resize(MAX_NORMAL_NPCS_SPAWNS + MAX_WORKSHOP_SPAWNS + MAX_DOCKS_SPAWNS + MAX_SPIRIT_GUIDES_SPAWNS + MAX_HANGAR_NPCS_SPAWNS);
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_IC_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_IC_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_IC_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_IC_HAS_BEGUN;
for (uint8 i = 0; i < 2; ++i)
factionReinforcements[i] = MAX_REINFORCEMENTS;
@@ -192,7 +186,10 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
UpdateNodeWorldState(&nodePoint[i]);
HandleCapturedNodes(&nodePoint[i], false);
SendMessage2ToAll(LANG_BG_IC_TEAM_HAS_TAKEN_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (nodePoint[i].faction == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE), nodePoint[i].string);
if (nodePoint[i].faction == TEAM_ALLIANCE)
SendBroadcastText(ICNodes[i].TextAllianceTaken, CHAT_MSG_BG_SYSTEM_ALLIANCE);
else
SendBroadcastText(ICNodes[i].TextHordeTaken, CHAT_MSG_BG_SYSTEM_HORDE);
nodePoint[i].needChange = false;
nodePoint[i].timer = BANNER_STATE_CHANGE_TIME;
@@ -414,13 +411,6 @@ void BattlegroundIC::HandleKillPlayer(Player* player, Player* killer)
EndBattleground(killer->GetTeam());
}
void BattlegroundIC::EndBattleground(uint32 winner)
{
SendMessage2ToAll(LANG_BG_IC_TEAM_WINS, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (winner == ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE));
Battleground::EndBattleground(winner);
}
void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target_obj)
{
if (GetStatus() != STATUS_IN_PROGRESS)
@@ -458,15 +448,23 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target
UpdatePlayerScore(player, SCORE_BASES_ASSAULTED, 1);
SendMessage2ToAll(LANG_BG_IC_TEAM_ASSAULTED_NODE_1, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string);
SendMessage2ToAll(LANG_BG_IC_TEAM_ASSAULTED_NODE_2, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_ALLIANCE : LANG_BG_IC_HORDE));
if (nodePoint[i].faction == TEAM_ALLIANCE)
SendBroadcastText(ICNodes[i].TextAssaulted, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
SendBroadcastText(ICNodes[i].TextAssaulted, CHAT_MSG_BG_SYSTEM_HORDE, player);
HandleContestedNodes(&nodePoint[i]);
}
else if (nextBanner == nodePoint[i].banners[BANNER_A_CONTROLLED] || nextBanner == nodePoint[i].banners[BANNER_H_CONTROLLED]) // if we are going to spawn the definitve faction banner, we dont need the timer anymore
{
nodePoint[i].timer = BANNER_STATE_CHANGE_TIME;
nodePoint[i].needChange = false;
SendMessage2ToAll(LANG_BG_IC_TEAM_DEFENDED_NODE, CHAT_MSG_BG_SYSTEM_NEUTRAL, player, nodePoint[i].string);
if (nodePoint[i].faction == TEAM_ALLIANCE)
SendBroadcastText(ICNodes[i].TextDefended, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
SendBroadcastText(ICNodes[i].TextDefended, CHAT_MSG_BG_SYSTEM_HORDE, player);
HandleCapturedNodes(&nodePoint[i], true);
UpdatePlayerScore(player, SCORE_BASES_DEFENDED, 1);
}
@@ -809,26 +807,36 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go)
GetBGObject(BG_IC_GO_ALLIANCE_BANNER)->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
}
uint32 lang_entry = 0;
uint32 textId;
ChatMsg msgType;
switch (go->GetEntry())
{
case GO_HORDE_GATE_1:
lang_entry = LANG_BG_IC_NORTH_GATE_DESTROYED;
textId = BG_IC_TEXT_FRONT_GATE_HORDE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE;
break;
case GO_HORDE_GATE_2:
case GO_ALLIANCE_GATE_1:
lang_entry = LANG_BG_IC_WEST_GATE_DESTROYED;
textId = BG_IC_TEXT_WEST_GATE_HORDE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE;
break;
case GO_HORDE_GATE_3:
textId = BG_IC_TEXT_EAST_GATE_HORDE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_ALLIANCE;
break;
case GO_ALLIANCE_GATE_1:
textId = BG_IC_TEXT_WEST_GATE_ALLIANCE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_HORDE;
break;
case GO_ALLIANCE_GATE_2:
lang_entry = LANG_BG_IC_EAST_GATE_DESTROYED;
textId = BG_IC_TEXT_EAST_GATE_ALLIANCE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_HORDE;
break;
case GO_ALLIANCE_GATE_3:
lang_entry = LANG_BG_IC_SOUTH_GATE_DESTROYED;
textId = BG_IC_TEXT_FRONT_GATE_ALLIANCE_DESTROYED;
msgType = CHAT_MSG_BG_SYSTEM_HORDE;
break;
default:
break;
return;
}
if (go->GetEntry() == GO_HORDE_GATE_1 || go->GetEntry() == GO_HORDE_GATE_2 || go->GetEntry() == GO_HORDE_GATE_3)
@@ -842,7 +850,7 @@ void BattlegroundIC::DestroyGate(Player* player, GameObject* go)
TC_LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[BG_IC_NPC_HIGH_COMMANDER_HALFORD_WYRMBANE].entry);
}
SendMessage2ToAll(lang_entry, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL, (player->GetTeamId() == TEAM_ALLIANCE ? LANG_BG_IC_HORDE_KEEP : LANG_BG_IC_ALLIANCE_KEEP));
SendBroadcastText(textId, msgType);
}
WorldSafeLocsEntry const* BattlegroundIC::GetClosestGraveYard(Player* player)
@@ -21,7 +21,6 @@
#include "Battleground.h"
#include "BattlegroundScore.h"
#include "Language.h"
#include "Object.h"
const uint32 BG_IC_Factions[2] =
@@ -847,6 +846,36 @@ Position const BG_IC_SpiritGuidePos[MAX_NODE_TYPES+2] =
{1148.65f, -1250.98f, 16.60f, 1.74f}, // last resort horde
};
enum ICBroadcastTexts
{
BG_IC_TEXT_FRONT_GATE_HORDE_DESTROYED = 35409,
BG_IC_TEXT_FRONT_GATE_ALLIANCE_DESTROYED = 35410,
BG_IC_TEXT_WEST_GATE_HORDE_DESTROYED = 35411,
BG_IC_TEXT_WEST_GATE_ALLIANCE_DESTROYED = 35412,
BG_IC_TEXT_EAST_GATE_HORDE_DESTROYED = 35413,
BG_IC_TEXT_EAST_GATE_ALLIANCE_DESTROYED = 35414
};
struct ICNodeInfo
{
uint32 NodeId;
uint32 TextAssaulted;
uint32 TextDefended;
uint32 TextAllianceTaken;
uint32 TextHordeTaken;
};
ICNodeInfo const ICNodes[MAX_NODE_TYPES] =
{
{ NODE_TYPE_REFINERY, 35377, 35378, 35379, 35380 },
{ NODE_TYPE_QUARRY, 35373, 35374, 35375, 35376 },
{ NODE_TYPE_DOCKS, 35365, 35366, 35367, 35368 },
{ NODE_TYPE_HANGAR, 35369, 35370, 35371, 35372 },
{ NODE_TYPE_WORKSHOP, 35278, 35286, 35279, 35280 },
{ NODE_TYPE_GRAVEYARD_A, 35461, 35459, 35463, 35466 },
{ NODE_TYPE_GRAVEYARD_H, 35462, 35460, 35464, 35465 }
};
// I.E: Hangar, Quarry, Graveyards .. etc
struct ICNodePoint
{
@@ -860,18 +889,17 @@ struct ICNodePoint
uint32 last_entry; // the last gameobject_entry
uint32 worldStates[5]; // the worldstates that represent the node in the map
ICNodeState nodeState;
uint32 string;
};
const ICNodePoint nodePointInitial[7] =
const ICNodePoint nodePointInitial[MAX_NODE_TYPES] =
{
{BG_IC_GO_REFINERY_BANNER, GO_REFINERY_BANNER, TEAM_NEUTRAL, NODE_TYPE_REFINERY, {GO_ALLIANCE_BANNER_REFINERY, GO_ALLIANCE_BANNER_REFINERY_CONT, GO_HORDE_BANNER_REFINERY, GO_HORDE_BANNER_REFINERY_CONT}, false, 0, 0, {BG_IC_REFINERY_UNCONTROLLED, BG_IC_REFINERY_CONFLICT_A, BG_IC_REFINERY_CONFLICT_H, BG_IC_REFINERY_CONTROLLED_A, BG_IC_REFINERY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_REFINERY},
{BG_IC_GO_QUARRY_BANNER, GO_QUARRY_BANNER, TEAM_NEUTRAL, NODE_TYPE_QUARRY, {GO_ALLIANCE_BANNER_QUARRY, GO_ALLIANCE_BANNER_QUARRY_CONT, GO_HORDE_BANNER_QUARRY, GO_HORDE_BANNER_QUARRY_CONT}, false, 0, 0, {BG_IC_QUARRY_UNCONTROLLED, BG_IC_QUARRY_CONFLICT_A, BG_IC_QUARRY_CONFLICT_H, BG_IC_QUARRY_CONTROLLED_A, BG_IC_QUARRY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_QUARRY},
{BG_IC_GO_DOCKS_BANNER, GO_DOCKS_BANNER, TEAM_NEUTRAL, NODE_TYPE_DOCKS, {GO_ALLIANCE_BANNER_DOCK, GO_ALLIANCE_BANNER_DOCK_CONT, GO_HORDE_BANNER_DOCK, GO_HORDE_BANNER_DOCK_CONT}, false, 0, 0, {BG_IC_DOCKS_UNCONTROLLED, BG_IC_DOCKS_CONFLICT_A, BG_IC_DOCKS_CONFLICT_H, BG_IC_DOCKS_CONTROLLED_A, BG_IC_DOCKS_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_DOCKS},
{BG_IC_GO_HANGAR_BANNER, GO_HANGAR_BANNER, TEAM_NEUTRAL, NODE_TYPE_HANGAR, {GO_ALLIANCE_BANNER_HANGAR, GO_ALLIANCE_BANNER_HANGAR_CONT, GO_HORDE_BANNER_HANGAR, GO_HORDE_BANNER_HANGAR_CONT}, false, 0, 0, {BG_IC_HANGAR_UNCONTROLLED, BG_IC_HANGAR_CONFLICT_A, BG_IC_HANGAR_CONFLICT_H, BG_IC_HANGAR_CONTROLLED_A, BG_IC_HANGAR_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_HANGAR},
{BG_IC_GO_WORKSHOP_BANNER, GO_WORKSHOP_BANNER, TEAM_NEUTRAL, NODE_TYPE_WORKSHOP, {GO_ALLIANCE_BANNER_WORKSHOP, GO_ALLIANCE_BANNER_WORKSHOP_CONT, GO_HORDE_BANNER_WORKSHOP, GO_HORDE_BANNER_WORKSHOP_CONT}, false, 0, 0, {BG_IC_WORKSHOP_UNCONTROLLED, BG_IC_WORKSHOP_CONFLICT_A, BG_IC_WORKSHOP_CONFLICT_H, BG_IC_WORKSHOP_CONTROLLED_A, BG_IC_WORKSHOP_CONTROLLED_H}, NODE_STATE_UNCONTROLLED, LANG_BG_IC_WORKSHOP},
{BG_IC_GO_ALLIANCE_BANNER, GO_ALLIANCE_BANNER, TEAM_ALLIANCE, NODE_TYPE_GRAVEYARD_A, {GO_ALLIANCE_BANNER_GRAVEYARD_A, GO_ALLIANCE_BANNER_GRAVEYARD_A_CONT, GO_HORDE_BANNER_GRAVEYARD_A, GO_HORDE_BANNER_GRAVEYARD_A_CONT}, false, 0, 0, {BG_IC_ALLIANCE_KEEP_UNCONTROLLED, BG_IC_ALLIANCE_KEEP_CONFLICT_A, BG_IC_ALLIANCE_KEEP_CONFLICT_H, BG_IC_ALLIANCE_KEEP_CONTROLLED_A, BG_IC_ALLIANCE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_A, LANG_BG_IC_ALLIANCE_KEEP},
{BG_IC_GO_HORDE_BANNER, GO_HORDE_BANNER, TEAM_HORDE, NODE_TYPE_GRAVEYARD_H, {GO_ALLIANCE_BANNER_GRAVEYARD_H, GO_ALLIANCE_BANNER_GRAVEYARD_H_CONT, GO_HORDE_BANNER_GRAVEYARD_H, GO_HORDE_BANNER_GRAVEYARD_H_CONT}, false, 0, 0, {BG_IC_HORDE_KEEP_UNCONTROLLED, BG_IC_HORDE_KEEP_CONFLICT_A, BG_IC_HORDE_KEEP_CONFLICT_H, BG_IC_HORDE_KEEP_CONTROLLED_A, BG_IC_HORDE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_H, LANG_BG_IC_HORDE_KEEP}
{BG_IC_GO_REFINERY_BANNER, GO_REFINERY_BANNER, TEAM_NEUTRAL, NODE_TYPE_REFINERY, {GO_ALLIANCE_BANNER_REFINERY, GO_ALLIANCE_BANNER_REFINERY_CONT, GO_HORDE_BANNER_REFINERY, GO_HORDE_BANNER_REFINERY_CONT}, false, 0, 0, {BG_IC_REFINERY_UNCONTROLLED, BG_IC_REFINERY_CONFLICT_A, BG_IC_REFINERY_CONFLICT_H, BG_IC_REFINERY_CONTROLLED_A, BG_IC_REFINERY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED},
{BG_IC_GO_QUARRY_BANNER, GO_QUARRY_BANNER, TEAM_NEUTRAL, NODE_TYPE_QUARRY, {GO_ALLIANCE_BANNER_QUARRY, GO_ALLIANCE_BANNER_QUARRY_CONT, GO_HORDE_BANNER_QUARRY, GO_HORDE_BANNER_QUARRY_CONT}, false, 0, 0, {BG_IC_QUARRY_UNCONTROLLED, BG_IC_QUARRY_CONFLICT_A, BG_IC_QUARRY_CONFLICT_H, BG_IC_QUARRY_CONTROLLED_A, BG_IC_QUARRY_CONTROLLED_H}, NODE_STATE_UNCONTROLLED},
{BG_IC_GO_DOCKS_BANNER, GO_DOCKS_BANNER, TEAM_NEUTRAL, NODE_TYPE_DOCKS, {GO_ALLIANCE_BANNER_DOCK, GO_ALLIANCE_BANNER_DOCK_CONT, GO_HORDE_BANNER_DOCK, GO_HORDE_BANNER_DOCK_CONT}, false, 0, 0, {BG_IC_DOCKS_UNCONTROLLED, BG_IC_DOCKS_CONFLICT_A, BG_IC_DOCKS_CONFLICT_H, BG_IC_DOCKS_CONTROLLED_A, BG_IC_DOCKS_CONTROLLED_H}, NODE_STATE_UNCONTROLLED},
{BG_IC_GO_HANGAR_BANNER, GO_HANGAR_BANNER, TEAM_NEUTRAL, NODE_TYPE_HANGAR, {GO_ALLIANCE_BANNER_HANGAR, GO_ALLIANCE_BANNER_HANGAR_CONT, GO_HORDE_BANNER_HANGAR, GO_HORDE_BANNER_HANGAR_CONT}, false, 0, 0, {BG_IC_HANGAR_UNCONTROLLED, BG_IC_HANGAR_CONFLICT_A, BG_IC_HANGAR_CONFLICT_H, BG_IC_HANGAR_CONTROLLED_A, BG_IC_HANGAR_CONTROLLED_H}, NODE_STATE_UNCONTROLLED},
{BG_IC_GO_WORKSHOP_BANNER, GO_WORKSHOP_BANNER, TEAM_NEUTRAL, NODE_TYPE_WORKSHOP, {GO_ALLIANCE_BANNER_WORKSHOP, GO_ALLIANCE_BANNER_WORKSHOP_CONT, GO_HORDE_BANNER_WORKSHOP, GO_HORDE_BANNER_WORKSHOP_CONT}, false, 0, 0, {BG_IC_WORKSHOP_UNCONTROLLED, BG_IC_WORKSHOP_CONFLICT_A, BG_IC_WORKSHOP_CONFLICT_H, BG_IC_WORKSHOP_CONTROLLED_A, BG_IC_WORKSHOP_CONTROLLED_H}, NODE_STATE_UNCONTROLLED},
{BG_IC_GO_ALLIANCE_BANNER, GO_ALLIANCE_BANNER, TEAM_ALLIANCE, NODE_TYPE_GRAVEYARD_A, {GO_ALLIANCE_BANNER_GRAVEYARD_A, GO_ALLIANCE_BANNER_GRAVEYARD_A_CONT, GO_HORDE_BANNER_GRAVEYARD_A, GO_HORDE_BANNER_GRAVEYARD_A_CONT}, false, 0, 0, {BG_IC_ALLIANCE_KEEP_UNCONTROLLED, BG_IC_ALLIANCE_KEEP_CONFLICT_A, BG_IC_ALLIANCE_KEEP_CONFLICT_H, BG_IC_ALLIANCE_KEEP_CONTROLLED_A, BG_IC_ALLIANCE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_A},
{BG_IC_GO_HORDE_BANNER, GO_HORDE_BANNER, TEAM_HORDE, NODE_TYPE_GRAVEYARD_H, {GO_ALLIANCE_BANNER_GRAVEYARD_H, GO_ALLIANCE_BANNER_GRAVEYARD_H_CONT, GO_HORDE_BANNER_GRAVEYARD_H, GO_HORDE_BANNER_GRAVEYARD_H_CONT}, false, 0, 0, {BG_IC_HORDE_KEEP_UNCONTROLLED, BG_IC_HORDE_KEEP_CONFLICT_A, BG_IC_HORDE_KEEP_CONFLICT_H, BG_IC_HORDE_KEEP_CONTROLLED_A, BG_IC_HORDE_KEEP_CONTROLLED_H}, NODE_STATE_CONTROLLED_H}
};
enum HonorRewards
@@ -935,7 +963,6 @@ class BattlegroundIC : public Battleground
void SpawnLeader(uint32 teamid);
void HandleKillUnit(Creature* unit, Player* killer) override;
void HandleKillPlayer(Player* player, Player* killer) override;
void EndBattleground(uint32 winner) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* /*target_obj*/) override;
void DestroyGate(Player* player, GameObject* go) override;
@@ -19,7 +19,6 @@
#include "BattlegroundSA.h"
#include "GameObject.h"
#include "GameTime.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -27,10 +26,7 @@
BattlegroundSA::BattlegroundSA()
{
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_SA_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_SA_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_SA_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = 0;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = 0; // handle by Kanrethad
BgObjects.resize(BG_SA_MAXOBJ);
BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
@@ -320,7 +316,7 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
{
SignaledRoundTwo = true;
InitSecondRound = false;
SendMessageToAll(LANG_BG_SA_ROUND_TWO_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_SA_TEXT_ROUND_TWO_START_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
}
else
@@ -377,7 +373,7 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
if (!SignaledRoundTwoHalfMin)
{
SignaledRoundTwoHalfMin = true;
SendMessageToAll(LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_SA_TEXT_ROUND_TWO_START_HALF_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
}
StartShips();
@@ -894,9 +890,9 @@ void BattlegroundSA::TitanRelicActivated(Player* clicker)
if (clicker->GetTeamId() == Attackers)
{
if (clicker->GetTeamId() == TEAM_ALLIANCE)
SendMessageToAll(LANG_BG_SA_ALLIANCE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_SA_TEXT_ALLIANCE_CAPTURED_TITAN_PORTAL, CHAT_MSG_BG_SYSTEM_ALLIANCE);
else
SendMessageToAll(LANG_BG_SA_HORDE_CAPTURED_RELIC, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_SA_TEXT_HORDE_CAPTURED_TITAN_PORTAL, CHAT_MSG_BG_SYSTEM_HORDE);
if (Status == BG_SA_ROUND_ONE)
{
@@ -482,6 +482,15 @@ float const BG_SA_GYOrientation[BG_SA_MAX_GY] =
6.148f, // defender last GY
};
enum BG_SA_BroadcastTexts
{
BG_SA_TEXT_ALLIANCE_CAPTURED_TITAN_PORTAL = 28944,
BG_SA_TEXT_HORDE_CAPTURED_TITAN_PORTAL = 28945,
BG_SA_TEXT_ROUND_TWO_START_ONE_MINUTE = 29448,
BG_SA_TEXT_ROUND_TWO_START_HALF_MINUTE = 29449
};
struct GateInfo
{
uint8 GateId;
@@ -18,7 +18,6 @@
#include "BattlegroundWS.h"
#include "GameObject.h"
#include "Language.h"
#include "Object.h"
#include "BattlegroundMgr.h"
#include "Player.h"
@@ -45,10 +44,10 @@ BattlegroundWS::BattlegroundWS()
BgObjects.resize(BG_WS_OBJECT_MAX);
BgCreatures.resize(BG_CREATURES_MAX_WS);
StartMessageIds[BG_STARTING_EVENT_FIRST] = LANG_BG_WS_START_TWO_MINUTES;
StartMessageIds[BG_STARTING_EVENT_SECOND] = LANG_BG_WS_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_WS_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
StartMessageIds[BG_STARTING_EVENT_SECOND] = BG_WS_TEXT_START_ONE_MINUTE;
StartMessageIds[BG_STARTING_EVENT_THIRD] = BG_WS_TEXT_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = BG_WS_TEXT_BATTLE_HAS_BEGUN;
_flagSpellForceTimer = 0;
_bothFlagsKept = false;
_flagDebuffState = 0;
@@ -248,7 +247,7 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
//when map_update will be allowed for battlegrounds this code will be useless
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY);
SendMessageToAll(LANG_BG_WS_F_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
SendBroadcastText(BG_WS_TEXT_FLAGS_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED); // flag respawned sound...
}
_bothFlagsKept = false;
@@ -261,16 +260,11 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
RespawnFlag(team, false);
if (team == ALLIANCE)
{
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY);
SendMessageToAll(LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
else
{
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY);
SendMessageToAll(LANG_BG_WS_HORDE_FLAG_RESPAWNED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
}
SendBroadcastText(BG_WS_TEXT_FLAGS_PLACED, CHAT_MSG_BG_SYSTEM_NEUTRAL);
PlaySoundToAll(BG_WS_SOUND_FLAGS_RESPAWNED);
if (GameObject* obj = GetBgMap()->GetGameObject(GetDroppedFlagGUID(team)))
@@ -335,9 +329,9 @@ void BattlegroundWS::EventPlayerCapturedFlag(Player* player)
SpawnBGObject(BG_WS_OBJECT_A_FLAG, BG_WS_FLAG_RESPAWN_TIME);
if (player->GetTeam() == ALLIANCE)
SendMessageToAll(LANG_BG_WS_CAPTURED_HF, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
SendBroadcastText(BG_WS_TEXT_CAPTURED_HORDE_FLAG, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
else
SendMessageToAll(LANG_BG_WS_CAPTURED_AF, CHAT_MSG_BG_SYSTEM_HORDE, player);
SendBroadcastText(BG_WS_TEXT_CAPTURED_ALLIANCE_FLAG, CHAT_MSG_BG_SYSTEM_HORDE, player);
UpdateFlagState(player->GetTeam(), 1); // flag state none
UpdateTeamScore(player->GetTeamId());
@@ -445,12 +439,12 @@ void BattlegroundWS::EventPlayerDroppedFlag(Player* player)
if (player->GetTeam() == ALLIANCE)
{
SendMessageToAll(LANG_BG_WS_DROPPED_HF, CHAT_MSG_BG_SYSTEM_HORDE, player);
SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_HORDE, player);
UpdateWorldState(BG_WS_FLAG_UNK_HORDE, uint32(-1));
}
else
{
SendMessageToAll(LANG_BG_WS_DROPPED_AF, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_DROPPED, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
UpdateWorldState(BG_WS_FLAG_UNK_ALLIANCE, uint32(-1));
}
@@ -463,15 +457,11 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
if (GetStatus() != STATUS_IN_PROGRESS)
return;
int32 message_id = 0;
ChatMsg type = CHAT_MSG_BG_SYSTEM_NEUTRAL;
//alliance flag picked up from base
if (player->GetTeam() == HORDE && GetFlagState(ALLIANCE) == BG_WS_FLAG_STATE_ON_BASE
&& BgObjects[BG_WS_OBJECT_A_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_AF;
type = CHAT_MSG_BG_SYSTEM_HORDE;
SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_HORDE, player);
PlaySoundToAll(BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY);
SetAllianceFlagPicker(player->GetGUID());
@@ -489,8 +479,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
if (player->GetTeam() == ALLIANCE && GetFlagState(HORDE) == BG_WS_FLAG_STATE_ON_BASE
&& BgObjects[BG_WS_OBJECT_H_FLAG] == target_obj->GetGUID())
{
message_id = LANG_BG_WS_PICKEDUP_HF;
type = CHAT_MSG_BG_SYSTEM_ALLIANCE;
SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
PlaySoundToAll(BG_WS_SOUND_HORDE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY);
SetHordeFlagPicker(player->GetGUID());
@@ -510,8 +499,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
{
if (player->GetTeam() == ALLIANCE)
{
message_id = LANG_BG_WS_RETURNED_AF;
type = CHAT_MSG_BG_SYSTEM_ALLIANCE;
SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_RETURNED, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
UpdateFlagState(HORDE, BG_WS_FLAG_STATE_WAIT_RESPAWN);
RespawnFlag(ALLIANCE, false);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_IMMEDIATELY);
@@ -521,8 +509,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
}
else
{
message_id = LANG_BG_WS_PICKEDUP_AF;
type = CHAT_MSG_BG_SYSTEM_HORDE;
SendBroadcastText(BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_HORDE, player);
PlaySoundToAll(BG_WS_SOUND_ALLIANCE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_A_FLAG, RESPAWN_ONE_DAY);
SetAllianceFlagPicker(player->GetGUID());
@@ -545,8 +532,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
{
if (player->GetTeam() == HORDE)
{
message_id = LANG_BG_WS_RETURNED_HF;
type = CHAT_MSG_BG_SYSTEM_HORDE;
SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_RETURNED, CHAT_MSG_BG_SYSTEM_HORDE, player);
UpdateFlagState(ALLIANCE, BG_WS_FLAG_STATE_WAIT_RESPAWN);
RespawnFlag(HORDE, false);
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_IMMEDIATELY);
@@ -556,8 +542,7 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
}
else
{
message_id = LANG_BG_WS_PICKEDUP_HF;
type = CHAT_MSG_BG_SYSTEM_ALLIANCE;
SendBroadcastText(BG_WS_TEXT_HORDE_FLAG_PICKED_UP, CHAT_MSG_BG_SYSTEM_ALLIANCE, player);
PlaySoundToAll(BG_WS_SOUND_HORDE_FLAG_PICKED_UP);
SpawnBGObject(BG_WS_OBJECT_H_FLAG, RESPAWN_ONE_DAY);
SetHordeFlagPicker(player->GetGUID());
@@ -574,10 +559,6 @@ void BattlegroundWS::EventPlayerClickedOnFlag(Player* player, GameObject* target
//target_obj->Delete();
}
if (!message_id)
return;
SendMessageToAll(message_id, type, player);
player->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
}
@@ -31,6 +31,23 @@ enum BG_WS_TimerOrScore
BG_WS_SPELL_BRUTAL_TIME = 900000
};
enum BG_WS_BroadcastTexts
{
BG_WS_TEXT_START_ONE_MINUTE = 10015,
BG_WS_TEXT_START_HALF_MINUTE = 10016,
BG_WS_TEXT_BATTLE_HAS_BEGUN = 10014,
BG_WS_TEXT_CAPTURED_HORDE_FLAG = 9801,
BG_WS_TEXT_CAPTURED_ALLIANCE_FLAG = 9802,
BG_WS_TEXT_FLAGS_PLACED = 9803,
BG_WS_TEXT_ALLIANCE_FLAG_PICKED_UP = 9804,
BG_WS_TEXT_ALLIANCE_FLAG_DROPPED = 9805,
BG_WS_TEXT_HORDE_FLAG_PICKED_UP = 9807,
BG_WS_TEXT_HORDE_FLAG_DROPPED = 9806,
BG_WS_TEXT_ALLIANCE_FLAG_RETURNED = 9808,
BG_WS_TEXT_HORDE_FLAG_RETURNED = 9809,
};
enum BG_WS_Sound
{
BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE = 8173,
+16 -6
View File
@@ -24463,22 +24463,32 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
}
case ITEM_CLASS_ARMOR:
{
// most used check: shield only
if (spellInfo->EquippedItemSubClassMask & ((1 << ITEM_SUBCLASS_ARMOR_BUCKLER) | (1 << ITEM_SUBCLASS_ARMOR_SHIELD)))
{
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
// special check to filter things like Shield Wall, the aura is not permanent and must stay even without required item
if (!spellInfo->IsPassive())
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (spellInfo->Effects[i].IsAura())
return true;
}
}
// tabard not have dependent spells
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_MAINHAND; ++i)
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i))
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
// shields can be equipped to offhand slot
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
// ranged slot can have some armor subclasses
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED))
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
return true;
break;
}
default:
+17 -25
View File
@@ -24,6 +24,7 @@
#include "Battleground.h"
#include "BattlegroundScore.h"
#include "CellImpl.h"
#include "Chat.h"
#include "ChatTextBuilder.h"
#include "ConditionMgr.h"
#include "CreatureAI.h"
@@ -4510,7 +4511,7 @@ bool Unit::HasStrongerAuraWithDR(SpellInfo const* auraSpellInfo, Unit* caster, b
if (spellInfo->GetDiminishingReturnsGroupForSpell(triggered) != diminishGroup)
continue;
int32 existingDuration = itr->second->GetBase()->GetMaxDuration();
int32 existingDuration = itr->second->GetBase()->GetDuration();
int32 newDuration = auraSpellInfo->GetMaxDuration();
ApplyDiminishingToDuration(auraSpellInfo, triggered, newDuration, caster, level);
if (newDuration > 0 && newDuration < existingDuration)
@@ -11554,31 +11555,22 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
if (Player* killerPlayer = GetCharmerOrOwnerPlayerOrPlayerItself())
killerPlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, 0, victim);
// if talent known but not triggered (check priest class for speedup check)
// if talent known but not triggered
bool spiritOfRedemption = false;
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST)
if (AuraEffect const* aurEff = victim->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 0, 0, 0x200))
{
AuraEffectList const& dummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY);
for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
{
if ((*itr)->GetSpellInfo()->SpellIconID == 1654)
{
AuraEffect const* aurEff = *itr;
// save value before aura remove
uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL);
if (!ressSpellId)
ressSpellId = victim->ToPlayer()->GetResurrectionSpellId();
// Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers)
victim->RemoveAllAurasOnDeath();
// restore for use at real death
victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
// save value before aura remove
uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL);
if (!ressSpellId)
ressSpellId = victim->ToPlayer()->GetResurrectionSpellId();
// Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers)
victim->RemoveAllAurasOnDeath();
// restore for use at real death
victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
// FORM_SPIRITOFREDEMPTION and related auras
victim->CastSpell(victim, 27827, true, NULL, aurEff);
spiritOfRedemption = true;
break;
}
}
// FORM_SPIRITOFREDEMPTION and related auras
victim->CastSpell(victim, 27827, aurEff);
spiritOfRedemption = true;
}
if (!spiritOfRedemption)
@@ -14594,11 +14586,11 @@ void Unit::Talk(uint32 textId, ChatMsg msgType, float textRange, WorldObject con
{
if (!sObjectMgr->GetBroadcastText(textId))
{
TC_LOG_ERROR("entities.unit", "WorldObject::MonsterText: `broadcast_text` was not %u found", textId);
TC_LOG_ERROR("entities.unit", "WorldObject::MonsterText: `broadcast_text` (ID: %u) was not found", textId);
return;
}
Trinity::BroadcastTextBuilder builder(this, msgType, textId, target);
Trinity::BroadcastTextBuilder builder(this, msgType, textId, getGender(), target);
Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> localizer(builder);
Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::BroadcastTextBuilder> > worker(this, textRange, localizer);
Cell::VisitWorldObjects(this, worker, textRange);
@@ -17,7 +17,6 @@
*/
#include "Common.h"
#include "Language.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "World.h"
@@ -105,7 +104,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
/// @todo find correct opcode
if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
return;
}
+8 -127
View File
@@ -635,80 +635,7 @@ enum TrinityStrings
// End Level 3 list, continued at 1100
// Battleground
LANG_BG_A_WINS = 600,
LANG_BG_H_WINS = 601,
LANG_BG_WS_START_TWO_MINUTES = 753,
LANG_BG_WS_START_ONE_MINUTE = 602,
LANG_BG_WS_START_HALF_MINUTE = 603,
LANG_BG_WS_HAS_BEGUN = 604,
LANG_BG_WS_CAPTURED_HF = 605,
LANG_BG_WS_CAPTURED_AF = 606,
LANG_BG_WS_DROPPED_HF = 607,
LANG_BG_WS_DROPPED_AF = 608,
LANG_BG_WS_RETURNED_AF = 609,
LANG_BG_WS_RETURNED_HF = 610,
LANG_BG_WS_PICKEDUP_HF = 611,
LANG_BG_WS_PICKEDUP_AF = 612,
LANG_BG_WS_F_PLACED = 613,
LANG_BG_WS_ALLIANCE_FLAG_RESPAWNED = 614,
LANG_BG_WS_HORDE_FLAG_RESPAWNED = 615,
LANG_BG_EY_START_TWO_MINUTES = 755,
LANG_BG_EY_START_ONE_MINUTE = 636,
LANG_BG_EY_START_HALF_MINUTE = 637,
LANG_BG_EY_HAS_BEGUN = 638,
LANG_BG_AB_ALLY = 650,
LANG_BG_AB_HORDE = 651,
LANG_BG_AB_NODE_STABLES = 652,
LANG_BG_AB_NODE_BLACKSMITH = 653,
LANG_BG_AB_NODE_FARM = 654,
LANG_BG_AB_NODE_LUMBER_MILL = 655,
LANG_BG_AB_NODE_GOLD_MINE = 656,
LANG_BG_AB_NODE_TAKEN = 657,
LANG_BG_AB_NODE_DEFENDED = 658,
LANG_BG_AB_NODE_ASSAULTED = 659,
LANG_BG_AB_NODE_CLAIMED = 660,
LANG_BG_AB_START_TWO_MINUTES = 754,
LANG_BG_AB_START_ONE_MINUTE = 661,
LANG_BG_AB_START_HALF_MINUTE = 662,
LANG_BG_AB_HAS_BEGUN = 663,
LANG_BG_AB_A_NEAR_VICTORY = 664,
LANG_BG_AB_H_NEAR_VICTORY = 665,
LANG_BG_MARK_BY_MAIL = 666,
LANG_BG_EY_HAS_TAKEN_A_M_TOWER = 667,
LANG_BG_EY_HAS_TAKEN_H_M_TOWER = 668,
LANG_BG_EY_HAS_TAKEN_A_D_RUINS = 669,
LANG_BG_EY_HAS_TAKEN_H_D_RUINS = 670,
LANG_BG_EY_HAS_TAKEN_A_B_TOWER = 671,
LANG_BG_EY_HAS_TAKEN_H_B_TOWER = 672,
LANG_BG_EY_HAS_TAKEN_A_F_RUINS = 673,
LANG_BG_EY_HAS_TAKEN_H_F_RUINS = 674,
LANG_BG_EY_HAS_LOST_A_M_TOWER = 675,
LANG_BG_EY_HAS_LOST_H_M_TOWER = 676,
LANG_BG_EY_HAS_LOST_A_D_RUINS = 677,
LANG_BG_EY_HAS_LOST_H_D_RUINS = 678,
LANG_BG_EY_HAS_LOST_A_B_TOWER = 679,
LANG_BG_EY_HAS_LOST_H_B_TOWER = 680,
LANG_BG_EY_HAS_LOST_A_F_RUINS = 681,
LANG_BG_EY_HAS_LOST_H_F_RUINS = 682,
LANG_BG_EY_HAS_TAKEN_FLAG = 683,
LANG_BG_EY_CAPTURED_FLAG_A = 684,
LANG_BG_EY_CAPTURED_FLAG_H = 685,
LANG_BG_EY_DROPPED_FLAG = 686,
LANG_BG_EY_RESETED_FLAG = 687,
LANG_ARENA_ONE_TOOLOW = 700,
LANG_ARENA_ONE_MINUTE = 701,
LANG_ARENA_THIRTY_SECONDS = 702,
LANG_ARENA_FIFTEEN_SECONDS = 703,
LANG_ARENA_HAS_BEGUN = 704,
// 600-704 - free
LANG_WAIT_BEFORE_SPEAKING = 705,
LANG_NOT_EQUIPPED_ITEM = 706,
LANG_PLAYER_DND = 707,
@@ -730,9 +657,7 @@ enum TrinityStrings
LANG_ARENA_GROUP_TOO_LARGE = 721, // "Your group is too large for this arena. Please regroup to join."
LANG_ARENA_YOUR_TEAM_ONLY = 722, // "Your group has members not in your arena team. Please regroup to join."
LANG_ARENA_NOT_ENOUGH_PLAYERS = 723, // "Your group does not have enough players to join this match."
LANG_ARENA_GOLD_WINS = 724, // "The Gold Team wins!"
LANG_ARENA_GREEN_WINS = 725, // "The Green Team wins!"
// = 726, not used
// 724-726 - free
LANG_BG_GROUP_OFFLINE_MEMBER = 727, // "Your group has an offline member. Please remove him before joining."
LANG_BG_GROUP_MIXED_FACTION = 728, // "Your group has players from the opposing faction. You can't join the battleground as a group."
LANG_BG_GROUP_MIXED_LEVELS = 729, // "Your group has players from different battleground brakets. You can't join as group."
@@ -760,14 +685,12 @@ enum TrinityStrings
LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING = 750, // "Not enough players. This game will close in %u mins."
LANG_BATTLEGROUND_PREMATURE_FINISH_WARNING_SECS = 751, // "Not enough players. This game will close in %u seconds."
// = 752, see LANG_PINFO_ACC_IP
// LANG_BG_WS_START_TWO_MINUTES = 753, - defined above
// LANG_BG_AB_START_TWO_MINUTES = 754, - defined above
// LANG_BG_EY_START_TWO_MINUTES = 755, - defined above
// Room for BG/ARENA = 773-784, 788-799 not used
// Room for BG/ARENA = 773-784
LANG_ARENA_TESTING = 785,
LANG_AUTO_ANN = 786,
LANG_ANNOUNCE_COLOR = 787,
// 788-799 - free
// in game strings
LANG_PET_INVALID_NAME = 800,
@@ -1000,53 +923,18 @@ enum TrinityStrings
LANG_GROUP_ROLE_CHANGED = 1186,
LANG_LEADER_CANNOT_BE_ASSISTANT = 1187,
LANG_BAN_EXISTS = 1188,
// Room for more level 3 1189-1198 not used
// Room for more level 3 1189-1199 not used
// Debug commands
LANG_GUILD_INFO_LEVEL = 1999, // LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT -- unused on 3.3.5a
LANG_CINEMATIC_NOT_EXIST = 1200,
LANG_MOVIE_NOT_EXIST = 1201,
LANG_DEBUG_AREATRIGGER_ON = 1202,
LANG_DEBUG_AREATRIGGER_OFF = 1203,
LANG_DEBUG_AREATRIGGER_REACHED = 1204,
// Isle of Conquest
LANG_BG_IC_START_TWO_MINUTES = 1205,
LANG_BG_IC_START_ONE_MINUTE = 1206,
LANG_BG_IC_START_HALF_MINUTE = 1207,
LANG_BG_IC_HAS_BEGUN = 1208,
LANG_BG_IC_ALLIANCE_KEEP = 1209,
LANG_BG_IC_HORDE_KEEP = 1210,
LANG_BG_IC_TEAM_WINS = 1211,
LANG_BG_IC_WEST_GATE_DESTROYED = 1212,
LANG_BG_IC_EAST_GATE_DESTROYED = 1213,
LANG_BG_IC_SOUTH_GATE_DESTROYED = 1214,
LANG_BG_IC_NORTH_GATE_DESTROYED = 1215,
LANG_BG_IC_TEAM_ASSAULTED_NODE_1 = 1216,
LANG_BG_IC_TEAM_DEFENDED_NODE = 1217,
LANG_BG_IC_TEAM_ASSAULTED_NODE_2 = 1218,
LANG_BG_IC_TEAM_HAS_TAKEN_NODE = 1219,
LANG_BG_IC_WORKSHOP = 1220,
LANG_BG_IC_DOCKS = 1221,
LANG_BG_IC_REFINERY = 1222,
LANG_BG_IC_QUARRY = 1223,
LANG_BG_IC_HANGAR = 1224,
// 1225-1299
LANG_BG_IC_ALLIANCE = 1300,
LANG_BG_IC_HORDE = 1301,
// 1302-1325
// AV
LANG_BG_AV_START_ONE_MINUTE = 1326,
LANG_BG_AV_START_HALF_MINUTE = 1327,
LANG_BG_AV_HAS_BEGUN = 1328,
LANG_BG_AV_A_NEAR_LOSE = 1329,
LANG_BG_AV_H_NEAR_LOSE = 1330,
// 1331-1332
LANG_BG_AV_START_TWO_MINUTES = 1333,
// FREE IDS 1334-1999
// 1205-1998 - free
// Ticket Strings 2000-2030
LANG_GUILD_INFO_LEVEL = 1999, // LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT -- unused on 3.3.5a
LANG_COMMAND_TICKETNEW = 2000,
LANG_COMMAND_TICKETUPDATED = 2001,
LANG_COMMAND_TICKETPLAYERABANDON = 2002,
@@ -1204,14 +1092,7 @@ enum TrinityStrings
LANG_OPVP_ZM_GOSSIP_ALLIANCE = 10054,
LANG_OPVP_ZM_GOSSIP_HORDE = 10055,
LANG_BG_SA_START_TWO_MINUTES = 10056,
LANG_BG_SA_START_ONE_MINUTE = 10057,
LANG_BG_SA_START_HALF_MINUTE = 10058,
// unused 10059-10062
LANG_BG_SA_ALLIANCE_CAPTURED_RELIC = 10063, //The Alliance captured the titan portal!
LANG_BG_SA_HORDE_CAPTURED_RELIC = 10064, //The Horde captured the titan portal!
LANG_BG_SA_ROUND_TWO_ONE_MINUTE = 10065, //Round 2 of the Battle for the Strand of the Ancients begins in 1 minute.
LANG_BG_SA_ROUND_TWO_START_HALF_MINUTE = 10066, //Round 2 begins in 30 seconds. Prepare yourselves!
// 10056-10066 - free
// Use for custom patches 11000-11999
LANG_AUTO_BROADCAST = 11000,
@@ -451,7 +451,7 @@ enum SpellAttr2
enum SpellAttr3
{
SPELL_ATTR3_UNK0 = 0x00000001, // 0
SPELL_ATTR3_UNK1 = 0x00000002, // 1
SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK = 0x00000002, // 1 Ignores subclass mask check when checking proc
SPELL_ATTR3_UNK2 = 0x00000004, // 2
SPELL_ATTR3_BLOCKABLE_SPELL = 0x00000008, // 3 Only dmg class melee in 3.1.3
SPELL_ATTR3_IGNORE_RESURRECTION_TIMER = 0x00000010, // 4 you don't have to wait to be resurrected with these spells
@@ -1657,9 +1657,6 @@ void AuraEffect::HandleSpiritOfRedemption(AuraApplication const* aurApp, uint8 m
{
if (target->GetTypeId() == TYPEID_PLAYER)
{
// disable breath/etc timers
target->ToPlayer()->StopMirrorTimers();
// set stand state (expected in this form)
if (!target->IsStandState())
target->SetStandState(UNIT_STAND_STATE_STAND);
+28 -22
View File
@@ -1802,33 +1802,39 @@ uint8 Aura::GetProcEffectMask(AuraApplication* aurApp, ProcEventInfo& eventInfo,
// do that only for passive spells
/// @todo this needs to be unified for all kinds of auras
Unit* target = aurApp->GetTarget();
if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER)
if (IsPassive() && target->GetTypeId() == TYPEID_PLAYER && GetSpellInfo()->EquippedItemClass != -1)
{
if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_WEAPON)
if (!GetSpellInfo()->HasAttribute(SPELL_ATTR3_IGNORE_PROC_SUBCLASS_MASK))
{
if (target->ToPlayer()->IsInFeralForm())
return 0;
if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
Item* item = nullptr;
if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_WEAPON)
{
WeaponAttackType attType = damageInfo->GetAttackType();
Item* item = nullptr;
if (attType == BASE_ATTACK)
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
else if (attType == OFF_ATTACK)
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
else
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_WEAPON || !((1 << item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask))
if (target->ToPlayer()->IsInFeralForm())
return 0;
if (DamageInfo const* damageInfo = eventInfo.GetDamageInfo())
{
switch (damageInfo->GetAttackType())
{
case BASE_ATTACK:
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
break;
case OFF_ATTACK:
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
break;
default:
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED);
break;
}
}
}
}
else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR)
{
// Check if player is wearing shield
Item* item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
if (!item || item->IsBroken() || item->GetTemplate()->Class != ITEM_CLASS_ARMOR || !((1 << item->GetTemplate()->SubClass) & GetSpellInfo()->EquippedItemSubClassMask))
else if (GetSpellInfo()->EquippedItemClass == ITEM_CLASS_ARMOR)
{
// Check if player is wearing shield
item = target->ToPlayer()->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
}
if (!item || item->IsBroken() || !item->IsFitToSpellRequirements(GetSpellInfo()))
return 0;
}
}
+59
View File
@@ -0,0 +1,59 @@
/*
* Copyright (C) 2008-2018 TrinityCore <https://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ChatTextBuilder.h"
#include "Chat.h"
#include "ObjectMgr.h"
#include <cstdarg>
void Trinity::BroadcastTextBuilder::operator()(WorldPacket& data, LocaleConstant locale) const
{
BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId);
ChatHandler::BuildChatPacket(data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale);
}
size_t Trinity::BroadcastTextBuilder::operator()(WorldPacket* data, LocaleConstant locale) const
{
BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId);
return ChatHandler::BuildChatPacket(*data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _gender) : "", _achievementId, "", locale);
}
void Trinity::CustomChatTextBuilder::operator()(WorldPacket& data, LocaleConstant locale) const
{
ChatHandler::BuildChatPacket(data, _msgType, _language, _source, _target, _text, 0, "", locale);
}
void Trinity::TrinityStringChatBuilder::operator()(WorldPacket& data, LocaleConstant locale) const
{
char const* text = sObjectMgr->GetTrinityString(_textId, locale);
if (_args)
{
// we need copy va_list before use or original va_list will corrupted
va_list ap;
va_copy(ap, *_args);
static size_t const BufferSize = 2048;
char strBuffer[BufferSize];
vsnprintf(strBuffer, BufferSize, text, ap);
va_end(ap);
ChatHandler::BuildChatPacket(data, _msgType, LANG_UNIVERSAL, _source, _target, strBuffer, 0, "", locale);
}
else
ChatHandler::BuildChatPacket(data, _msgType, LANG_UNIVERSAL, _source, _target, text, 0, "", locale);
}
+29 -20
View File
@@ -18,33 +18,29 @@
#ifndef __CHATTEXT_BUILDER_H
#define __CHATTEXT_BUILDER_H
#include "Chat.h"
#include "ObjectMgr.h"
#include "Common.h"
#include "SharedDefines.h"
#include <string>
class WorldObject;
class WorldPacket;
namespace Trinity
{
class BroadcastTextBuilder
{
public:
BroadcastTextBuilder(Unit const* obj, ChatMsg msgType, uint32 textId, WorldObject const* target = nullptr, uint32 achievementId = 0)
: _source(obj), _msgType(msgType), _textId(textId), _target(target), _achievementId(achievementId) { }
BroadcastTextBuilder(WorldObject const* obj, ChatMsg msgType, uint32 textId, uint8 gender, WorldObject const* target = nullptr, uint32 achievementId = 0)
: _source(obj), _msgType(msgType), _textId(textId), _gender(gender), _target(target), _achievementId(achievementId) { }
void operator()(WorldPacket& data, LocaleConstant locale)
{
BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId);
ChatHandler::BuildChatPacket(data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _source->getGender()) : "", _achievementId, "", locale);
}
size_t operator()(WorldPacket* data, LocaleConstant locale) const
{
BroadcastText const* bct = sObjectMgr->GetBroadcastText(_textId);
return ChatHandler::BuildChatPacket(*data, _msgType, bct ? Language(bct->Language) : LANG_UNIVERSAL, _source, _target, bct ? bct->GetText(locale, _source->getGender()) : "", _achievementId, "", locale);
}
void operator()(WorldPacket& data, LocaleConstant locale) const;
size_t operator()(WorldPacket* data, LocaleConstant locale) const;
private:
Unit const* _source;
WorldObject const* _source;
ChatMsg _msgType;
uint32 _textId;
uint8 _gender;
WorldObject const* _target;
uint32 _achievementId;
};
@@ -55,10 +51,7 @@ namespace Trinity
CustomChatTextBuilder(WorldObject const* obj, ChatMsg msgType, std::string const& text, Language language = LANG_UNIVERSAL, WorldObject const* target = nullptr)
: _source(obj), _msgType(msgType), _text(text), _language(language), _target(target) { }
void operator()(WorldPacket& data, LocaleConstant locale)
{
ChatHandler::BuildChatPacket(data, _msgType, _language, _source, _target, _text, 0, "", locale);
}
void operator()(WorldPacket& data, LocaleConstant locale) const;
private:
WorldObject const* _source;
@@ -67,6 +60,22 @@ namespace Trinity
Language _language;
WorldObject const* _target;
};
class TrinityStringChatBuilder
{
public:
TrinityStringChatBuilder(WorldObject const* obj, ChatMsg msgType, uint32 textId, WorldObject const* target = nullptr, va_list* args = nullptr)
: _source(obj), _msgType(msgType), _textId(textId), _target(target), _args(args) { }
void operator()(WorldPacket& data, LocaleConstant locale) const;
private:
WorldObject const* _source;
ChatMsg _msgType;
uint32 _textId;
WorldObject const* _target;
va_list* _args;
};
}
// namespace Trinity
@@ -307,8 +307,7 @@ public:
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
{
if (!prisonerGUID)
prisonerGUID = guid;
prisonerGUID = guid;
}
ObjectGuid GetGUID(int32 /*id*/) const override
@@ -366,7 +366,7 @@ public:
// Safeguard to prevent Hadronox dying to NPCs
void DamageTaken(Unit* who, uint32& damage) override
{
if (!who->IsControlledByPlayer() && me->HealthBelowPct(70))
if ((!who || !who->IsControlledByPlayer()) && me->HealthBelowPct(70))
{
if (me->HealthBelowPctDamaged(5, damage))
damage = 0;
@@ -545,18 +545,18 @@ class spell_tyrannus_rimefang_icy_blast : public SpellScriptLoader
}
};
class at_tyrannus_event_starter : public OnlyOnceAreaTriggerScript
class at_tyrannus_event_starter : public AreaTriggerScript
{
public:
at_tyrannus_event_starter() : OnlyOnceAreaTriggerScript("at_tyrannus_event_starter") { }
at_tyrannus_event_starter() : AreaTriggerScript("at_tyrannus_event_starter") { }
bool _OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) override
bool OnTrigger(Player* player, const AreaTriggerEntry * /*at*/) override
{
InstanceScript* instance = player->GetInstanceScript();
if (player->IsGameMaster() || !instance)
return false;
if (instance->GetBossState(DATA_TYRANNUS) != DONE)
if (instance->GetBossState(DATA_TYRANNUS) != IN_PROGRESS && instance->GetBossState(DATA_TYRANNUS) != DONE)
if (Creature* tyrannus = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_TYRANNUS)))
{
tyrannus->AI()->DoAction(ACTION_START_INTRO);
@@ -1044,10 +1044,11 @@ public:
enum WatchCommanderLeonus
{
SAY_COVER = 0,
EVENT_LEONUS_TALK = 1,
EVENT_INFERNAL_RAIN_ATTACK = 2,
EVENT_FEAR_CONTROLLER_CAST = 3,
EVENT_ACTIVE_FALSE = 4,
EVENT_START = 1,
EVENT_LEONUS_TALK = 2,
EVENT_INFERNAL_RAIN_ATTACK = 3,
EVENT_FEAR_CONTROLLER_CAST = 4,
EVENT_ACTIVE_FALSE = 5,
NPC_INFERNAL_RAIN = 18729,
SPELL_INFERNAL_RAIN = 33814,
NPC_FEAR_CONTROLLER = 19393,
@@ -1061,9 +1062,7 @@ struct npc_watch_commander_leonus : public ScriptedAI
void Reset() override
{
_events.Reset();
_events.ScheduleEvent(EVENT_LEONUS_TALK, Minutes(2), Minutes(10));
_events.ScheduleEvent(EVENT_INFERNAL_RAIN_ATTACK, Minutes(2), Minutes(10));
_events.ScheduleEvent(EVENT_FEAR_CONTROLLER_CAST, Minutes(2), Minutes(10));
_events.ScheduleEvent(EVENT_START, Minutes(2), Minutes(10));
}
void SetData(uint32 /*type*/, uint32 data) override
@@ -1086,6 +1085,11 @@ struct npc_watch_commander_leonus : public ScriptedAI
{
switch (eventId)
{
case EVENT_START:
_events.ScheduleEvent(EVENT_LEONUS_TALK, Minutes(2), Minutes(10));
_events.ScheduleEvent(EVENT_INFERNAL_RAIN_ATTACK, Minutes(2), Minutes(10));
_events.ScheduleEvent(EVENT_FEAR_CONTROLLER_CAST, Minutes(2), Minutes(10));
break;
case EVENT_LEONUS_TALK:
Talk(SAY_COVER);
me->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
+87
View File
@@ -1953,6 +1953,92 @@ class spell_q13086_cannons_target : public SpellScriptLoader
}
};
enum ThatsAbominable
{
QUEST_THATS_ABOMINABLE = 13264,
NPC_ICY_GHOUL = 31142,
NPC_RISEN_ALLIANCE_SOLDIERS = 31205,
NPC_VICIOUS_GEIST = 31147,
NPC_RENIMATED_ABOMINATION = 31692,
SPELL_ICY_GHOUL_CREDIT = 59591, // Credit for Icy Ghoul
SPELL_VICIOUS_GEISTS_CREDIT = 60042, // Credit for Vicious Geists
SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT = 60040, // Credit for Risen Alliance Soldiers
};
class spell_q13264_thats_abominable : public SpellScriptLoader
{
public:
spell_q13264_thats_abominable() : SpellScriptLoader("spell_q13264_thats_abominable") { }
class spell_q13264_thats_abominable_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q13264_thats_abominable_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
SPELL_ICY_GHOUL_CREDIT,
SPELL_VICIOUS_GEISTS_CREDIT,
SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT,
});
}
void HandleKnockBack(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Creature* creature = GetHitCreature())
if (Unit* charmer = GetCaster()->GetCharmerOrOwner())
if (Player* player = charmer->ToPlayer())
if (player->GetQuestStatus(QUEST_THATS_ABOMINABLE) == QUEST_STATUS_INCOMPLETE)
if (GiveCreditIfValid(player, creature))
creature->KillSelf();
}
bool GiveCreditIfValid(Player* player, Creature* creature)
{
uint32 entry = creature->GetEntry();
switch(entry)
{
case NPC_ICY_GHOUL:
player->CastSpell(player, SPELL_ICY_GHOUL_CREDIT, true);
return true;
case NPC_VICIOUS_GEIST:
player->CastSpell(player, SPELL_VICIOUS_GEISTS_CREDIT, true);
return true;
case NPC_RISEN_ALLIANCE_SOLDIERS:
player->CastSpell(player, SPELL_RISEN_ALLIANCE_SOLDIERS_CREDIT, true);
return true;
}
return false;
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Creature* creature = GetCaster()->ToCreature()) {
creature->KillSelf();
creature->DespawnOrUnsummon();
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q13264_thats_abominable_SpellScript::HandleKnockBack, EFFECT_1, SPELL_EFFECT_KNOCK_BACK);
OnEffectHitTarget += SpellEffectFn(spell_q13264_thats_abominable_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q13264_thats_abominable_SpellScript();
}
};
enum BurstAtTheSeams
{
NPC_DRAKKARI_CHIEFTAINK = 29099,
@@ -2836,6 +2922,7 @@ void AddSC_quest_spell_scripts()
new spell_q12847_summon_soul_moveto_bunny();
new spell_q13011_bear_flank_master();
new spell_q13086_cannons_target();
new spell_q13264_thats_abominable();
new spell_q12690_burst_at_the_seams();
new spell_q12308_escape_from_silverbrook_summon_worgen();
new spell_q12308_escape_from_silverbrook();