Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-04-11 08:40:56 -06:00
committed by GitHub
51 changed files with 3015 additions and 145 deletions

View File

@@ -0,0 +1,29 @@
-- DB update 2022_04_07_01 -> 2022_04_07_02
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_01';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_01 2022_04_07_02 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649263086484187996'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649263086484187996');
UPDATE `creature_queststarter` SET `id`=14832 WHERE `quest`=7939;
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_02' WHERE sql_rev = '1649263086484187996';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,64 @@
-- DB update 2022_04_07_02 -> 2022_04_07_03
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_02';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_02 2022_04_07_03 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1648521257247923500'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648521257247923500');
-- Watcher Cutford
DELETE FROM `waypoints` WHERE `entry` = 1436 AND `pointid` in (3,4,5,6,7,8,9,10,11,12,61);
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`point_comment`) VALUES
(1436,3,-10558.387,-1141.187,30.069,0,0,'Watcher Cutford'),
(1436,4,-10559.6,-1132.51,30.067,0,0,'Watcher Cutford'),
(1436,5,-10564.762,-1124.821,30.068,0,0,'Watcher Cutford'),
(1436,6,-10574.529,-1125.063,29.168,0,0,'Watcher Cutford'),
(1436,7,-10575.464,-1121.384,30.069,0,0,'Watcher Cutford'),
(1436,8,-10575.654,-1107.854,30.07,0,0,'Watcher Cutford'),
(1436,9,-10558.476,-1105.974,30.07,0,0,'Watcher Cutford'),
(1436,10,-10555.148,-1105.574,31.429,0,0,'Watcher Cutford'),
(1436,11,-10553.534,-1105.48,31.429,0,0,'Watcher Cutford'),
(1436,12,-10552.769,-1106.959,31.429,0,0,'Watcher Cutford'),
(1436,61,-10930.378,-386.031,40.059,1.0014,1000,'Watcher Cutford');
DELETE FROM `smart_scripts` WHERE `entryorguid` = 1436 AND `source_type` = 0 and `id` = 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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(1436,0,9,0,40,0,100,0,61,1436,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1.0014,'Watcher Cutford - On Waypoint 61 Reached - Set Orientation');
-- Stitches
DELETE FROM `smart_scripts` WHERE `entryorguid` = 412 AND `source_type` = 0 and `id` in (2,3,17,44,45,46);
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(412,0,2,46,61,0,100,0,0,0,0,0,0,62,0,0,0,0,0,0,1,0,0,0,0,-10290.2,72.7811,38.8811,4.8015,'Stitches - On Respawn - Teleport'),
(412,0,3,0,1,1,100,1,5000,5000,0,0,0,53,1,412,0,0,0,2,1,0,0,0,0,0,0,0,0,'Stitches - OOC (No Repeat) - Start Waypoint (Phase 1)'), -- Bug workaround using phasing.
(412,0,17,44,40,0,100,0,91,412,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Stitches - On Waypoint 91 Reached - Stop Waypoint'),
(412,0,44,45,61,0,100,0,0,0,0,0,0,89,5,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Stitches - Linked - Start Random Movement'),
(412,0,45,0,61,0,100,0,0,0,0,0,0,22,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Stitches - Linked - Event Phase 2'),
(412,0,46,0,61,0,100,0,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,'Stitches - Linked - Event Phase 1');
DELETE FROM `waypoints` WHERE `entry` = 412 AND `pointid` in (90,91);
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`point_comment`) VALUES
(412,90,-10553.888,-1185.983,27.936,0,0,'Stitches Event'),
(412,91,-10563.188,-1177.061,28.084,4.9437,0,'Stitches Event'); -- Better end event location in front of fountain where he waits/patrols for event to end.
-- Watcher Corwin and Sarys
UPDATE creature SET `spawntimesecs` = 1200 WHERE `guid` in (6127,6133); -- Once these two die we don't need to see them again until the next Stitches event.
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_03' WHERE sql_rev = '1648521257247923500';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,30 @@
-- DB update 2022_04_07_03 -> 2022_04_07_04
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_03';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_03 2022_04_07_04 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1643928221060796100'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1643928221060796100');
UPDATE `gossip_menu` SET `TextID`=3218 WHERE `MenuID`=12726 AND `TextID`=17861;
DELETE FROM `npc_text` WHERE `ID`=17861;
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_04' WHERE sql_rev = '1643928221060796100';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,129 @@
-- DB update 2022_04_07_04 -> 2022_04_07_05
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_04';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_04 2022_04_07_05 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649126786433718200'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649126786433718200');
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14081;
DELETE FROM `smart_scripts` WHERE `entryorguid` = 14081 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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(14081, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 22391, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - On Respawn - Cast \'Serverside - Demon Portal\''),
(14081, 0, 1, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Demon Portal - On Evade - Despawn Instant');
DELETE FROM `creature_text` WHERE `CreatureID` = 14101;
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
(14101, 0, 0, '%s goes into a frenzy!', 16, 0, 100, 0, 0, 0, 1191, 0, 'Enraged Felguard - Frenzy (30% health)');
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 14101;
DELETE FROM `smart_scripts` WHERE `entryorguid` = 14101 AND `source_type` = 0 AND `id` IN (0, 1, 2, 3, 4, 5, 6);
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(14101, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 0, 11, 22393, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - On Respawn - Cast \'Enraged Felguard Spawn\''),
(14101, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 25, 45, 1, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - On Respawn - Start Attacking'),
(14101, 0, 2, 0, 9, 0, 100, 0, 0, 5, 5000, 8000, 0, 11, 15580, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - Within 0-5 Range - Cast \'Strike\''),
(14101, 0, 3, 0, 0, 0, 100, 0, 7000, 11000, 12000, 15000, 0, 11, 15548, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - In Combat - Cast \'Thunderclap\''),
(14101, 0, 4, 0, 0, 0, 100, 0, 9000, 13000, 13000, 17000, 0, 11, 16046, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - In Combat - Cast \'Blast Wave\''),
(14101, 0, 5, 6, 2, 0, 100, 1, 0, 30, 0, 0, 0, 11, 8269, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - Between 30-0% Health - Cast \'Frenzy\' (No Repeat)'),
(14101, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Enraged Felguard - Between 30-0% Health - Say Line 0 (No Repeat)');
DELETE FROM `smart_scripts` WHERE `entryorguid` = 12459 AND `source_type` = 0 AND `id` IN (0, 1, 2, 3, 4);
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`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(12459, 0, 0, 0, 0, 0, 85, 2, 5000, 5000, 5000, 7000, 0, 11, 19717, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackwing Warlock - In Combat - Cast \'Rain of Fire\' (Normal Dungeon)'),
(12459, 0, 1, 0, 0, 0, 85, 2, 6000, 6000, 3000, 7000, 0, 11, 22336, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackwing Warlock - In Combat - Cast \'Shadow Bolt\' (Normal Dungeon)'),
(12459, 0, 2, 0, 0, 0, 80, 2, 10000, 15000, 14000, 18000, 0, 11, 22372, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Blackwing Warlock - In Combat - Cast \'Demon Portal\' (Normal Dungeon)'),
(12459, 0, 3, 0, 6, 0, 100, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 11, 14081, 10, 0, 0, 0, 0, 0, 0, 'Blackwing Warlock - On Just Died - Despawn Instant'),
(12459, 0, 4, 0, 7, 0, 100, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 9, 14081, 0, 10, 1, 0, 0, 0, 0, 'Blackwing Warlock - On Evade - Despawn Instant');
UPDATE `creature` SET `spawntimesecs` = 30 WHERE `id1` = 13996 AND `unit_flags` = 64; -- this way we avoid overriding the spawntime for Vael technicians.
-- Each pack of technicians with its proper warlock.
DELETE FROM `linked_respawn` WHERE `guid` IN (84192, 84194, 84190, 84186, 84188, 84182, 84184, 84185, 84187, 84189, 84191, 84193, 84183, 84195, 84196, 84135, 84134, 84136, 84137, 84139, 84138, 84144, 84148, 84146, 84202, 84142, 84203, 84141, 84143, 84145, 84147, 84140, 84149, 84151, 84150, 84169, 84170, 84167, 84171, 84162, 84166, 84173, 84176, 84178, 84179, 84157, 84152, 84153, 84158, 84156, 84155, 84161, 84160, 84159, 84154, 84174, 84175, 84177, 84172, 84165, 84168, 84180, 84181, 84163, 84164);
INSERT INTO `linked_respawn` (`guid`, `linkedGuid`, `linkType`) VALUES
(84192,84541,0),
(84194,84541,0),
(84190,84541,0),
(84186,84542,0),
(84188,84542,0),
(84182,84546,0),
(84184,84546,0),
(84185,84546,0),
(84187,84546,0),
(84189,84546,0),
(84191,84553,0),
(84193,84553,0),
(84183,84553,0),
(84195,84553,0),
(84196,84553,0),
(84135,84560,0),
(84134,84560,0),
(84136,84560,0),
(84137,84560,0),
(84139,84560,0),
(84138,84561,0),
(84144,84561,0),
(84148,84561,0),
(84146,84561,0),
(84202,84561,0),
(84142,84598,0),
(84203,84598,0),
(84141,84598,0),
(84143,84598,0),
(84145,84598,0),
(84147,84598,0),
(84140,84598,0),
(84149,84598,0),
(84151,84599,0),
(84150,84599,0),
(84169,84653,0),
(84170,84653,0),
(84167,84653,0),
(84171,84653,0),
(84162,84653,0),
(84166,84652,0),
(84173,84652,0),
(84176,84652,0),
(84178,84652,0),
(84179,84652,0),
(84157,85757,0),
(84152,85757,0),
(84153,85757,0),
(84158,85757,0),
(84156,85757,0),
(84155,85775,0),
(84161,85775,0),
(84160,85775,0),
(84159,85775,0),
(84154,85775,0),
(84174,85581,0),
(84175,85581,0),
(84177,85581,0),
(84172,85581,0),
(84165,85581,0),
(84168,85601,0),
(84180,85601,0),
(84181,85601,0),
(84163,85601,0),
(84164,85601,0);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_05' WHERE sql_rev = '1649126786433718200';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,29 @@
-- DB update 2022_04_07_05 -> 2022_04_07_06
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_05';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_05 2022_04_07_06 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1648909090226708100'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648909090226708100');
UPDATE `creature_template` SET `speed_run` = 1.14286, `speed_walk` = 1.26 WHERE `entry` = 10981;
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_06' WHERE sql_rev = '1648909090226708100';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,321 @@
-- DB update 2022_04_07_06 -> 2022_04_07_07
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_06';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_06 2022_04_07_07 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1648965068000701761'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648965068000701761');
DELETE FROM `creature_loot_template` WHERE `Entry` = 11583;
INSERT INTO `creature_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(11583, 19002, 0, 100.0, 0, 1, 0, 1, 1),
(11583, 19003, 0, 100.0, 0, 1, 0, 1, 1),
(11583, 21138, 0, 100.0, 1, 1, 0, 1, 1),
(11583, 21142, 0, 100.0, 1, 1, 0, 1, 1),
(11583, 30044, 30044, 0.05, 0, 1, 0, 1, 1),
(11583, 30089, 30089, 1.0, 0, 1, 5, 1, 1),
(11583, 30105, 30105, 0.05, 0, 1, 0, 1, 1),
(11583, 30171, 30171, 0.05, 0, 1, 0, 1, 1),
(11583, 30172, 30172, 100.0, 0, 1, 0, 1, 1),
(11583, 30173, 30173, 100.0, 0, 1, 0, 1, 1),
(11583, 30330, 30330, 0.05, 0, 1, 0, 1, 1),
(11583, 30486, 30486, 100.0, 0, 1, 0, 1, 2),
(11583, 30487, 30487, 100.0, 0, 1, 0, 1, 1),
(11583, 30551, 30551, 100.0, 0, 1, 0, 1, 1),
(11583, 34009, 34009, 100.0, 0, 1, 0, 1, 2);
DELETE FROM `reference_loot_template` WHERE `Entry` IN (34009, 30105, 30044, 30089, 30172, 30173, 30330, 30486, 30487, 30551, 30171);
INSERT INTO `reference_loot_template`(`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`) VALUES
(34009, 16900, 0, 0, 0, 1, 1, 1, 1),
(34009, 16908, 0, 0, 0, 1, 1, 1, 1),
(34009, 16914, 0, 0, 0, 1, 1, 1, 1),
(34009, 16921, 0, 0, 0, 1, 1, 1, 1),
(34009, 16929, 0, 0, 0, 1, 1, 1, 1),
(34009, 16939, 0, 0, 0, 1, 1, 1, 1),
(34009, 16947, 0, 0, 0, 1, 1, 1, 1),
(34009, 16955, 0, 0, 0, 1, 1, 1, 1),
(34009, 16963, 0, 0, 0, 1, 1, 1, 1),
(30044, 2564, 0, 0.0, 0, 1, 1, 1,1),
(30044, 7734, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13009, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13030, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13046, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13065, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13066, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13085, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13125, 0, 0.0, 0, 1, 1, 1,1),
(30044, 13139, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10135, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10143, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10151, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10157, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10158, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10246, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10252, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10254, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10262, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10264, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10266, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10271, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10273, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10367, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10384, 0, 0.0, 0, 1, 1, 1,1),
(30089, 10389, 0, 0.0, 0, 1, 1, 1,1),
(30089, 11980, 0, 0.0, 0, 1, 1, 1,1),
(30089, 12017, 0, 0.0, 0, 1, 1, 1,1),
(30089, 12048, 0, 0.0, 0, 1, 1, 1,1),
(30089, 12058, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14328, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14332, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14336, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14456, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14464, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14680, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14811, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14812, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14975, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14979, 0, 0.0, 0, 1, 1, 1,1),
(30089, 14982, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15221, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15240, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15247, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15258, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15283, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15289, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15439, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15442, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15680, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15684, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15687, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15941, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15942, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15968, 0, 0.0, 0, 1, 1, 1,1),
(30089, 15989, 0, 0.0, 0, 1, 1, 1,1),
(30171, 1203, 0, 0.0, 0, 1, 1, 1,1),
(30171, 1973, 0, 0.0, 0, 1, 1, 1,1),
(30171, 2564, 0, 0.0, 0, 1, 1, 1,1),
(30171, 4696, 0, 0.0, 0, 1, 1, 1,1),
(30171, 5266, 0, 0.0, 0, 1, 1, 1,1),
(30171, 5267, 0, 0.0, 0, 1, 1, 1,1),
(30171, 6622, 0, 0.0, 0, 1, 1, 1,1),
(30171, 7734, 0, 0.0, 0, 1, 1, 1,1),
(30171, 7976, 0, 0.0, 0, 1, 1, 1,1),
(30171, 7991, 0, 0.0, 0, 1, 1, 1,1),
(30171, 8028, 0, 0.0, 0, 1, 1, 1,1),
(30171, 9402, 0, 0.0, 0, 1, 1, 1,1),
(30171, 10605, 0, 0.0, 0, 1, 1, 1,1),
(30171, 10608, 0, 0.0, 0, 1, 1, 1,1),
(30171, 11302, 0, 0.0, 0, 1, 1, 1,1),
(30171, 12698, 0, 0.0, 0, 1, 1, 1,1),
(30171, 12711, 0, 0.0, 0, 1, 1, 1,1),
(30171, 12717, 0, 0.0, 0, 1, 1, 1,1),
(30171, 12720, 0, 0.0, 0, 1, 1, 1,1),
(30171, 12728, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13000, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13001, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13002, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13003, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13004, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13006, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13007, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13008, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13009, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13013, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13015, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13030, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13036, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13040, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13047, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13053, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13060, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13066, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13067, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13070, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13072, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13073, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13075, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13077, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13083, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13085, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13091, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13096, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13107, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13111, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13113, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13116, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13118, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13120, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13123, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13125, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13126, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13130, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13133, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13135, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13144, 0, 0.0, 0, 1, 1, 1,1),
(30171, 13146, 0, 0.0, 0, 1, 1, 1,1),
(30171, 14501, 0, 0.0, 0, 1, 1, 1,1),
(30171, 14509, 0, 0.0, 0, 1, 1, 1,1),
(30171, 14511, 0, 0.0, 0, 1, 1, 1,1),
(30171, 17413, 0, 0.0, 0, 1, 1, 1,1),
(30171, 17414, 0, 0.0, 0, 1, 1, 1,1),
(30171, 17682, 0, 0.0, 0, 1, 1, 1,1),
(30171, 17683, 0, 0.0, 0, 1, 1, 1,1),
(30171, 18600, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22388, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22389, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22390, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22393, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22890, 0, 0.0, 0, 1, 1, 1,1),
(30171, 22891, 0, 0.0, 0, 1, 1, 1,1),
(30172, 9297, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10246, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10247, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10248, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10249, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10250, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10251, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10252, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10253, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10254, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10255, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10256, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10257, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10258, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10259, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10260, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10261, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10262, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10263, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10264, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10265, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10266, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10267, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10268, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10269, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10270, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10272, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10273, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10274, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10367, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10384, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10385, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10386, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10387, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10388, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10389, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10390, 0, 0.0, 0, 1, 1, 1,1),
(30172, 10391, 0, 0.0, 0, 1, 1, 1,1),
(30172, 11224, 0, 0.0, 0, 1, 1, 1,1),
(30172, 11226, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12017, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12048, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12682, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12683, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12684, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12685, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12689, 0, 0.0, 0, 1, 1, 1,1),
(30172, 12702, 0, 0.0, 0, 1, 1, 1,1),
(30172, 13486, 0, 0.0, 0, 1, 1, 1,1),
(30172, 13487, 0, 0.0, 0, 1, 1, 1,1),
(30172, 13488, 0, 0.0, 0, 1, 1, 1,1),
(30172, 13489, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14328, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14329, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14330, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14331, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14332, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14333, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14334, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14335, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14336, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14337, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14975, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14976, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14977, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14978, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14979, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14980, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14981, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14982, 0, 0.0, 0, 1, 1, 1,1),
(30172, 14983, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15221, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15229, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15240, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15247, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15258, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15267, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15273, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15278, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15283, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15289, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15325, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15434, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15435, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15436, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15437, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15438, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15439, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15440, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15441, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15442, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15678, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15679, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15680, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15681, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15682, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15683, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15684, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15685, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15686, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15687, 0, 0.0, 0, 1, 1, 1,1),
(30172, 15942, 0, 0.0, 0, 1, 1, 1,1),
(30172, 16044, 0, 0.0, 0, 1, 1, 1,1),
(30172, 16055, 0, 0.0, 0, 1, 1, 1,1),
(30172, 16253, 0, 0.0, 0, 1, 1, 1,1),
(30173, 17962, 0, 0.0, 0, 1, 1, 1,1),
(30173, 17963, 0, 0.0, 0, 1, 1, 1,1),
(30173, 17964, 0, 0.0, 0, 1, 1, 1,1),
(30173, 17965, 0, 0.0, 0, 1, 1, 1,1),
(30173, 17969, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16897, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16905, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16916, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16923, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16931, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16942, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16950, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16958, 0, 0.0, 0, 1, 1, 1,1),
(30486, 16966, 0, 0.0, 0, 1, 1, 1,1),
(30487, 19360, 0, 10.0,0, 1, 1, 1,1),
(30487, 19363, 0, 10.0,0, 1, 1, 1,1),
(30487, 19375, 0, 0.0, 0, 1, 1, 1,1),
(30487, 19376, 0, 0.0, 0, 1, 1, 1,1),
(30487, 19377, 0, 0.0, 0, 1, 1, 1,1),
(30487, 19378, 0, 0.0, 0, 1, 1, 1,1),
(30551, 19356, 0, 10.0,0, 1, 1, 1,1),
(30551, 19364, 0, 10.0,0, 1, 1, 1,1),
(30551, 19379, 0, 0.0, 0, 1, 1, 1,1),
(30551, 19380, 0, 0.0, 0, 1, 1, 1,1),
(30551, 19381, 0, 0.0, 0, 1, 1, 1,1),
(30551, 19382, 0, 0.0, 0, 1, 1, 1,1),
(30330, 30171, 30171, 100.0, 0, 1, 0, 1, 1),
(30105, 30044, 30044, 100.0, 0, 1, 0, 1 ,1);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_07' WHERE sql_rev = '1648965068000701761';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,29 @@
-- DB update 2022_04_07_07 -> 2022_04_07_08
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_07';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_07 2022_04_07_08 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649122676928024300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649122676928024300');
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|256 WHERE `entry` = 14020;
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_08' WHERE sql_rev = '1649122676928024300';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,31 @@
-- DB update 2022_04_07_08 -> 2022_04_07_09
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_08';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_08 2022_04_07_09 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1648996451912542300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1648996451912542300');
DELETE FROM `spell_script_names` WHERE `spell_id`=22247;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(22247,'spell_suppression_aura');
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_09' WHERE sql_rev = '1648996451912542300';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,32 @@
-- DB update 2022_04_07_09 -> 2022_04_07_10
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_09';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_09 2022_04_07_10 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649181854899342300'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649181854899342300');
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_utgarde_pinnacle_beast_mark';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(48876,'spell_utgarde_pinnacle_beast_mark'),
(59237,'spell_utgarde_pinnacle_beast_mark');
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_07_10' WHERE sql_rev = '1649181854899342300';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,43 @@
-- DB update 2022_04_07_10 -> 2022_04_09_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_07_10';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_07_10 2022_04_09_00 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1644428839091658700'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1644428839091658700');
DELETE FROM `spell_script_names` WHERE `spell_id` = 23134 AND `ScriptName` = 'spell_item_goblin_bomb';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(23134,'spell_item_goblin_bomb');
UPDATE `creature_template` SET `minlevel` = 45, `maxlevel` = 45, `AIName` = 'SmartAI' WHERE `entry` = 8937;
UPDATE `spell_dbc` SET `Name_Lang_enUS` = 'Quiet Suicide' WHERE `Id` = 3617;
DELETE FROM `creature_template_addon` WHERE `entry` = 8937;
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(8937, 0, 0, 0, 1, 0, 0, '13260 8327');
DELETE FROM `smart_scripts` WHERE `entryorguid` = 8937 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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
/* Despawn time is different if killed by explosion, assumedly handled by dummy effect */
(8937,0,0,0,8,0,100,0,13259,0,0,0,0,41,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pet Bomb - On Spellhit 'Explosion' - Delayed Despawn");
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_09_00' WHERE sql_rev = '1644428839091658700';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,29 @@
-- DB update 2022_04_09_00 -> 2022_04_11_00
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_09_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_09_00 2022_04_11_00 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649660925472546752'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649660925472546752');
-- Vaelastrasz should be immune to interrupts
UPDATE `creature_template` SET `mechanic_immune_mask` = 650854239 WHERE (`entry` = 13020);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_11_00' WHERE sql_rev = '1649660925472546752';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -0,0 +1,29 @@
-- DB update 2022_04_11_00 -> 2022_04_11_01
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_11_00';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_11_00 2022_04_11_01 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649663437340205577'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649663437340205577');
-- Broodlord Lashlayer should not be disarmable
UPDATE `creature_template` SET `mechanic_immune_mask` = 617299807 WHERE (`entry` = 12017);
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_11_01' WHERE sql_rev = '1649663437340205577';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,33 @@
-- DB update 2022_04_11_02 -> 2022_04_11_03
DROP PROCEDURE IF EXISTS `updateDb`;
DELIMITER //
CREATE PROCEDURE updateDb ()
proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';
SELECT COUNT(*) INTO @COLEXISTS
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_world' AND COLUMN_NAME = '2022_04_11_02';
IF @COLEXISTS = 0 THEN LEAVE proc; END IF;
START TRANSACTION;
ALTER TABLE version_db_world CHANGE COLUMN 2022_04_11_02 2022_04_11_03 bit;
SELECT sql_rev INTO OK FROM version_db_world WHERE sql_rev = '1649370784577886400'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;
--
-- START UPDATING QUERIES
--
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1649370784577886400');
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 23414 AND `spell_effect` IN (-1856, -1857, -26889);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(23414, -1856, 2, 'Nefarian Rogue class call - Vanish'),
(23414, -1857, 2, 'Nefarian Rogue class call - Vanish'),
(23414, -26889, 2, 'Nefarian Rogue class call - Vanish');
--
-- END UPDATING QUERIES
--
UPDATE version_db_world SET date = '2022_04_11_03' WHERE sql_rev = '1649370784577886400';
COMMIT;
END //
DELIMITER ;
CALL updateDb();
DROP PROCEDURE IF EXISTS `updateDb`;

View File

@@ -19,6 +19,7 @@
#include "BoundingIntervalHierarchyWrapper.h"
#include "GameObjectModel.h"
#include "MapTree.h"
#include "ModelIgnoreFlags.h"
#include "ModelInstance.h"
#include "RegularGrid.h"
#include "Timer.h"
@@ -145,25 +146,33 @@ void DynamicMapTree::update(uint32 t_diff)
struct DynamicTreeIntersectionCallback
{
bool did_hit;
uint32 phase_mask;
DynamicTreeIntersectionCallback(uint32 phasemask) : did_hit(false), phase_mask(phasemask) { }
DynamicTreeIntersectionCallback(uint32 phasemask, VMAP::ModelIgnoreFlags ignoreFlags) :
_didHit(false), _phaseMask(phasemask), _ignoreFlags(ignoreFlags) { }
bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance, bool stopAtFirstHit)
{
bool result = obj.intersectRay(r, distance, stopAtFirstHit, phase_mask);
bool result = obj.intersectRay(r, distance, stopAtFirstHit, _phaseMask, _ignoreFlags);
if (result)
{
did_hit = result;
_didHit = result;
}
return result;
}
bool didHit() const { return did_hit;}
[[nodiscard]] bool didHit() const
{
return _didHit;
}
private:
bool _didHit;
uint32 _phaseMask;
VMAP::ModelIgnoreFlags _ignoreFlags;
};
struct DynamicTreeAreaInfoCallback
{
DynamicTreeAreaInfoCallback(uint32 phaseMask)
: _phaseMask(phaseMask) {}
DynamicTreeAreaInfoCallback(uint32 phaseMask) : _phaseMask(phaseMask) { }
void operator()(G3D::Vector3 const& p, GameObjectModel const& obj)
{
@@ -176,7 +185,7 @@ struct DynamicTreeAreaInfoCallback
}
private:
uint32 _phaseMask;
uint32 _phaseMask;
VMAP::AreaInfo _areaInfo;
};
@@ -206,11 +215,10 @@ private:
GameObjectModel const* _hitModel;
};
bool DynamicMapTree::GetIntersectionTime(const uint32 phasemask, const G3D::Ray& ray,
const G3D::Vector3& endPos, float& maxDist) const
bool DynamicMapTree::GetIntersectionTime(const uint32 phasemask, const G3D::Ray& ray, const G3D::Vector3& endPos, float& maxDist) const
{
float distance = maxDist;
DynamicTreeIntersectionCallback callback(phasemask);
DynamicTreeIntersectionCallback callback(phasemask, VMAP::ModelIgnoreFlags::Nothing);
impl->intersectRay(ray, callback, distance, endPos, false);
if (callback.didHit())
{
@@ -265,7 +273,7 @@ bool DynamicMapTree::GetObjectHitPos(const uint32 phasemask, const G3D::Vector3&
return result;
}
bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const
bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, VMAP::ModelIgnoreFlags ignoreFlags) const
{
G3D::Vector3 v1(x1, y1, z1), v2(x2, y2, z2);
@@ -277,17 +285,17 @@ bool DynamicMapTree::isInLineOfSight(float x1, float y1, float z1, float x2, flo
}
G3D::Ray r(v1, (v2 - v1) / maxDist);
DynamicTreeIntersectionCallback callback(phasemask);
DynamicTreeIntersectionCallback callback(phasemask, ignoreFlags);
impl->intersectRay(r, callback, maxDist, v2, true);
return !callback.did_hit;
return !callback.didHit();
}
float DynamicMapTree::getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const
{
G3D::Vector3 v(x, y, z);
G3D::Ray r(v, G3D::Vector3(0, 0, -1));
DynamicTreeIntersectionCallback callback(phasemask);
DynamicTreeIntersectionCallback callback(phasemask, VMAP::ModelIgnoreFlags::Nothing);
impl->intersectZAllignedRay(r, callback, maxSearchDist);
if (callback.didHit())

View File

@@ -29,6 +29,7 @@ namespace G3D
namespace VMAP
{
struct AreaAndLiquidData;
enum class ModelIgnoreFlags : uint32;
}
class GameObjectModel;
@@ -42,11 +43,9 @@ public:
DynamicMapTree();
~DynamicMapTree();
[[nodiscard]] bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2,
float z2, uint32 phasemask) const;
[[nodiscard]] bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, VMAP::ModelIgnoreFlags ignoreFlags) const;
bool GetIntersectionTime(uint32 phasemask, const G3D::Ray& ray,
const G3D::Vector3& endPos, float& maxDist) const;
bool GetIntersectionTime(uint32 phasemask, const G3D::Ray& ray, const G3D::Vector3& endPos, float& maxDist) const;
bool GetAreaInfo(float x, float y, float& z, uint32 phasemask, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;
void GetAreaAndLiquidData(float x, float y, float z, uint32 phasemask, uint8 reqLiquidType, VMAP::AreaAndLiquidData& data) const;

View File

@@ -19,6 +19,7 @@
#define _IVMAPMANAGER_H
#include "Define.h"
#include "ModelIgnoreFlags.h"
#include "Optional.h"
#include <string>
@@ -91,7 +92,7 @@ namespace VMAP
virtual void unloadMap(unsigned int pMapId, int x, int y) = 0;
virtual void unloadMap(unsigned int pMapId) = 0;
virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2) = 0;
virtual bool isInLineOfSight(unsigned int pMapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) = 0;
virtual float getHeight(unsigned int pMapId, float x, float y, float z, float maxSearchDist) = 0;
/**
test if we hit an object. return true if we hit one. rx, ry, rz will hold the hit position or the dest position, if no intersection was found

View File

@@ -171,7 +171,7 @@ namespace VMAP
}
}
bool VMapMgr2::isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2)
bool VMapMgr2::isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags)
{
#if defined(ENABLE_VMAP_CHECKS)
if (!isLineOfSightCalcEnabled() || IsVMAPDisabledForPtr(mapId, VMAP_DISABLE_LOS))
@@ -187,7 +187,7 @@ namespace VMAP
Vector3 pos2 = convertPositionToInternalRep(x2, y2, z2);
if (pos1 != pos2)
{
return instanceTree->second->isInLineOfSight(pos1, pos2);
return instanceTree->second->isInLineOfSight(pos1, pos2, ignoreFlags);
}
}
@@ -337,7 +337,7 @@ namespace VMAP
}
}
WorldModel* VMapMgr2::acquireModelInstance(const std::string& basepath, const std::string& filename)
WorldModel* VMapMgr2::acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags/* Only used when creating the model */)
{
//! Critical section, thread safe access to iLoadedModelFiles
std::lock_guard<std::mutex> lock(LoadedModelFilesLock);
@@ -353,6 +353,9 @@ namespace VMAP
return nullptr;
}
LOG_DEBUG("maps", "VMapMgr2: loading file '{}{}'", basepath, filename);
worldmodel->Flags = flags;
model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first;
model->second.setModel(worldmodel);
}

View File

@@ -107,7 +107,7 @@ namespace VMAP
void unloadMap(unsigned int mapId, int x, int y) override;
void unloadMap(unsigned int mapId) override;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2) override ;
bool isInLineOfSight(unsigned int mapId, float x1, float y1, float z1, float x2, float y2, float z2, ModelIgnoreFlags ignoreFlags) override ;
/**
fill the hit pos and return true, if an object was hit
*/
@@ -120,7 +120,7 @@ namespace VMAP
bool GetLiquidLevel(uint32 pMapId, float x, float y, float z, uint8 reqLiquidType, float& level, float& floor, uint32& type, uint32& mogpFlags) const override;
void GetAreaAndLiquidData(uint32 mapId, float x, float y, float z, uint8 reqLiquidType, AreaAndLiquidData& data) const override;
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename);
WorldModel* acquireModelInstance(const std::string& basepath, const std::string& filename, uint32 flags);
void releaseModelInstance(const std::string& filename);
// what's the use of this? o.O

View File

@@ -34,10 +34,10 @@ namespace VMAP
class MapRayCallback
{
public:
MapRayCallback(ModelInstance* val): prims(val), hit(false) {}
MapRayCallback(ModelInstance* val, ModelIgnoreFlags ignoreFlags): prims(val), flags(ignoreFlags), hit(false) { }
bool operator()(const G3D::Ray& ray, uint32 entry, float& distance, bool StopAtFirstHit)
{
bool result = prims[entry].intersectRay(ray, distance, StopAtFirstHit);
bool result = prims[entry].intersectRay(ray, distance, StopAtFirstHit, flags);
if (result)
{
hit = true;
@@ -47,6 +47,7 @@ namespace VMAP
bool didHit() { return hit; }
protected:
ModelInstance* prims;
ModelIgnoreFlags flags;
bool hit;
};
@@ -143,10 +144,10 @@ namespace VMAP
Else, pMaxDist is not modified and returns false;
*/
bool StaticMapTree::GetIntersectionTime(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit) const
bool StaticMapTree::GetIntersectionTime(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
{
float distance = pMaxDist;
MapRayCallback intersectionCallBack(iTreeValues);
MapRayCallback intersectionCallBack(iTreeValues, ignoreFlags);
iTree.intersectRay(pRay, intersectionCallBack, distance, StopAtFirstHit);
if (intersectionCallBack.didHit())
{
@@ -156,7 +157,7 @@ namespace VMAP
}
//=========================================================
bool StaticMapTree::isInLineOfSight(const Vector3& pos1, const Vector3& pos2) const
bool StaticMapTree::isInLineOfSight(const Vector3& pos1, const Vector3& pos2, ModelIgnoreFlags ignoreFlags) const
{
float maxDist = (pos2 - pos1).magnitude();
// return false if distance is over max float, in case of cheater teleporting to the end of the universe
@@ -175,7 +176,7 @@ namespace VMAP
// direction with length of 1
G3D::Ray ray = G3D::Ray::fromOriginAndDirection(pos1, (pos2 - pos1) / maxDist);
if (GetIntersectionTime(ray, maxDist, true))
if (GetIntersectionTime(ray, maxDist, true, ignoreFlags))
{
return false;
@@ -204,7 +205,7 @@ namespace VMAP
Vector3 dir = (pPos2 - pPos1) / maxDist; // direction with length of 1
G3D::Ray ray(pPos1, dir);
float dist = maxDist;
if (GetIntersectionTime(ray, dist, false))
if (GetIntersectionTime(ray, dist, false, ModelIgnoreFlags::Nothing))
{
pResultHitPos = pPos1 + dir * dist;
if (pModifyDist < 0)
@@ -240,7 +241,7 @@ namespace VMAP
Vector3 dir = Vector3(0, 0, -1);
G3D::Ray ray(pPos, dir); // direction with length of 1
float maxDist = maxSearchDist;
if (GetIntersectionTime(ray, maxDist, false))
if (GetIntersectionTime(ray, maxDist, false, ModelIgnoreFlags::Nothing))
{
height = pPos.z - maxDist;
}
@@ -328,7 +329,7 @@ namespace VMAP
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
//VMAP_DEBUG_LOG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading {}", spawn.name);
if (model)
{
@@ -404,7 +405,7 @@ namespace VMAP
if (result)
{
// acquire model instance
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name);
WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags);
if (!model)
{
LOG_ERROR("maps", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [{}, {}]", tileX, tileY);

View File

@@ -27,6 +27,7 @@ namespace VMAP
class ModelInstance;
class GroupModel;
class VMapMgr2;
enum class ModelIgnoreFlags : uint32;
enum class LoadResult : uint8;
struct LocationInfo
@@ -58,7 +59,7 @@ namespace VMAP
std::string iBasePath;
private:
bool GetIntersectionTime(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit) const;
bool GetIntersectionTime(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
//bool containsLoadedMapTile(unsigned int pTileIdent) const { return(iLoadedMapTiles.containsKey(pTileIdent)); }
public:
static std::string getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY);
@@ -69,7 +70,7 @@ namespace VMAP
StaticMapTree(uint32 mapID, const std::string& basePath);
~StaticMapTree();
[[nodiscard]] bool isInLineOfSight(const G3D::Vector3& pos1, const G3D::Vector3& pos2) const;
[[nodiscard]] bool isInLineOfSight(const G3D::Vector3& pos1, const G3D::Vector3& pos2, ModelIgnoreFlags ignoreFlags) const;
bool GetObjectHitPos(const G3D::Vector3& pos1, const G3D::Vector3& pos2, G3D::Vector3& pResultHitPos, float pModifyDist) const;
[[nodiscard]] float getHeight(const G3D::Vector3& pPos, float maxSearchDist) const;
bool GetAreaInfo(G3D::Vector3& pos, uint32& flags, int32& adtId, int32& rootId, int32& groupId) const;

View File

@@ -18,6 +18,7 @@
#include "GameObjectModel.h"
#include "Log.h"
#include "MapTree.h"
#include "ModelInstance.h"
#include "Timer.h"
#include "VMapDefinitions.h"
#include "VMapFactory.h"
@@ -123,7 +124,8 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model
return false;
}
iModel = VMAP::VMapFactory::createOrGetVMapMgr()->acquireModelInstance(dataPath + "vmaps/", it->second.name);
iModel = VMAP::VMapFactory::createOrGetVMapMgr()->acquireModelInstance(dataPath + "vmaps/", it->second.name,
it->second.isWmo ? VMAP::ModelFlags::MOD_WORLDSPAWN : VMAP::ModelFlags::MOD_M2);
if (!iModel)
{
@@ -174,7 +176,7 @@ GameObjectModel* GameObjectModel::Create(std::unique_ptr<GameObjectModelOwnerBas
return mdl;
}
bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const
bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask, VMAP::ModelIgnoreFlags ignoreFlags) const
{
if (!(phasemask & ph_mask) || !owner->IsSpawned())
{
@@ -191,7 +193,7 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto
Vector3 p = iInvRot * (ray.origin() - iPos) * iInvScale;
Ray modRay(p, iInvRot * ray.direction());
float distance = MaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit);
bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit, ignoreFlags);
if (hit)
{
distance *= iScale;

View File

@@ -29,6 +29,7 @@ namespace VMAP
class WorldModel;
struct AreaInfo;
struct LocationInfo;
enum class ModelIgnoreFlags : uint32;
}
class GameObject;
@@ -68,7 +69,7 @@ public:
[[nodiscard]] bool isEnabled() const { return phasemask != 0; }
[[nodiscard]] bool IsMapObject() const { return isWmo; }
bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const;
bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask, VMAP::ModelIgnoreFlags ignoreFlags) const;
void IntersectPoint(G3D::Vector3 const& point, VMAP::AreaInfo& info, uint32 ph_mask) const;
bool GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationInfo& info, uint32 ph_mask) const;
bool GetLiquidLevel(G3D::Vector3 const& point, VMAP::LocationInfo& info, float& liqHeight) const;

View File

@@ -0,0 +1,37 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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/>.
*/
#ifndef ModelIgnoreFlags_h__
#define ModelIgnoreFlags_h__
#include "Define.h"
namespace VMAP
{
enum class ModelIgnoreFlags : uint32
{
Nothing = 0x00,
M2 = 0x01
};
inline ModelIgnoreFlags operator&(ModelIgnoreFlags left, ModelIgnoreFlags right)
{
return ModelIgnoreFlags(uint32(left) & uint32(right));
}
}
#endif // ModelIgnoreFlags_h__

View File

@@ -30,7 +30,7 @@ namespace VMAP
iInvScale = 1.f / iScale;
}
bool ModelInstance::intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit) const
bool ModelInstance::intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
{
if (!iModel)
{
@@ -54,7 +54,7 @@ namespace VMAP
Vector3 p = iInvRot * (pRay.origin() - iPos) * iInvScale;
Ray modRay(p, iInvRot * pRay.direction());
float distance = pMaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit);
bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit, ignoreFlags);
if (hit)
{
distance *= iScale;

View File

@@ -29,6 +29,7 @@ namespace VMAP
class WorldModel;
struct AreaInfo;
struct LocationInfo;
enum class ModelIgnoreFlags : uint32;
enum ModelFlags
{
@@ -64,7 +65,7 @@ namespace VMAP
ModelInstance() { }
ModelInstance(const ModelSpawn& spawn, WorldModel* model);
void setUnloaded() { iModel = nullptr; }
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit) const;
bool intersectRay(const G3D::Ray& pRay, float& pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
void intersectPoint(const G3D::Vector3& p, AreaInfo& info) const;
bool GetLocationInfo(const G3D::Vector3& p, LocationInfo& info) const;
bool GetLiquidLevel(const G3D::Vector3& p, LocationInfo& info, float& liqHeight) const;

View File

@@ -17,6 +17,7 @@
#include "WorldModel.h"
#include "MapTree.h"
#include "ModelIgnoreFlags.h"
#include "ModelInstance.h"
#include "VMapDefinitions.h"
@@ -485,8 +486,18 @@ namespace VMAP
bool hit;
};
bool WorldModel::IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit) const
bool WorldModel::IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
{
// If the caller asked us to ignore certain objects we should check flags
if ((ignoreFlags & ModelIgnoreFlags::M2) != ModelIgnoreFlags::Nothing)
{
// M2 models are not taken into account for LoS calculation if caller requested their ignoring.
if (Flags & MOD_M2)
{
return false;
}
}
// small M2 workaround, maybe better make separate class with virtual intersection funcs
// in any case, there's no need to use a bound tree if we only have one submodel
if (groupModels.size() == 1)

View File

@@ -30,6 +30,7 @@ namespace VMAP
class TreeNode;
struct AreaInfo;
struct LocationInfo;
enum class ModelIgnoreFlags : uint32;
class MeshTriangle
{
@@ -108,12 +109,13 @@ namespace VMAP
//! pass group models to WorldModel and create BIH. Passed vector is swapped with old geometry!
void setGroupModels(std::vector<GroupModel>& models);
void setRootWmoID(uint32 id) { RootWMOID = id; }
bool IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit) const;
bool IntersectRay(const G3D::Ray& ray, float& distance, bool stopAtFirstHit, ModelIgnoreFlags ignoreFlags) const;
bool IntersectPoint(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, AreaInfo& info) const;
bool GetLocationInfo(const G3D::Vector3& p, const G3D::Vector3& down, float& dist, LocationInfo& info) const;
bool writeFile(const std::string& filename);
bool readFile(const std::string& filename);
void GetGroupModels(std::vector<GroupModel>& outGroupModels);
uint32 Flags;
protected:
uint32 RootWMOID{0};
std::vector<GroupModel> groupModels;

View File

@@ -647,6 +647,25 @@ struct GameObjectTemplate
{
return IsForQuests;
}
[[nodiscard]] bool IsIgnoringLOSChecks() const
{
switch (type)
{
case GAMEOBJECT_TYPE_BUTTON:
return button.losOK == 0;
case GAMEOBJECT_TYPE_QUESTGIVER:
return questgiver.losOK == 0;
case GAMEOBJECT_TYPE_CHEST:
return chest.losOK == 0;
case GAMEOBJECT_TYPE_GOOBER:
return goober.losOK == 0;
case GAMEOBJECT_TYPE_FLAGSTAND:
return flagstand.losOK == 0;
default:
return false;
}
}
};
// From `gameobject_template_addon`

View File

@@ -1320,7 +1320,7 @@ bool WorldObject::IsWithinDistInMap(WorldObject const* obj, float dist2compare,
return obj && IsInMap(obj) && InSamePhase(obj) && _IsWithinDist(obj, dist2compare, is3D, useBoundingRadius);
}
bool WorldObject::IsWithinLOS(float ox, float oy, float oz, LineOfSightChecks checks) const
bool WorldObject::IsWithinLOS(float ox, float oy, float oz, VMAP::ModelIgnoreFlags ignoreFlags, LineOfSightChecks checks) const
{
if (IsInWorld())
{
@@ -1336,12 +1336,12 @@ bool WorldObject::IsWithinLOS(float ox, float oy, float oz, LineOfSightChecks ch
GetHitSpherePointFor({ ox, oy, oz }, x, y, z);
}
return GetMap()->isInLineOfSight(x, y, z, ox, oy, oz, GetPhaseMask(), checks);
return GetMap()->isInLineOfSight(x, y, z, ox, oy, oz, GetPhaseMask(), checks, ignoreFlags);
}
return true;
}
bool WorldObject::IsWithinLOSInMap(WorldObject const* obj, LineOfSightChecks checks) const
bool WorldObject::IsWithinLOSInMap(WorldObject const* obj, VMAP::ModelIgnoreFlags ignoreFlags, LineOfSightChecks checks) const
{
if (!IsInMap(obj))
return false;
@@ -1364,7 +1364,7 @@ bool WorldObject::IsWithinLOSInMap(WorldObject const* obj, LineOfSightChecks che
else
GetHitSpherePointFor({ obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ() + obj->GetCollisionHeight() }, x, y, z);
return GetMap()->isInLineOfSight(x, y, z, ox, oy, oz, GetPhaseMask(), checks);
return GetMap()->isInLineOfSight(x, y, z, ox, oy, oz, GetPhaseMask(), checks, ignoreFlags);
}
void WorldObject::GetHitSpherePointFor(Position const& dest, float& x, float& y, float& z) const

View File

@@ -24,6 +24,7 @@
#include "GridDefines.h"
#include "GridReference.h"
#include "Map.h"
#include "ModelIgnoreFlags.h"
#include "ObjectDefines.h"
#include "ObjectGuid.h"
#include "Optional.h"
@@ -455,8 +456,8 @@ public:
// use only if you will sure about placing both object at same map
bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
bool IsWithinDistInMap(WorldObject const* obj, float dist2compare, bool is3D = true, bool useBoundingRadius = true) const;
[[nodiscard]] bool IsWithinLOS(float x, float y, float z, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
bool IsWithinLOSInMap(WorldObject const* obj, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
[[nodiscard]] bool IsWithinLOS(float x, float y, float z, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
[[nodiscard]] bool IsWithinLOSInMap(WorldObject const* obj, VMAP::ModelIgnoreFlags ignoreFlags = VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks = LINEOFSIGHT_ALL_CHECKS) const;
[[nodiscard]] Position GetHitSpherePointFor(Position const& dest) const;
void GetHitSpherePointFor(Position const& dest, float& x, float& y, float& z) const;
bool GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D = true) const;

View File

@@ -1693,8 +1693,7 @@ void Player::UpdateTriggerVisibility()
// units (values dependent on GM state)
if (!creature || (!creature->IsTrigger() &&
!creature->HasAuraType(SPELL_AURA_TRANSFORM) &&
!creature->HasFlag(UNIT_FIELD_FLAGS,
UNIT_FLAG_NOT_SELECTABLE)))
!creature->HasUnitFlag(UNIT_FLAG_NOT_SELECTABLE)))
continue;
creature->SetFieldNotifyFlag(UF_FLAG_PUBLIC);

View File

@@ -1871,7 +1871,7 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed)
}
}
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgTemplate, BattlegroundQueueTypeId /*bgQueueTypeId*/, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot)
GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot)
{
// check if this group is LFG group
if (isLFGGroup())
@@ -1944,6 +1944,12 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
if (!member->HasFreeBattlegroundQueueId())
return ERR_BATTLEGROUND_TOO_MANY_QUEUES;
// don't let join if someone from the group is already in that bg queue
if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeId))
{
return ERR_BATTLEGROUND_JOIN_FAILED;
}
// don't let join if someone from the group is in bg queue random
if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeIdRandom))
return ERR_IN_RANDOM_BG;

View File

@@ -211,46 +211,65 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
else
{
Group* grp = _player->GetGroup();
// no group or not a leader
if (!grp || grp->GetLeaderGUID() != _player->GetGUID())
return;
if (_player->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeIdRandom)) // queued for random bg, so can't queue for anything else
err = ERR_IN_RANDOM_BG;
else if (_player->InBattlegroundQueue() && bgTypeId == BATTLEGROUND_RB) // already in queue, so can't queue for random
err = ERR_IN_NON_RANDOM_BG;
else if (_player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_2v2) ||
_player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_3v3) ||
_player->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_5v5)) // can't be already queued for arenas
err = ERR_BATTLEGROUND_QUEUED_FOR_RATED;
grp->DoForAllMembers([&err, bgQueueTypeId, bgQueueTypeIdRandom, bgTypeId](Player* member)
{
if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeIdRandom)) // queued for random bg, so can't queue for anything else
{
err = ERR_IN_RANDOM_BG;
}
else if (member->InBattlegroundQueue() && bgTypeId == BATTLEGROUND_RB) // already in queue, so can't queue for random
{
err = ERR_IN_NON_RANDOM_BG;
}
else if (member->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_2v2) ||
member->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_3v3) ||
member->InBattlegroundQueueForBattlegroundQueueType(BATTLEGROUND_QUEUE_5v5)) // can't be already queued for arenas
{
err = ERR_BATTLEGROUND_QUEUED_FOR_RATED;
}
else if (member->InBattlegroundQueueForBattlegroundQueueType(bgQueueTypeId)) // queued for this bg
{
err = ERR_BATTLEGROUND_NONE;
}
if (err > 0)
err = grp->CanJoinBattlegroundQueue(bg, bgQueueTypeId, 0, bg->GetMaxPlayersPerTeam(), false, 0);
if (err < 0)
{
return;
}
});
if (err <= 0)
{
grp->DoForAllMembers([err](Player* member)
{
WorldPacket data;
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
});
return;
}
ASSERT(err > 0);
err = grp->CanJoinBattlegroundQueue(bg, bgQueueTypeId, 0, bg->GetMaxPlayersPerTeam(), false, 0);
isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam() && bgTypeId != BATTLEGROUND_RB);
uint32 avgWaitTime = 0;
if (err > 0)
{
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
avgWaitTime = bgQueue.GetAverageQueueWaitTime(ginfo);
}
GroupQueueInfo* ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
avgWaitTime = bgQueue.GetAverageQueueWaitTime(ginfo);
grp->DoForAllMembers([bg, err, bgQueueTypeId, avgWaitTime](Player* member)
{
WorldPacket data;
if (err <= 0)
{
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
return;
}
uint32 queueSlot = member->AddBattlegroundQueueId(bgQueueTypeId);
// send status packet
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgWaitTime, 0, 0, TEAM_NEUTRAL);
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, member->AddBattlegroundQueueId(bgQueueTypeId), STATUS_WAIT_QUEUE, avgWaitTime, 0, 0, TEAM_NEUTRAL);
member->GetSession()->SendPacket(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);

View File

@@ -2023,7 +2023,7 @@ Transport* Map::GetTransportForPos(uint32 phase, float x, float y, float z, Worl
if ((*itr)->IsInWorld() && (*itr)->GetExactDistSq(x, y, z) < 75.0f * 75.0f && (*itr)->m_model)
{
float dist = 30.0f;
bool hit = (*itr)->m_model->intersectRay(r, dist, false, phase);
bool hit = (*itr)->m_model->intersectRay(r, dist, false, phase, VMAP::ModelIgnoreFlags::Nothing);
if (hit)
return *itr;
}
@@ -2033,7 +2033,7 @@ Transport* Map::GetTransportForPos(uint32 phase, float x, float y, float z, Worl
if (staticTrans->m_model)
{
float dist = 10.0f;
bool hit = staticTrans->m_model->intersectRay(r, dist, false, phase);
bool hit = staticTrans->m_model->intersectRay(r, dist, false, phase, VMAP::ModelIgnoreFlags::Nothing);
if (hit)
if (GetHeight(phase, x, y, z, true, 30.0f) < (v.z - dist + 1.0f))
return staticTrans->ToTransport();
@@ -2440,14 +2440,27 @@ float Map::GetWaterLevel(float x, float y) const
return 0;
}
bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks) const
bool Map::isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const
{
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2))
if ((checks & LINEOFSIGHT_CHECK_VMAP) && !VMAP::VMapFactory::createOrGetVMapMgr()->isInLineOfSight(GetId(), x1, y1, z1, x2, y2, z2, ignoreFlags))
{
return false;
}
if (sWorld->getBoolConfig(CONFIG_CHECK_GOBJECT_LOS) && (checks & LINEOFSIGHT_CHECK_GOBJECT_ALL))
{
ignoreFlags = VMAP::ModelIgnoreFlags::Nothing;
if (!(checks & LINEOFSIGHT_CHECK_GOBJECT_M2))
{
ignoreFlags = VMAP::ModelIgnoreFlags::M2;
}
if (!_dynamicTree.isInLineOfSight(x1, y1, z1, x2, y2, z2, phasemask, ignoreFlags))
{
return false;
}
}
if (sWorld->getBoolConfig(CONFIG_CHECK_GOBJECT_LOS) && (checks & LINEOFSIGHT_CHECK_GOBJECT)
&& !_dynamicTree.isInLineOfSight(x1, y1, z1, x2, y2, z2, phasemask))
return false;
return true;
}

View File

@@ -63,6 +63,11 @@ class PathGenerator;
enum WeatherState : uint32;
namespace VMAP
{
enum class ModelIgnoreFlags : uint32;
}
namespace Acore
{
struct ObjectUpdater;
@@ -183,10 +188,13 @@ struct PositionFullTerrainStatus
enum LineOfSightChecks
{
LINEOFSIGHT_CHECK_VMAP = 0x1, // check static floor layout data
LINEOFSIGHT_CHECK_GOBJECT = 0x2, // check dynamic game object data
LINEOFSIGHT_CHECK_VMAP = 0x1, // check static floor layout data
LINEOFSIGHT_CHECK_GOBJECT_WMO = 0x2, // check dynamic game object data (wmo models)
LINEOFSIGHT_CHECK_GOBJECT_M2 = 0x4, // check dynamic game object data (m2 models)
LINEOFSIGHT_ALL_CHECKS = (LINEOFSIGHT_CHECK_VMAP | LINEOFSIGHT_CHECK_GOBJECT)
LINEOFSIGHT_CHECK_GOBJECT_ALL = LINEOFSIGHT_CHECK_GOBJECT_WMO | LINEOFSIGHT_CHECK_GOBJECT_M2,
LINEOFSIGHT_ALL_CHECKS = LINEOFSIGHT_CHECK_VMAP | LINEOFSIGHT_CHECK_GOBJECT_ALL
};
class GridMap
@@ -539,7 +547,7 @@ public:
float GetWaterOrGroundLevel(uint32 phasemask, float x, float y, float z, float* ground = nullptr, bool swim = false, float collisionHeight = DEFAULT_COLLISION_HEIGHT) const;
[[nodiscard]] float GetHeight(uint32 phasemask, float x, float y, float z, bool vmap = true, float maxSearchDist = DEFAULT_HEIGHT_SEARCH) const;
[[nodiscard]] bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks) const;
[[nodiscard]] bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask, LineOfSightChecks checks, VMAP::ModelIgnoreFlags ignoreFlags) const;
bool CanReachPositionAndGetValidCoords(WorldObject const* source, PathGenerator *path, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
bool CanReachPositionAndGetValidCoords(WorldObject const* source, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;
bool CanReachPositionAndGetValidCoords(WorldObject const* source, float startX, float startY, float startZ, float &destX, float &destY, float &destZ, bool failOnCollision = true, bool failOnSlopes = true) const;

View File

@@ -1052,12 +1052,10 @@ void PathGenerator::ShortenPathUntilDist(G3D::Vector3 const& target, float dist)
// check if the shortened path is still in LoS with the target and it is walkable
_source->GetHitSpherePointFor({ _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z + collisionHeight }, x, y, z);
if (!_source->GetMap()->isInLineOfSight(x, y, z, _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z + collisionHeight, _source->GetPhaseMask(), LINEOFSIGHT_ALL_CHECKS)
|| (canCheckSlope
&& !IsSwimmableSegment(_source->GetPositionX(), _source->GetPositionY(), _source->GetPositionZ(), _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z)
&& !IsWalkableClimb(_source->GetPositionX(), _source->GetPositionY(), _source->GetPositionZ(), _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z)
)
)
if (!_source->GetMap()->isInLineOfSight(x, y, z, _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z + collisionHeight,
_source->GetPhaseMask(), LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags::Nothing) || (canCheckSlope &&
!IsSwimmableSegment(_source->GetPositionX(), _source->GetPositionY(), _source->GetPositionZ(), _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z) &&
!IsWalkableClimb(_source->GetPositionX(), _source->GetPositionY(), _source->GetPositionZ(), _pathPoints[i - 1].x, _pathPoints[i - 1].y, _pathPoints[i - 1].z)))
{
// whenver we find a point that is not valid anymore, simply use last valid path
_pathPoints.resize(i + 1);

View File

@@ -165,7 +165,8 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
return;
}
if (!map->isInLineOfSight((*itr).x, (*itr).y, (*itr).z + 2.f, (*itrNext).x, (*itrNext).y, (*itrNext).z + 2.f, creature->GetPhaseMask(), LINEOFSIGHT_ALL_CHECKS))
if (!map->isInLineOfSight((*itr).x, (*itr).y, (*itr).z + 2.f, (*itrNext).x, (*itrNext).y, (*itrNext).z + 2.f, creature->GetPhaseMask(),
LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags::Nothing))
{
_validPointsVector[_currentPoint].erase(randomIter);
_preComputedPaths.erase(pathIdx);

View File

@@ -2049,7 +2049,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
if (Unit* unit = (*itr)->ToUnit())
{
uint32 deficit = unit->GetMaxHealth() - unit->GetHealth();
if ((deficit > maxHPDeficit || foundItr == tempTargets.end()) && target->IsWithinDist(unit, jumpRadius) && target->IsWithinLOSInMap(unit, LINEOFSIGHT_ALL_CHECKS))
if ((deficit > maxHPDeficit || foundItr == tempTargets.end()) && target->IsWithinDist(unit, jumpRadius) && target->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::M2))
{
foundItr = itr;
maxHPDeficit = deficit;
@@ -2064,10 +2064,10 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
{
if (foundItr == tempTargets.end())
{
if ((!isBouncingFar || target->IsWithinDist(*itr, jumpRadius)) && target->IsWithinLOSInMap(*itr, LINEOFSIGHT_ALL_CHECKS))
if ((!isBouncingFar || target->IsWithinDist(*itr, jumpRadius)) && target->IsWithinLOSInMap(*itr, VMAP::ModelIgnoreFlags::M2))
foundItr = itr;
}
else if (target->GetDistanceOrder(*itr, *foundItr) && target->IsWithinLOSInMap(*itr, LINEOFSIGHT_ALL_CHECKS))
else if (target->GetDistanceOrder(*itr, *foundItr) && target->IsWithinLOSInMap(*itr, VMAP::ModelIgnoreFlags::M2))
foundItr = itr;
}
}
@@ -5617,9 +5617,38 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_spellInfo->HasAttribute(SPELL_ATTR0_CU_REQ_TARGET_FACING_CASTER) && !target->HasInArc(static_cast<float>(M_PI), m_caster))
return SPELL_FAILED_NOT_INFRONT;
if (m_caster->GetEntry() != WORLD_TRIGGER) // Ignore LOS for gameobjects casts (wrongly casted by a trigger)
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT) && !m_caster->IsWithinLOSInMap(target, LINEOFSIGHT_ALL_CHECKS) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) &&
!m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
{
WorldObject* losCenter = nullptr;
uint32 losChecks = LINEOFSIGHT_ALL_CHECKS;
if (m_originalCasterGUID.IsGameObject())
{
losCenter = m_caster->GetMap()->GetGameObject(m_originalCasterGUID);
}
else if (m_caster->GetEntry() == WORLD_TRIGGER)
{
if (TempSummon* tempSummon = m_caster->ToTempSummon())
{
losCenter = tempSummon->GetSummonerGameObject();
}
}
if (losCenter)
{
// If spell casted by gameobject then ignore M2 models
losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2;
}
else
{
losCenter = m_caster;
}
if (!losCenter->IsWithinLOSInMap(target, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks(losChecks)))
{
return SPELL_FAILED_LINE_OF_SIGHT;
}
}
}
}
@@ -5629,8 +5658,38 @@ SpellCastResult Spell::CheckCast(bool strict)
float x, y, z;
m_targets.GetDstPos()->GetPosition(x, y, z);
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) && !m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT) && !m_caster->IsWithinLOS(x, y, z, LINEOFSIGHT_ALL_CHECKS))
return SPELL_FAILED_LINE_OF_SIGHT;
if ((!m_caster->IsTotem() || !m_spellInfo->IsPositive()) && !m_spellInfo->HasAttribute(SPELL_ATTR2_IGNORE_LINE_OF_SIGHT) &&
!m_spellInfo->HasAttribute(SPELL_ATTR5_ALWAYS_AOE_LINE_OF_SIGHT))
{
WorldObject* losCenter = nullptr;
uint32 losChecks = LINEOFSIGHT_ALL_CHECKS;
if (m_originalCasterGUID.IsGameObject())
{
losCenter = m_caster->GetMap()->GetGameObject(m_originalCasterGUID);
}
else if (m_caster->GetEntry() == WORLD_TRIGGER)
{
if (TempSummon* tempSummon = m_caster->ToTempSummon())
{
losCenter = tempSummon->GetSummonerGameObject();
}
}
if (losCenter)
{
// If spell casted by gameobject then ignore M2 models
losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2;
}
else
{
losCenter = m_caster;
}
if (!losCenter->IsWithinLOS(x, y, z, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks((losChecks))))
{
return SPELL_FAILED_LINE_OF_SIGHT;
}
}
}
// check pet presence
@@ -7626,7 +7685,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
{
case SPELL_EFFECT_RESURRECT_NEW:
// player far away, maybe his corpse near?
if (target != m_caster && !target->IsWithinLOSInMap(m_caster, LINEOFSIGHT_ALL_CHECKS))
if (target != m_caster && !target->IsWithinLOSInMap(m_caster))
{
if (!m_targets.GetCorpseTargetGUID())
return false;
@@ -7638,7 +7697,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
if (target->GetGUID() != corpse->GetOwnerGUID())
return false;
if (!corpse->IsWithinLOSInMap(m_caster, LINEOFSIGHT_ALL_CHECKS) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
if (!corpse->IsWithinLOSInMap(m_caster) && !(m_spellFlags & SPELL_FLAG_REDIRECTED))
return false;
}
break;
@@ -7646,7 +7705,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
{
if (!m_targets.GetCorpseTargetGUID())
{
if (target->IsWithinLOSInMap(m_caster, LINEOFSIGHT_ALL_CHECKS) && target->HasUnitFlag(UNIT_FLAG_SKINNABLE))
if (target->IsWithinLOSInMap(m_caster, VMAP::ModelIgnoreFlags::M2) && target->HasUnitFlag(UNIT_FLAG_SKINNABLE))
return true;
return false;
@@ -7662,7 +7721,7 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
if (!corpse->HasFlag(CORPSE_FIELD_FLAGS, CORPSE_FLAG_LOOTABLE))
return false;
if (!corpse->IsWithinLOSInMap(m_caster, LINEOFSIGHT_ALL_CHECKS))
if (!corpse->IsWithinLOSInMap(m_caster, VMAP::ModelIgnoreFlags::M2))
return false;
}
break;
@@ -7676,14 +7735,40 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
if (target->ToPlayer()->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL))
return false;
break;
default: // normal case
// Get GO cast coordinates if original caster -> GO
WorldObject* caster = nullptr;
default: // normal case
{
uint32 losChecks = LINEOFSIGHT_ALL_CHECKS;
GameObject* gobCaster = nullptr;
if (m_originalCasterGUID.IsGameObject())
caster = m_caster->GetMap()->GetGameObject(m_originalCasterGUID);
if (!caster)
{
gobCaster = m_caster->GetMap()->GetGameObject(m_originalCasterGUID);
}
else if (m_caster->GetEntry() == WORLD_TRIGGER)
{
if (TempSummon* tempSummon = m_caster->ToTempSummon())
{
gobCaster = tempSummon->GetSummonerGameObject();
}
}
WorldObject* caster = nullptr;
if (gobCaster)
{
if (gobCaster->GetGOInfo()->IsIgnoringLOSChecks())
{
return true;
}
caster = gobCaster;
// If spell casted by gameobject then ignore M2 models
losChecks &= ~LINEOFSIGHT_CHECK_GOBJECT_M2;
}
else
{
caster = m_caster;
}
if (target != m_caster)
{
if (m_targets.HasDst())
@@ -7692,13 +7777,18 @@ bool Spell::CheckEffectTarget(Unit const* target, uint32 eff) const
float y = m_targets.GetDstPos()->GetPositionY();
float z = m_targets.GetDstPos()->GetPositionZ();
if (!target->IsWithinLOS(x, y, z, LINEOFSIGHT_ALL_CHECKS))
if (!target->IsWithinLOS(x, y, z, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks(losChecks)))
{
return false;
}
}
else if (!target->IsWithinLOSInMap(caster, LINEOFSIGHT_ALL_CHECKS))
else if (!target->IsWithinLOSInMap(caster, VMAP::ModelIgnoreFlags::M2, LineOfSightChecks(losChecks)))
{
return false;
}
}
break;
}
}
return true;

View File

@@ -4160,14 +4160,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards
});
// Shadowbolt Volley
ApplySpellFix({ 22665 }, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(152); // 150 yards
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(41); // 150 yards
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
ApplySpellFix({ 22247 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesCu |= SPELL_ATTR0_CU_DONT_BREAK_STEALTH;
@@ -4229,12 +4221,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx |= SPELL_ATTR1_EXCLUDE_CASTER;
});
// Suppression Aura
ApplySpellFix({ 22247 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
// Cosmetic - Lightning Beam Channel
ApplySpellFix({ 45537 }, [](SpellInfo* spellInfo)
{

View File

@@ -1000,8 +1000,8 @@ public:
{
Player* player = handler->GetSession()->GetPlayer();
handler->PSendSysMessage("Checking LoS %s -> %s:", player->GetName().c_str(), unit->GetName().c_str());
handler->PSendSysMessage(" VMAP LoS: %s", player->IsWithinLOSInMap(unit, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
handler->PSendSysMessage(" GObj LoS: %s", player->IsWithinLOSInMap(unit, LINEOFSIGHT_CHECK_GOBJECT) ? "clear" : "obstructed");
handler->PSendSysMessage(" VMAP LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_VMAP) ? "clear" : "obstructed");
handler->PSendSysMessage(" GObj LoS: %s", player->IsWithinLOSInMap(unit, VMAP::ModelIgnoreFlags::Nothing, LINEOFSIGHT_CHECK_GOBJECT_ALL) ? "clear" : "obstructed");
handler->PSendSysMessage("%s is %sin line of sight of %s.", unit->GetName().c_str(), (player->IsWithinLOSInMap(unit) ? "" : "not "), player->GetName().c_str());
return true;
}

View File

@@ -21,6 +21,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "blackwing_lair.h"
#include "SpellScript.h"
enum Say
{
@@ -247,8 +248,28 @@ class go_suppression_device : public GameObjectScript
}
};
class spell_suppression_aura : public SpellScript
{
PrepareSpellScript(spell_suppression_aura);
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if([&](WorldObject* target) -> bool
{
Unit* unit = target->ToUnit();
return !unit || unit->HasAuraType(SPELL_AURA_MOD_STEALTH);
});
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_suppression_aura::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
void AddSC_boss_broodlord()
{
new boss_broodlord();
new go_suppression_device();
RegisterSpellScript(spell_suppression_aura);
}

View File

@@ -256,7 +256,7 @@ public:
me->SetVisible(true);
me->SetPhaseMask(1, true);
me->ReplaceAllNpcFlags(NPCFlags(1));
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->SetFaction(FACTION_FRIENDLY);
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
me->RemoveAura(SPELL_NEFARIANS_BARRIER);
@@ -284,6 +284,7 @@ public:
if (action == ACTION_KILLED)
{
summons.DespawnEntry(NPC_BONE_CONSTRUCT);
Unit::Kill(me, me);
}
}
@@ -472,7 +473,7 @@ public:
Talk(SAY_GAMESBEGIN_1);
events.ScheduleEvent(EVENT_START_EVENT, 4000);
me->SetFaction(FACTION_DRAGONFLIGHT_BLACK);
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
me->SetStandState(UNIT_STAND_STATE_STAND);
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
// Due to Nefarius despawning himself on Vael, we need to update the guid on instance to prevent unwanted behaviours as encounter not resetting at all.

View File

@@ -306,6 +306,7 @@ public:
razorgore->AI()->DoAction(TALK_EGG_BROKEN_RAND);
egg->SetLootState(GO_READY);
egg->UseDoorOrButton(10000);
egg->SetRespawnTime(WEEK);
}
}
}

View File

@@ -310,6 +310,8 @@ public:
break;
case SPECIAL:
if (EggEvent == NOT_STARTED)
SetData(DATA_EGG_EVENT, IN_PROGRESS);
if (++EggCount >= EggList.size())
{
if (Creature* razor = instance->GetCreature(razorgoreGUID))
@@ -321,8 +323,6 @@ public:
_events.ScheduleEvent(EVENT_RAZOR_PHASE_TWO, 1000);
_events.CancelEvent(EVENT_RAZOR_SPAWN);
}
if (EggEvent == NOT_STARTED)
SetData(DATA_EGG_EVENT, IN_PROGRESS);
break;
}
}
@@ -400,6 +400,7 @@ public:
summon->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
summon->SetReactState(REACT_PASSIVE);
summon->SetStandState(UNIT_STAND_STATE_DEAD);
summon->SetHomePosition(summon->GetPosition());
if (Creature* nefarius = instance->GetCreature(victorNefariusGUID))
{
@@ -447,7 +448,7 @@ public:
}
}
_events.ScheduleEvent(EVENT_RAZOR_SPAWN, 12000, 17000);
_events.ScheduleEvent(EVENT_RAZOR_SPAWN, 15000);
}
break;
case EVENT_RAZOR_PHASE_TWO:

View File

@@ -1763,7 +1763,9 @@ public:
{
float destX = summoner->GetPositionX() + cos(angle + a * M_PI) * i * 10.0f;
float destY = summoner->GetPositionY() + std::sin(angle + a * M_PI) * i * 10.0f;
if (summoner->GetMap()->isInLineOfSight(summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ() + 10.0f, destX, destY, summoner->GetPositionZ() + 10.0f, summoner->GetPhaseMask(), LINEOFSIGHT_ALL_CHECKS) && destX > 4585.0f && destY > 2716.0f && destY < 2822.0f)
if (summoner->GetMap()->isInLineOfSight(summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ() + 10.0f, destX, destY,
summoner->GetPositionZ() + 10.0f, summoner->GetPhaseMask(), LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags::Nothing) &&
destX > 4585.0f && destY > 2716.0f && destY < 2822.0f)
{
float destZ = summoner->GetMapHeight(summoner->GetPhaseMask(), destX, destY, summoner->GetPositionZ());
if (std::fabs(destZ - summoner->GetPositionZ()) < 10.0f) // valid z found

View File

@@ -1285,7 +1285,7 @@ public:
float ox, oy, oz;
_caster->GetPosition(ox, oy, oz);
DynamicMapTree const& dTree = unit->GetMap()->GetDynamicMapTree();
return !dTree.isInLineOfSight(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ() + 2.f, ox, oy, oz + 2.f, unit->GetPhaseMask());
return !dTree.isInLineOfSight(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ() + 2.f, ox, oy, oz + 2.f, unit->GetPhaseMask(), VMAP::ModelIgnoreFlags::Nothing);
}
private:

View File

@@ -125,7 +125,8 @@ public:
void MoveInLineOfSight(Unit* who) override
{
if (!activated && who->GetTypeId() == TYPEID_PLAYER)
if (me->GetExactDist2d(who) <= 25.0f && me->GetMap()->isInLineOfSight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 5.0f, who->GetPositionX(), who->GetPositionY(), who->GetPositionZ() + 5.0f, 2, LINEOFSIGHT_ALL_CHECKS))
if (me->GetExactDist2d(who) <= 25.0f && me->GetMap()->isInLineOfSight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 5.0f,
who->GetPositionX(), who->GetPositionY(), who->GetPositionZ() + 5.0f, 2, LINEOFSIGHT_ALL_CHECKS, VMAP::ModelIgnoreFlags::Nothing))
{
activated = true;
me->RemoveAura(64615);

View File

@@ -0,0 +1,74 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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 "ScriptMgr.h"
#include "SpellInfo.h"
#include "SpellScript.h"
#include "Unit.h"
#include "utgarde_pinnacle.h"
enum UtgardeSpells
{
SPELL_BEAST_MARK_NORMAL = 48876,
SPELL_BEAST_MARK_DAMAGE_N = 48877,
SPELL_BEAST_MARK_DAMAGE_H = 59233
};
// 48876 - Beast's Mark
// 59237 - Beast's Mark
class spell_utgarde_pinnacle_beast_mark : public AuraScript
{
PrepareAuraScript(spell_utgarde_pinnacle_beast_mark);
bool Validate(SpellInfo const* /*spell*/) override
{
return ValidateSpellInfo({ SPELL_BEAST_MARK_DAMAGE_N, SPELL_BEAST_MARK_DAMAGE_H });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
if (DamageInfo* damageInfo = eventInfo.GetDamageInfo())
{
Unit* attacker = damageInfo->GetAttacker();
if (!attacker || !damageInfo->GetDamage())
return false;
return attacker->GetCreatureType() == CREATURE_TYPE_BEAST;
}
return false;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
Unit* target = GetTarget();
uint32 spellId = (m_scriptSpellId == SPELL_BEAST_MARK_NORMAL) ? SPELL_BEAST_MARK_DAMAGE_N : SPELL_BEAST_MARK_DAMAGE_H;
target->CastSpell(target, spellId, aurEff);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_utgarde_pinnacle_beast_mark::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_utgarde_pinnacle_beast_mark::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_utgarde_pinnacle()
{
RegisterSpellScript(spell_utgarde_pinnacle_beast_mark);
}

View File

@@ -111,6 +111,7 @@ void AddSC_boss_palehoof();
void AddSC_boss_skadi();
void AddSC_boss_ymiron();
void AddSC_instance_utgarde_pinnacle();
void AddSC_utgarde_pinnacle();
void AddSC_utgarde_keep();
void AddSC_boss_archavon(); //Vault of Archavon
void AddSC_boss_emalon();
@@ -276,6 +277,7 @@ void AddNorthrendScripts()
AddSC_boss_skadi();
AddSC_boss_ymiron();
AddSC_instance_utgarde_pinnacle();
AddSC_utgarde_pinnacle();
AddSC_utgarde_keep();
AddSC_boss_archavon(); //Vault of Archavon
AddSC_boss_emalon();

View File

@@ -3493,7 +3493,8 @@ class spell_item_eggnog : public SpellScript
enum GoblinBomb
{
SPELL_SUMMON_GOBLIN_BOMB = 13258,
SPELL_SUMMON_GOBLIN_BOMB = 13258,
SPELL_MALFUNCTION_EXPLOSION = 13261
};
// 23134 - Goblin Bomb
@@ -3503,14 +3504,14 @@ class spell_item_goblin_bomb : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SUMMON_GOBLIN_BOMB });
return ValidateSpellInfo({ SPELL_SUMMON_GOBLIN_BOMB, SPELL_MALFUNCTION_EXPLOSION });
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* caster = GetCaster())
{
caster->CastSpell(caster, SPELL_SUMMON_GOBLIN_BOMB, true, GetCastItem());
caster->CastSpell(caster, roll_chance_i(95) ? SPELL_SUMMON_GOBLIN_BOMB : SPELL_MALFUNCTION_EXPLOSION, true, GetCastItem());
}
}