From 208c5cc9040a34f193215d450cbf78702aac534e Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 18 May 2019 01:34:09 +0200 Subject: [PATCH] Scripts/BWD: improved range target check for Poison Bombs * make Poison Bombs taunt immune * added currency loot to Omnotron Defense system --- .../world/custom/custom_2019_05_18_00_world.sql | 11 +++++++++++ .../BlackwingDescent/boss_omnotron_defense_system.cpp | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 sql/updates/world/custom/custom_2019_05_18_00_world.sql diff --git a/sql/updates/world/custom/custom_2019_05_18_00_world.sql b/sql/updates/world/custom/custom_2019_05_18_00_world.sql new file mode 100644 index 0000000000..737467571a --- /dev/null +++ b/sql/updates/world/custom/custom_2019_05_18_00_world.sql @@ -0,0 +1,11 @@ +UPDATE `creature_template` SET `flags_extra`= 0x00000100 WHERE `entry` IN (42897, 49121, 49122, 49123); +UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 1 WHERE `entry` IN (42180, 49050, 49051, 49052); +UPDATE `creature_template` SET `flags_extra` = `flags_extra` | 0x00200000 WHERE `entry` IN (42180, 49050, 49051, 49052, 42178, 49053, 49054, 49055, 42179, 49047, 49048, 49040, 42166, 49056, 49057, 49058); + +-- Currency Loot +DELETE FROM `creature_onkill_reward` WHERE `creature_id` IN (42180, 49050, 49051, 49052); +INSERT INTO `creature_onkill_reward` (`creature_id`, `CurrencyId1`, `CurrencyCount1`) VALUES +(42180, 396, 3500), +(49050, 396, 3500), +(49051, 396, 3500), +(49052, 396, 3500); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp index 2fbf1a79b6..211ae9f28d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp @@ -1099,10 +1099,7 @@ class DistanceCheck bool operator()(WorldObject* object) { - if (Unit* unit = object->ToUnit()) - return !unit->IsWithinMeleeRange(_caster); - - return true; + return (object->GetExactDist2d(_caster) < 10.0f); } private: Unit* _caster;