From a0e50ea35fca61447bf07fc45d93c98234ba59f7 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 14 Sep 2014 16:14:12 +0200 Subject: Core/Entities: Use ObjectGuid class in game project --- sql/base/characters_database.sql | 16 ++++++++-------- .../characters/2014_09_13_00_characters_groups.sql | 9 +++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 sql/updates/characters/2014_09_13_00_characters_groups.sql (limited to 'sql') diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index 6e3ab43e4ac..f3e013529fc 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1621,14 +1621,14 @@ CREATE TABLE `groups` ( `lootMethod` tinyint(3) unsigned NOT NULL, `looterGuid` int(10) unsigned NOT NULL, `lootThreshold` tinyint(3) unsigned NOT NULL, - `icon1` int(10) unsigned NOT NULL, - `icon2` int(10) unsigned NOT NULL, - `icon3` int(10) unsigned NOT NULL, - `icon4` int(10) unsigned NOT NULL, - `icon5` int(10) unsigned NOT NULL, - `icon6` int(10) unsigned NOT NULL, - `icon7` int(10) unsigned NOT NULL, - `icon8` int(10) unsigned NOT NULL, + `icon1` bigint(20) unsigned NOT NULL, + `icon2` bigint(20) unsigned NOT NULL, + `icon3` bigint(20) unsigned NOT NULL, + `icon4` bigint(20) unsigned NOT NULL, + `icon5` bigint(20) unsigned NOT NULL, + `icon6` bigint(20) unsigned NOT NULL, + `icon7` bigint(20) unsigned NOT NULL, + `icon8` bigint(20) unsigned NOT NULL, `groupType` tinyint(3) unsigned NOT NULL, `difficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', `raiddifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0', diff --git a/sql/updates/characters/2014_09_13_00_characters_groups.sql b/sql/updates/characters/2014_09_13_00_characters_groups.sql new file mode 100644 index 00000000000..b1dc9855249 --- /dev/null +++ b/sql/updates/characters/2014_09_13_00_characters_groups.sql @@ -0,0 +1,9 @@ +ALTER TABLE `groups` + MODIFY `icon1` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon2` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon3` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon4` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon5` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon6` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon7` BIGINT(20) UNSIGNED NOT NULL, + MODIFY `icon8` BIGINT(20) UNSIGNED NOT NULL; -- cgit v1.2.3 From 2a262aad21f7f9205a49769fd39c207c7ff59768 Mon Sep 17 00:00:00 2001 From: Nyeriah Date: Tue, 16 Sep 2014 17:49:16 -0300 Subject: Scripts/Quest: Script spell for quest "Fumping" Updates https://github.com/TrinityCore/TrinityCore/issues/11418 --- .../2014_09_16_02_world_spell_script_names.sql | 4 ++ src/server/scripts/Spells/spell_quest.cpp | 47 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 sql/updates/world/2014_09_16_02_world_spell_script_names.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_16_02_world_spell_script_names.sql b/sql/updates/world/2014_09_16_02_world_spell_script_names.sql new file mode 100644 index 00000000000..de211bdc88d --- /dev/null +++ b/sql/updates/world/2014_09_16_02_world_spell_script_names.sql @@ -0,0 +1,4 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 39238; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(39238, 'spell_q10929_fumping'); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 00ce2cb280e..9c65567fe7f 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2348,6 +2348,52 @@ class spell_q14100_q14111_make_player_destroy_totems : public SpellScriptLoader } }; +enum Fumping +{ + SPELL_SUMMON_SAND_GNOME = 39240, + SPELL_SUMMON_BONE_SLICER = 39241 +}; + +// 39238 - Fumping +class spell_q10929_fumping : SpellScriptLoader +{ + public: + spell_q10929_fumping() : SpellScriptLoader("spell_q10929_fumping") { } + + class spell_q10929_fumpingAuraScript : public AuraScript + { + PrepareAuraScript(spell_q10929_fumpingAuraScript); + + bool Validate(SpellInfo const* /*spell*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_SAND_GNOME)) + return false; + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_BONE_SLICER)) + return false; + return true; + } + + void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* caster = GetCaster()) + caster->CastSpell(caster, urand(SPELL_SUMMON_SAND_GNOME, SPELL_SUMMON_BONE_SLICER), true); + } + + void Register() override + { + OnEffectRemove += AuraEffectRemoveFn(spell_q10929_fumpingAuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_q10929_fumpingAuraScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -2405,4 +2451,5 @@ void AddSC_quest_spell_scripts() new spell_q12919_gymers_throw(); new spell_q13400_illidan_kill_master(); new spell_q14100_q14111_make_player_destroy_totems(); + new spell_q10929_fumping(); } -- cgit v1.2.3 From 86f9b1d3e24f38c6056d35908e49a06d340fdaae Mon Sep 17 00:00:00 2001 From: Dr-J Date: Wed, 17 Sep 2014 21:31:42 +0100 Subject: DB/Quest: Matis the Cruel Script this quest, * One line is not proper text and thus no broadcast text id, the proper text is same line but with $n instead of npc name but on tc this gets filled by player name which for this text is not the right behaviour * Know Matis gets up again after been captured, same happens on retail did not mean to replicate that bug but managed too. --- sql/updates/world/2014_09_17_00_world_misc.sql | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sql/updates/world/2014_09_17_00_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_17_00_world_misc.sql b/sql/updates/world/2014_09_17_00_world_misc.sql new file mode 100644 index 00000000000..8dcb69c263d --- /dev/null +++ b/sql/updates/world/2014_09_17_00_world_misc.sql @@ -0,0 +1,101 @@ +DELETE FROM `creature_text` WHERE `entry` IN(17843,17875,17853,17664); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(17843, 0, 0, 'I want all of your trackers out in search of the criminal, Matis the Cruel. I have given trusted agents of the Hand flare guns. Should you or one of your trackers see the flare, it means that an agent has found Matis and needs assistance. And remember, tracker, Matis is to be brought back to me alive.', 12, 7, 100, 1, 0, 0, 'Vindicator Kuros',14454), +(17875, 0, 0, 'I am at your service, my lord.', 12, 7, 100, 0, 0, 0, 'Hunter of the Hand',14453), +(17875, 1, 0, 'It will be done, my lord.', 12, 7, 100, 1, 0, 0, 'Hunter of the Hand',14455), +(17875, 2, 0, '%s calls forth their bretheren.', 16, 7, 100, 22, 0, 0, 'Hunter of the Hand',14456), +(17875, 3, 0, 'Brothers and sisters, tonight we hunt! A blood elf known as Matis must be brought to justice! The first to find him gets one week''s vacation aboard the Exodar!', 12, 7, 100, 1, 0, 0, 'Hunter of the Hand',14457), +(17875, 4, 0, 'Onward! The wilds of Bloodmyst await!', 12, 7, 100, 1, 0, 0, 'Hunter of the Hand',14458), +(17853, 0, 0, 'We''ve got you now, Matis the Cruel!', 12, 0, 100, 0, 0, 0, 'Tracker of the Hand',0), -- 14446 but tc fills $n with player name rather than npc name +(17853, 1, 0, 'Return to Kuros. I will bring him to Blood Watch.', 12, 7, 100, 0, 0, 0, 'Tracker of the Hand',14445), +(17664, 0, 0, 'You will regret this, maggot.', 12, 0, 100, 0, 0, 0, 'Matis the Cruel',14449), +(17664, 1, 0, '%s falls unconscious.', 16, 0, 100, 0, 0, 0, 'Matis the Cruel',14444); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`IN(17843,17875,17853,17664); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN(17843,17875,17853,17664) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(1784300,1785300,1787500) 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 +(17843, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - On Spawn - Set Phase 1'), +(17843, 0, 1, 0, 19, 1, 100, 0, 9711, 0, 0, 0, 80, 1784300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - On Quest Accept (Matis the Cruel) - Run Script (Phase 1)'), + +(17875, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 53, 0, 17875, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Start WP'), +(17875, 0, 1, 2, 40, 0, 100, 0, 7, 17875, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 17843, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Reached WP7 - Set Orientation'), +(17875, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Reached WP7 - Set Bytes 1'), +(17875, 0, 3, 4, 38, 0, 100, 0, 2, 2, 0, 0, 29, 10, 0, 0, 0, 0, 0, 19, 17843, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Start Closest path'), +(17875, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 1787500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Run Script'), +(17875, 0, 5, 6, 38, 0, 100, 0, 3, 3, 0, 0, 91, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Remove Bytes 1'), +(17875, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 5, 15, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Play emote OneShotRoar'), +(17875, 0, 7, 0, 61, 0, 100, 0, 0, 0, 0, 0, 53, 1, 1787500, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Data Set - Start WP (Path 06)'), +(17875, 0, 8, 0, 40, 0, 100, 0, 9, 1787500, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - On Reached WP9 (Path 06) - Despawn'), + +(17853, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 17664, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Just Summoned - Face Matis the Cruel'), +(17853, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Just Summoned - Say Line 1'), +(17853, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Just Summoned - Set Aggresive'), +(17853, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Just Summoned - Set Data to Matis the Cruel'), +(17853, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Just Summoned - Set Phase 2'), +(17853, 0, 5, 0, 38, 2, 100, 0, 1, 1, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 17664, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Data Set 1 1 (Phase 2) - Set Data 2 2 on Matis the Cruel'), +(17853, 0, 6, 0, 38, 0, 100, 0, 2, 2, 0, 0, 80, 1785300, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - On Data Set 2 2 - Run Script'), + +(17664, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 17853, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Face Tracker of the Hand'), +(17664, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Say Line 1'), +(17664, 0, 2, 12, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 19, 17853, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Attack Tracker of the hand'), +(17664, 0, 3, 0, 9, 0, 100, 0, 5, 30, 0, 0, 11, 6660, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Range - Cast Shoot'), +(17664, 0, 4, 0, 2, 0, 100, 1, 25, 50, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 17853, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Between 25 - 50% HP - Set Data on Tracker of the Hand'), +(17664, 0, 5, 6, 38, 0, 100, 0, 2, 2, 0, 0, 90, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Set Bytes 1'), +(17664, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Disable Combat Movement'), +(17664, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Disable Auto Attack'), +(17664, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Say Line 2'), +(17664, 0, 9, 10, 61, 0, 100, 0, 25, 50, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 17853, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Set Data 2 2 Tracker of the Hand'), +(17664, 0, 10, 11, 61, 0, 100, 0, 0, 0, 0, 0, 11, 31336, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Cast Matis Captured DND'), +(17664, 0, 11, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 15000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Despawn After 15 Seconds'), +(17664, 0, 12, 0, 61, 0, 100, 0, 0, 0, 0, 0, 18, 768, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Matis the Cruel - On Data Set - Set Invincibility HP'), + +(1787500, 9, 0, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 90, 8, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Hunter of the Hand - Script - Set Bytes 1'), +(1785300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - Script - Evade'), +(1785300, 9, 1, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Tracker of the Hand - Script - Say Line 2'), +(1785300, 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, 'Tracker of the Hand - Script - Despawn'), + + +(1784300, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Set Phase 2'), +(1784300, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 12, 17875, 1, 90000, 0, 0, 0, 8, 0, 0, 0, -1968.402, -11914.17, 51.70642, 1.356192, 'Vindicator Kuros - Script - Summon Hunter of the Hand'), +(1784300, 9, 2, 0, 0, 0, 100, 0, 500, 500, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Set Data on Hunter of the Hand'), +(1784300, 9, 3, 0, 0, 0, 100, 0, 7000, 7000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 1 on Hunter of the Hand'), +(1784300, 9, 4, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 1'), +(1784300, 9, 5, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 2 on Hunter of the Hand'), +(1784300, 9, 6, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 3 on Hunter of the Hand'), +(1784300, 9, 7, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 107, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Summon Group'), +(1784300, 9, 8, 0, 0, 0, 100, 0, 500, 500, 0, 0, 45, 2, 2, 0, 0, 0, 0, 9, 17875, 20, 200, 0, 0, 0, 0, 'Vindicator Kuros - Script - Set Data Hunter of the Hand'), +(1784300, 9, 9, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 4 on Hunter of the Hand'), +(1784300, 9, 10, 0, 0, 0, 100, 0, 6000, 6000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 17875, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 5 on Hunter of the Hand'), +(1784300, 9, 11, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 9, 17875, 0, 200, 0, 0, 0, 0, 'Vindicator Kuros - Script - Say Line 5 on Hunter of the Hand'), +(1784300, 9, 12, 0, 0, 0, 100, 0, 10000, 10000, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Vindicator Kuros - Script - Set Phase 1'); + +DELETE FROM `waypoints` WHERE `entry` IN(17875,1787500); + +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(17875, 1,-1969.763, -11915.72, 52.07651, 'Hunter of the Hand'), +(17875, 2,-1968.785, -11915.93, 52.07651, 'Hunter of the Hand'), +(17875, 3,-1967.934, -11912.02, 51.25421, 'Hunter of the Hand'), +(17875, 4,-1967.082, -11908.12, 50.62921, 'Hunter of the Hand'), +(17875, 5,-1966.443, -11905.19, 50.00854, 'Hunter of the Hand'), +(17875, 6,-1965.19, -11899.45, 49.74685, 'Hunter of the Hand'), +(17875, 7,-1965.19, -11899.45, 49.74685, 'Hunter of the Hand'), +(1787500, 1,-1944.068, -11891.86, 48.60638, 'Hunter of the Hand'), +(1787500, 2,-1940.068, -11890.86, 47.85638, 'Hunter of the Hand'), +(1787500, 3,-1934.318, -11889.36, 47.35638, 'Hunter of the Hand'), +(1787500, 4,-1929.568, -11888.36, 46.60638, 'Hunter of the Hand'), +(1787500, 5,-1924.818, -11887.11, 46.10638, 'Hunter of the Hand'), +(1787500, 6,-1920.068, -11885.86, 45.35638, 'Hunter of the Hand'), +(1787500, 7,-1917.068, -11885.11, 44.60638, 'Hunter of the Hand'), +(1787500, 8,-1914.318, -11884.36, 44.10638, 'Hunter of the Hand'), +(1787500, 9,-1910.318, -11883.36, 42.60638, 'Hunter of the Hand'); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=17843; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(17843, 0, 1, 17875, -1928.623, -11922.95, 47.65023, 1.884956, 1, 60000), +(17843, 0, 1, 17875, -1910.806, -11892.78, 43.87496, 0.541052, 1, 60000), +(17843, 0, 1, 17875, -1921.778, -11862.54, 51.3028, 3.892084, 1, 60000), +(17843, 0, 1, 17875, -1932.146, -11854.41, 51.7948, 2.9147, 1, 60000), +(17843, 0, 1, 17875, -1909.906, -11867.79, 44.27838, 4.642576, 1, 60000), +(17843, 0, 1, 17875, -1918.49, -11907.37, 46.20815, 0.541052, 1, 60000); -- cgit v1.2.3 From 60176157a7cc1da4a1ef25fe61542f86524ae5e6 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Thu, 18 Sep 2014 00:38:28 +0200 Subject: Scripts/Gundrak: cleanup InstanceScript * converted Gal'Darah and Moorabi to BossAI * add and correct some texts * fixed altar activation spell visual --- sql/updates/world/2014_09_18_00_world_gundrak.sql | 55 ++ .../Northrend/Gundrak/boss_drakkari_colossus.cpp | 62 +- src/server/scripts/Northrend/Gundrak/boss_eck.cpp | 134 ++-- .../scripts/Northrend/Gundrak/boss_gal_darah.cpp | 416 ++++++------ .../scripts/Northrend/Gundrak/boss_moorabi.cpp | 247 ++++--- .../scripts/Northrend/Gundrak/boss_slad_ran.cpp | 63 +- src/server/scripts/Northrend/Gundrak/gundrak.h | 106 +-- .../scripts/Northrend/Gundrak/instance_gundrak.cpp | 752 ++++++++------------- 8 files changed, 842 insertions(+), 993 deletions(-) create mode 100644 sql/updates/world/2014_09_18_00_world_gundrak.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_00_world_gundrak.sql b/sql/updates/world/2014_09_18_00_world_gundrak.sql new file mode 100644 index 00000000000..0d43fa39ee6 --- /dev/null +++ b/sql/updates/world/2014_09_18_00_world_gundrak.sql @@ -0,0 +1,55 @@ +UPDATE `gameobject_template` SET `flags`=40 WHERE `entry`=193188; -- Doodad_GunDrak_Trapdoor_01 + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (57068,57071,57072,54988); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13,1,57068,0,0,31,0,3,30298,127032,0,0, '', 'Cosmetic - Fire Beam Mammoth'), +(13,1,57071,0,0,31,0,3,30298,127035,0,0, '', 'Cosmetic - Fire Beam Snake'), +(13,1,57072,0,0,31,0,3,30298,127033,0,0, '', 'Cosmetic - Fire Beam Elemental'), +(13,1,54988,0,0,31,0,3,22517,0,0,0, '', 'Heart Beam Visual'); + +UPDATE `creature_model_info` SET `bounding_radius`=0.3875, `combat_reach`=6.25 WHERE `modelid`=26278; + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (54956,59827); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(54956,'spell_gal_darah_impaling_charge'), +(59827,'spell_gal_darah_impaling_charge'); + +DELETE FROM `creature_text` WHERE `entry` IN (29304, 29305, 29306, 29932, 29573); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `BroadcastTextID`, `comment`) VALUES +(29304, 0, 0, 'Drakkari gonna kill anybody who tressspasss on these landsss!', 14, 0, 100, 0, 0, 14443, 31711, 'Slad''ran - Aggro'), +(29304, 1, 0, 'You not breathin''? Good.', 14, 0, 100, 0, 0, 14446, 31712, 'Slad''ran - Slay 1'), +(29304, 1, 1, 'Ssscared now?', 14, 0, 100, 0, 0, 14447, 31713, 'Slad''ran - Slay 2'), +(29304, 1, 2, 'I eat you next, mon.', 14, 0, 100, 0, 0, 14448, 31714, 'Slad''ran - Slay 3'), +(29304, 2, 0, 'I sssee now... Ssscourge wasss not... our greatessst enemy....', 14, 0, 100, 0, 0, 14449, 31715, 'Slad''ran - Death'), +(29304, 3, 0, 'Minionsss of the scale, heed my call!', 14, 0, 100, 0, 0, 14444, 30369, 'Slad''ran - Summon Snakes'), +(29304, 4, 0, 'A thousssand fangsss gonna rend your flesh!', 14, 0, 100, 0, 0, 14445, 30370, 'Slad''ran - Summon Constrictors'), +(29304, 5, 0, '%s begins to cast Poison Nova!', 41, 0, 100, 0, 0, 0, 30757, 'Slad''ran - Poison Nova'), +(29304, 6, 0, 'As %s falls, the altar set into the floor on his balcony begins to glow faintly.', 16, 0, 100, 0, 0, 0, 31199, 'Slad''ran - Activate Altar'), + +(29305, 0, 0, 'We fought back da Scourge. What chance joo thinkin'' JOO got?', 14, 0, 100, 0, 0, 14721, 31427, 'Moorabi - Aggro'), +(29305, 1, 0, 'I crush joo cockroaches!', 14, 0, 100, 0, 0, 14725, 31430, 'Moorabi - Slay 1'), +(29305, 1, 1, 'Who gonna stop me? You?', 14, 0, 100, 0, 0, 14726, 31431, 'Moorabi - Slay 2'), +(29305, 1, 2, 'Not so tough now!!', 14, 0, 100, 0, 0, 14727, 31432, 'Moorabi - Slay 3'), +(29305, 2, 0, 'If our gods can die... den so can we....', 14, 0, 100, 0, 0, 14728, 31433, 'Moorabi - Death'), +(29305, 3, 0, 'Get ready for somethin''... much... BIGGAH!', 14, 0, 100, 0, 0, 14722, 31428, 'Moorabi - Transform'), +(29305, 4, 0, 'Da ground gonna swallow you up!', 14, 0, 100, 0, 0, 14723, 31429, 'Moorabi - Quake'), +(29305, 5, 0, '%s begins to transform!', 41, 0, 100, 0, 0, 0, 30385, 'Moorabi - Begin Transform'), +(29305, 6, 0, '%s transforms into a Mammoth!', 16, 0, 100, 0, 0, 0, 30388, 'Moorabi - Transformed'), +(29305, 7, 0, 'As %s falls, the altar set into the floor on his balcony begins to glow faintly.', 16, 0, 100, 0, 0, 0, 31199, 'Moorabi - Activate Altar'), + +(29306, 0, 0, 'I''m gonna spill your guts, mon!', 14, 0, 100, 0, 0, 14430, 32534, 'Gal''darah - Aggro'), +(29306, 1, 0, 'What a rush!', 14, 0, 100, 0, 0, 14436, 32540, 'Gal''darah - Slay 1'), +(29306, 1, 1, 'Who needs gods when we ARE gods?', 14, 0, 100, 0, 0, 14437, 32541, 'Gal''darah - Slay 2'), +(29306, 1, 2, 'I told ya so!', 14, 0, 100, 0, 0, 14438, 32542, 'Gal''darah - Slay 3'), +(29306, 2, 0, 'Even the mighty... can fall.', 14, 0, 100, 0, 0, 14439, 32543, 'Gal''darah - Death'), +(29306, 3, 0, 'Gut them! Impale them!', 14, 0, 100, 0, 0, 14433, 32537, 'Gal''darah - Summon Rhino 1'), +(29306, 3, 1, 'KILL THEM ALL!', 14, 0, 100, 0, 0, 14434, 32538, 'Gal''darah - Summon Rhino 2'), +(29306, 3, 2, 'Say hello to my BIG friend!', 14, 0, 100, 0, 0, 14435, 32539, 'Gal''darah - Summon Rhino 3'), +(29306, 4, 0, 'Ain''t gonna be nothin'' left after this!', 14, 0, 100, 0, 0, 14431, 32535, 'Gal''darah - Transform 1'), +(29306, 5, 0, 'You wanna see power? I''m gonna show you power!', 14, 0, 100, 0, 0, 14432, 32536, 'Gal''darah - Transform 2'), +(29306, 6, 0, '$n is impaled!', 41, 0, 100, 0, 0, 0, 30718, 'Gal''darah - Impale'), + +(29932, 0, 0, 'Something stirs in the pool of mojo...', 16, 0, 100, 0, 0, 0, 30740, 'Eck the Ferocious'), + +(29573, 0, 0, '%s gathers its mojo and surges forward!', 16, 0, 100, 0, 0, 0, 30717, 'Drakkari Elemental - Mojo'), +(29573, 1, 0, 'As the last remnants of the %s seep into the ground, the altar set into the floor nearby begins to glow faintly.', 16, 0, 100, 0, 0, 0, 31226, 'Drakkari Elemental - Death'); diff --git a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp index e3daf32212a..f1fececfa7f 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_drakkari_colossus.cpp @@ -24,6 +24,13 @@ #include "gundrak.h" #include "SpellInfo.h" +enum Texts +{ + // Drakkari Elemental + EMOTE_MOJO = 0, + EMOTE_ACTIVATE_ALTAR = 1 +}; + enum Spells { SPELL_EMERGE = 54850, @@ -80,7 +87,7 @@ class boss_drakkari_colossus : public CreatureScript struct boss_drakkari_colossusAI : public BossAI { - boss_drakkari_colossusAI(Creature* creature) : BossAI(creature, DATA_DRAKKARI_COLOSSUS_EVENT) + boss_drakkari_colossusAI(Creature* creature) : BossAI(creature, DATA_DRAKKARI_COLOSSUS) { Initialize(); me->SetReactState(REACT_PASSIVE); @@ -103,41 +110,20 @@ class boss_drakkari_colossus : public CreatureScript me->RemoveAura(SPELL_FREEZE_ANIM); } - //events.Reset(); -> done in _Reset(); events.ScheduleEvent(EVENT_MIGHTY_BLOW, urand(10000, 30000)); Initialize(); - - // Note: This should not be called, but before use SetBossState function we should use BossAI - // in all the bosses of the instance - instance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) override { _EnterCombat(); - me->RemoveAura(SPELL_FREEZE_ANIM); - - // Note: This should not be called, but before use SetBossState function we should use BossAI - // in all the bosses of the instance - instance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, IN_PROGRESS); } void JustDied(Unit* /*killer*/) override { _JustDied(); - - // Note: This should not be called, but before use SetBossState function we should use BossAI - // in all the bosses of the instance - instance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, DONE); - } - - void JustReachedHome() override - { - // Note: This should not be called, but before use SetBossState function we should use BossAI - // in all the bosses of the instance - instance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, FAIL); } void DoAction(int32 action) override @@ -181,13 +167,12 @@ class boss_drakkari_colossus : public CreatureScript if (phase == COLOSSUS_PHASE_NORMAL || phase == COLOSSUS_PHASE_FIRST_ELEMENTAL_SUMMON) { - if (HealthBelowPct( phase == COLOSSUS_PHASE_NORMAL ? 50 : 5)) + if (HealthBelowPct(phase == COLOSSUS_PHASE_NORMAL ? 50 : 5)) { damage = 0; phase = (phase == COLOSSUS_PHASE_NORMAL ? COLOSSUS_PHASE_FIRST_ELEMENTAL_SUMMON : COLOSSUS_PHASE_SECOND_ELEMENTAL_SUMMON); DoAction(ACTION_FREEZE_COLOSSUS); DoAction(ACTION_SUMMON_ELEMENTAL); - } } } @@ -248,7 +233,7 @@ class boss_drakkari_colossus : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI(creature); + return GetGundrakAI(creature); } }; @@ -275,10 +260,9 @@ class boss_drakkari_elemental : public CreatureScript void JustDied(Unit* killer) override { - if (killer == me) - return; + Talk(EMOTE_ACTIVATE_ALTAR); - if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DRAKKARI_COLOSSUS))) + if (Creature* colossus = instance->GetCreature(DATA_DRAKKARI_COLOSSUS)) killer->Kill(colossus); } @@ -313,8 +297,9 @@ class boss_drakkari_elemental : public CreatureScript switch (action) { case ACTION_RETURN_TO_COLOSSUS: + Talk(EMOTE_MOJO); DoCast(SPELL_SURGE_VISUAL); - if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DRAKKARI_COLOSSUS))) + if (Creature* colossus = instance->GetCreature(DATA_DRAKKARI_COLOSSUS)) // what if the elemental is more than 80 yards from drakkari colossus ? DoCast(colossus, SPELL_MERGE, true); break; @@ -323,11 +308,11 @@ class boss_drakkari_elemental : public CreatureScript void DamageTaken(Unit* /*attacker*/, uint32& damage) override { - if (HealthBelowPct(50) && instance) + if (HealthBelowPct(50)) { - if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DRAKKARI_COLOSSUS))) + if (Creature* colossus = instance->GetCreature(DATA_DRAKKARI_COLOSSUS)) { - if (colossus->AI()->GetData(DATA_COLOSSUS_PHASE) == COLOSSUS_PHASE_FIRST_ELEMENTAL_SUMMON) + if (colossus->AI()->GetData(DATA_COLOSSUS_PHASE) == COLOSSUS_PHASE_FIRST_ELEMENTAL_SUMMON) { damage = 0; @@ -375,7 +360,7 @@ class boss_drakkari_elemental : public CreatureScript CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI(creature); + return GetGundrakAI(creature); } }; @@ -386,7 +371,7 @@ public: CreatureAI* GetAI(Creature* creature) const override { - return GetInstanceAI(creature); + return GetGundrakAI(creature); } struct npc_living_mojoAI : public ScriptedAI @@ -429,7 +414,7 @@ public: if (id == 1) { - if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DRAKKARI_COLOSSUS))) + if (Creature* colossus = instance->GetCreature(DATA_DRAKKARI_COLOSSUS)) { colossus->AI()->DoAction(ACTION_UNFREEZE_COLOSSUS); if (!colossus->AI()->GetData(DATA_INTRO_DONE)) @@ -446,13 +431,11 @@ public: return; // we do this checks to see if the creature is one of the creatures that sorround the boss - if (Creature* colossus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DRAKKARI_COLOSSUS))) + if (Creature* colossus = instance->GetCreature(DATA_DRAKKARI_COLOSSUS)) { Position homePosition = me->GetHomePosition(); - Position colossusHomePosition = colossus->GetHomePosition(); - - float distance = homePosition.GetExactDist(colossusHomePosition.GetPositionX(), colossusHomePosition.GetPositionY(), colossusHomePosition.GetPositionZ()); + float distance = homePosition.GetExactDist(&colossus->GetHomePosition()); if (distance < 12.0f) { @@ -484,6 +467,7 @@ public: DoMeleeAttackIfReady(); } + private: InstanceScript* instance; uint32 mojoWaveTimer; diff --git a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp index 9f8cc818958..baf749fec51 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_eck.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_eck.cpp @@ -19,13 +19,18 @@ #include "ScriptedCreature.h" #include "gundrak.h" +enum Texts +{ + EMOTE_SPAWN = 0 +}; + enum Spells { - SPELL_ECK_BERSERK = 55816, //Eck goes berserk, increasing his attack speed by 150% and all damage he deals by 500%. - SPELL_ECK_BITE = 55813, //Eck bites down hard, inflicting 150% of his normal damage to an enemy. - SPELL_ECK_SPIT = 55814, //Eck spits toxic bile at enemies in a cone in front of him, inflicting 2970 Nature damage and draining 220 mana every 1 sec for 3 sec. - SPELL_ECK_SPRING_1 = 55815, //Eck leaps at a distant target. --> Drops aggro and charges a random player. Tank can simply taunt him back. - SPELL_ECK_SPRING_2 = 55837 //Eck leaps at a distant target. + SPELL_ECK_BERSERK = 55816, // Eck goes berserk, increasing his attack speed by 150% and all damage he deals by 500%. + SPELL_ECK_BITE = 55813, // Eck bites down hard, inflicting 150% of his normal damage to an enemy. + SPELL_ECK_SPIT = 55814, // Eck spits toxic bile at enemies in a cone in front of him, inflicting 2970 Nature damage and draining 220 mana every 1 sec for 3 sec. + SPELL_ECK_SPRING_1 = 55815, // Eck leaps at a distant target. --> Drops aggro and charges a random player. Tank can simply taunt him back. + SPELL_ECK_SPRING_2 = 55837 // Eck leaps at a distant target. }; enum Events @@ -38,79 +43,80 @@ enum Events class boss_eck : public CreatureScript { -public: - boss_eck() : CreatureScript("boss_eck") { } + public: + boss_eck() : CreatureScript("boss_eck") { } - struct boss_eckAI : public BossAI - { - boss_eckAI(Creature* creature) : BossAI(creature, DATA_ECK_THE_FEROCIOUS_EVENT) + struct boss_eckAI : public BossAI { - Initialize(); - } + boss_eckAI(Creature* creature) : BossAI(creature, DATA_ECK_THE_FEROCIOUS) + { + Initialize(); + Talk(EMOTE_SPAWN); + } - void Initialize() - { - Berserk = false; - } + void Initialize() + { + _berserk = false; + } - void Reset() override - { - _Reset(); - Initialize(); - } + void Reset() override + { + _Reset(); + Initialize(); + } - void EnterCombat(Unit* /*who*/) override - { - _EnterCombat(); - events.ScheduleEvent(EVENT_BITE, 5 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_SPIT, 10 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_SPRING, 8 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_BERSERK, urand(60 * IN_MILLISECONDS, 90 * IN_MILLISECONDS)); //60-90 secs according to wowwiki - } + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + events.ScheduleEvent(EVENT_BITE, 5 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPIT, 10 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_SPRING, 8 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_BERSERK, urand(60 * IN_MILLISECONDS, 90 * IN_MILLISECONDS)); // 60-90 secs according to wowwiki + } - void DamageTaken(Unit* /*attacker*/, uint32& damage) override - { - if (me->HealthBelowPctDamaged(20, damage) && !Berserk) + void DamageTaken(Unit* /*attacker*/, uint32& damage) override { - events.RescheduleEvent(EVENT_BERSERK, 1000); - Berserk = true; + if (!_berserk && me->HealthBelowPctDamaged(20, damage)) + { + events.RescheduleEvent(EVENT_BERSERK, 1000); + _berserk = true; + } } - } - void ExecuteEvent(uint32 eventId) override - { - switch (eventId) + void ExecuteEvent(uint32 eventId) override { - case EVENT_BITE: - DoCastVictim(SPELL_ECK_BITE); - events.ScheduleEvent(EVENT_BITE, urand(8 * IN_MILLISECONDS, 12 * IN_MILLISECONDS)); - break; - case EVENT_SPIT: - DoCastVictim(SPELL_ECK_SPIT); - events.ScheduleEvent(EVENT_SPIT, urand(6 * IN_MILLISECONDS, 14 * IN_MILLISECONDS)); - break; - case EVENT_SPRING: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 35.0f, true)) - DoCast(target, RAND(SPELL_ECK_SPRING_1, SPELL_ECK_SPRING_2)); - events.ScheduleEvent(EVENT_SPRING, urand(5 * IN_MILLISECONDS, 10 * IN_MILLISECONDS)); - break; - case EVENT_BERSERK: - DoCast(me, SPELL_ECK_BERSERK); - Berserk = true; - break; - default: - break; + switch (eventId) + { + case EVENT_BITE: + DoCastVictim(SPELL_ECK_BITE); + events.ScheduleEvent(EVENT_BITE, urand(8 * IN_MILLISECONDS, 12 * IN_MILLISECONDS)); + break; + case EVENT_SPIT: + DoCastVictim(SPELL_ECK_SPIT); + events.ScheduleEvent(EVENT_SPIT, urand(6 * IN_MILLISECONDS, 14 * IN_MILLISECONDS)); + break; + case EVENT_SPRING: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 35.0f, true)) + DoCast(target, RAND(SPELL_ECK_SPRING_1, SPELL_ECK_SPRING_2)); + events.ScheduleEvent(EVENT_SPRING, urand(5 * IN_MILLISECONDS, 10 * IN_MILLISECONDS)); + break; + case EVENT_BERSERK: + DoCast(me, SPELL_ECK_BERSERK); + _berserk = true; + break; + default: + break; + } } - } private: - bool Berserk; - }; + bool _berserk; + }; - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI(creature); - } + CreatureAI* GetAI(Creature* creature) const override + { + return GetGundrakAI(creature); + } }; void AddSC_boss_eck() diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp index 992de8c5402..c9ea3a26f4d 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp @@ -17,281 +17,272 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellScript.h" #include "gundrak.h" -//Spells +/// @todo: implement stampede + enum Spells { - SPELL_ENRAGE = 55285, - H_SPELL_ENRAGE = 59828, - SPELL_IMPALING_CHARGE = 54956, - H_SPELL_IMPALING_CHARGE = 59827, - SPELL_STOMP = 55292, - H_SPELL_STOMP = 59829, - SPELL_PUNCTURE = 55276, - H_SPELL_PUNCTURE = 59826, - SPELL_STAMPEDE = 55218, - SPELL_WHIRLING_SLASH = 55250, - H_SPELL_WHIRLING_SLASH = 59824, + SPELL_IMPALING_CHARGE = 54956, + SPELL_IMPALING_CHARGE_CONTROL_VEHICLE = 54958, + SPELL_STOMP = 55292, + SPELL_PUNCTURE = 55276, + SPELL_STAMPEDE = 55218, + SPELL_WHIRLING_SLASH = 55250, + SPELL_ENRAGE = 55285, + SPELL_HEARTH_BEAM_VISUAL = 54988, + SPELL_TRANSFORM_RHINO = 55297, + SPELL_TRANSFORM_BACK = 55299 }; -//Yells enum Yells { - SAY_AGGRO = 0, - SAY_SLAY = 1, - SAY_DEATH = 2, - SAY_SUMMON_RHINO = 3, - SAY_TRANSFORM_1 = 4, - SAY_TRANSFORM_2 = 5 + SAY_AGGRO = 0, + SAY_SLAY = 1, + SAY_DEATH = 2, + SAY_SUMMON_RHINO = 3, + SAY_TRANSFORM_1 = 4, + SAY_TRANSFORM_2 = 5, + EMOTE_IMPALE = 6 }; -enum Displays +enum CombatPhase { - DISPLAY_RHINO = 26265, - DISPLAY_TROLL = 27061 + PHASE_TROLL = 1, + PHASE_RHINO = 2 }; -enum CombatPhase +enum Events { - TROLL, - RHINO + EVENT_IMPALING_CHARGE = 1, + EVENT_STOMP, + EVENT_PUNCTURE, + EVENT_STAMPEDE, + EVENT_WHIRLING_SLASH, + EVENT_ENRAGE, + EVENT_TRANSFORM, + + EVENT_GROUP_TROLL = PHASE_TROLL, + EVENT_GROUP_RHINO = PHASE_RHINO }; enum Misc { - DATA_SHARE_THE_LOVE = 1 + DATA_SHARE_THE_LOVE = 1 }; class boss_gal_darah : public CreatureScript { -public: - boss_gal_darah() : CreatureScript("boss_gal_darah") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI(creature); - } + public: + boss_gal_darah() : CreatureScript("boss_gal_darah") { } - struct boss_gal_darahAI : public ScriptedAI - { - boss_gal_darahAI(Creature* creature) : ScriptedAI(creature) + struct boss_gal_darahAI : public BossAI { - Initialize(); - instance = creature->GetInstanceScript(); - } + boss_gal_darahAI(Creature* creature) : BossAI(creature, DATA_GAL_DARAH) + { + Initialize(); + } - void Initialize() - { - uiStampedeTimer = 10 * IN_MILLISECONDS; - uiWhirlingSlashTimer = 21 * IN_MILLISECONDS; - uiPunctureTimer = 10 * IN_MILLISECONDS; - uiEnrageTimer = 15 * IN_MILLISECONDS; - uiImpalingChargeTimer = 21 * IN_MILLISECONDS; - uiStompTimer = 25 * IN_MILLISECONDS; - uiTransformationTimer = 9 * IN_MILLISECONDS; - uiPhaseCounter = 0; - - shareTheLove = 0; - bStartOfTransformation = true; - Phase = TROLL; - } + void Initialize() + { + _phaseCounter = 0; + } - uint32 uiStampedeTimer; - uint32 uiWhirlingSlashTimer; - uint32 uiPunctureTimer; - uint32 uiEnrageTimer; - uint32 uiImpalingChargeTimer; - uint32 uiStompTimer; - uint32 uiTransformationTimer; - GuidList impaledList; - uint8 shareTheLove; + void InitializeAI() override + { + BossAI::InitializeAI(); + DoCastAOE(SPELL_HEARTH_BEAM_VISUAL, true); + } - CombatPhase Phase; + void Reset() override + { + Initialize(); + _Reset(); + impaledPlayers.clear(); + } - uint8 uiPhaseCounter; + void JustReachedHome() override + { + _JustReachedHome(); + DoCastAOE(SPELL_HEARTH_BEAM_VISUAL, true); + } - bool bStartOfTransformation; + void EnterCombat(Unit* /*who*/) override + { + _EnterCombat(); + Talk(SAY_AGGRO); - InstanceScript* instance; + SetPhase(PHASE_TROLL); + } - void Reset() override - { - Initialize(); + void SetPhase(CombatPhase phase) + { + events.SetPhase(phase); + switch (phase) + { + case PHASE_TROLL: + events.ScheduleEvent(EVENT_STAMPEDE, 10 * IN_MILLISECONDS, 0, PHASE_TROLL); + events.ScheduleEvent(EVENT_WHIRLING_SLASH, 21 * IN_MILLISECONDS, 0, PHASE_TROLL); + break; + case PHASE_RHINO: + events.ScheduleEvent(EVENT_STOMP, 25 * IN_MILLISECONDS, 0, PHASE_RHINO); + events.ScheduleEvent(EVENT_IMPALING_CHARGE, 21 * IN_MILLISECONDS, 0, PHASE_RHINO); + events.ScheduleEvent(EVENT_ENRAGE, 15 * IN_MILLISECONDS, 0, PHASE_RHINO); + events.ScheduleEvent(EVENT_PUNCTURE, 10 * IN_MILLISECONDS, 0, PHASE_RHINO); + break; + } + } - impaledList.clear(); + void SetGUID(ObjectGuid guid, int32 type /*= 0*/) override + { + if (type == DATA_SHARE_THE_LOVE) + { + if (Unit* target = ObjectAccessor::GetUnit(*me, guid)) + Talk(EMOTE_IMPALE, target); + impaledPlayers.insert(guid); + } + } - me->SetDisplayId(DISPLAY_TROLL); + uint32 GetData(uint32 type) const override + { + if (type == DATA_SHARE_THE_LOVE) + return impaledPlayers.size(); - instance->SetData(DATA_GAL_DARAH_EVENT, NOT_STARTED); - } + return 0; + } - void EnterCombat(Unit* /*who*/) override - { - Talk(SAY_AGGRO); + void JustDied(Unit* /*killer*/) override + { + _JustDied(); + Talk(SAY_DEATH); + } - instance->SetData(DATA_GAL_DARAH_EVENT, IN_PROGRESS); - } + void KilledUnit(Unit* victim) override + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_SLAY); + } - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; + void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override + { + if (spellInfo->Id == SPELL_TRANSFORM_BACK) + me->RemoveAurasDueToSpell(SPELL_TRANSFORM_RHINO); + } - switch (Phase) + void ExecuteEvent(uint32 eventId) override { - case TROLL: - if (uiPhaseCounter == 2) - { - if (uiTransformationTimer <= diff) + switch (eventId) + { + case EVENT_IMPALING_CHARGE: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 60.0f, true)) + DoCast(target, SPELL_IMPALING_CHARGE); + if (++_phaseCounter >= 2) + events.ScheduleEvent(EVENT_TRANSFORM, 5 * IN_MILLISECONDS); + events.ScheduleEvent(eventId, 31 * IN_MILLISECONDS, 0, PHASE_RHINO); + break; + case EVENT_STOMP: + DoCastAOE(SPELL_STOMP); + events.ScheduleEvent(eventId, 20 * IN_MILLISECONDS, 0, PHASE_RHINO); + break; + case EVENT_PUNCTURE: + DoCastVictim(SPELL_PUNCTURE); + events.ScheduleEvent(eventId, 8 * IN_MILLISECONDS, 0, PHASE_RHINO); + break; + case EVENT_STAMPEDE: + Talk(SAY_SUMMON_RHINO); + DoCast(me, SPELL_STAMPEDE); + events.ScheduleEvent(eventId, 15 * IN_MILLISECONDS, 0, PHASE_TROLL); + break; + case EVENT_WHIRLING_SLASH: + DoCastVictim(SPELL_WHIRLING_SLASH); + if (++_phaseCounter >= 2) + events.ScheduleEvent(EVENT_TRANSFORM, 5 * IN_MILLISECONDS); + events.ScheduleEvent(eventId, 21 * IN_MILLISECONDS, 0, PHASE_TROLL); + break; + case EVENT_ENRAGE: + DoCast(me, SPELL_ENRAGE); + events.ScheduleEvent(eventId, 20 * IN_MILLISECONDS, 0, PHASE_RHINO); + break; + case EVENT_TRANSFORM: + if (events.IsInPhase(PHASE_TROLL)) { - me->SetDisplayId(DISPLAY_RHINO); - Phase = RHINO; - uiPhaseCounter = 0; Talk(SAY_TRANSFORM_1); - uiTransformationTimer = 5*IN_MILLISECONDS; - bStartOfTransformation = true; - me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); - me->SetReactState(REACT_AGGRESSIVE); + DoCast(me, SPELL_TRANSFORM_RHINO); + SetPhase(PHASE_RHINO); } - else + else if (events.IsInPhase(PHASE_RHINO)) { - uiTransformationTimer -= diff; - - if (bStartOfTransformation) - { - bStartOfTransformation = false; - me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); - me->SetReactState(REACT_PASSIVE); - } - } - } - else - { - if (uiStampedeTimer <= diff) - { - DoCast(me, SPELL_STAMPEDE); - Talk(SAY_SUMMON_RHINO); - uiStampedeTimer = 15*IN_MILLISECONDS; - } else uiStampedeTimer -= diff; - - if (uiWhirlingSlashTimer <= diff) - { - DoCastVictim(SPELL_WHIRLING_SLASH); - uiWhirlingSlashTimer = 21*IN_MILLISECONDS; - ++uiPhaseCounter; - } else uiWhirlingSlashTimer -= diff; - } - break; - case RHINO: - if (uiPhaseCounter == 2) - { - if (uiTransformationTimer <= diff) - { - me->SetDisplayId(DISPLAY_TROLL); - Phase = TROLL; - uiPhaseCounter = 0; Talk(SAY_TRANSFORM_2); - uiTransformationTimer = 9*IN_MILLISECONDS; - bStartOfTransformation = true; - me->ClearUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); - me->SetReactState(REACT_AGGRESSIVE); + DoCast(me, SPELL_TRANSFORM_BACK); + SetPhase(PHASE_TROLL); } - else - { - uiTransformationTimer -= diff; - - if (bStartOfTransformation) - { - bStartOfTransformation = false; - me->AddUnitState(UNIT_STATE_STUNNED|UNIT_STATE_ROOT); - me->SetReactState(REACT_PASSIVE); - } - } - } - else - { - if (uiPunctureTimer <= diff) - { - DoCastVictim(SPELL_PUNCTURE); - uiPunctureTimer = 8*IN_MILLISECONDS; - } else uiPunctureTimer -= diff; - - if (uiEnrageTimer <= diff) - { - DoCastVictim(SPELL_ENRAGE); - uiEnrageTimer = 20*IN_MILLISECONDS; - } else uiEnrageTimer -= diff; - - if (uiStompTimer <= diff) - { - DoCastVictim(SPELL_STOMP); - uiStompTimer = 20*IN_MILLISECONDS; - } else uiStompTimer -= diff; - - if (uiImpalingChargeTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - { - DoCast(target, SPELL_IMPALING_CHARGE); - CheckAchievement(target->GetGUID()); - } - uiImpalingChargeTimer = 31*IN_MILLISECONDS; - ++uiPhaseCounter; - } else uiImpalingChargeTimer -= diff; - } - break; + _phaseCounter = 0; + break; + default: + break; + } } - DoMeleeAttackIfReady(); - } + private: + std::set impaledPlayers; + uint8 _phaseCounter; + }; - // 5 UNIQUE party members - void CheckAchievement(ObjectGuid guid) + CreatureAI* GetAI(Creature* creature) const override { - bool playerExists = false; - for (GuidList::iterator itr = impaledList.begin(); itr != impaledList.end(); ++itr) - if (guid != *itr) - playerExists = true; - - if (playerExists) - ++shareTheLove; - - impaledList.push_back(guid); + return GetGundrakAI(creature); } +}; - uint32 GetData(uint32 type) const override +// 54956, 59827 - Impaling Charge +class spell_gal_darah_impaling_charge : public SpellScriptLoader +{ + public: + spell_gal_darah_impaling_charge() : SpellScriptLoader("spell_gal_darah_impaling_charge") { } + + class spell_gal_darah_impaling_charge_SpellScript : public SpellScript { - if (type == DATA_SHARE_THE_LOVE) - return shareTheLove; + PrepareSpellScript(spell_gal_darah_impaling_charge_SpellScript); - return 0; - } + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_IMPALING_CHARGE_CONTROL_VEHICLE)) + return false; + return true; + } - void JustDied(Unit* /*killer*/) override - { - Talk(SAY_DEATH); + bool Load() override + { + return GetCaster()->GetVehicleKit() && GetCaster()->GetEntry() == NPC_GAL_DARAH; + } - instance->SetData(DATA_GAL_DARAH_EVENT, DONE); - } + void HandleScript(SpellEffIndex /*effIndex*/) + { + if (Unit* target = GetHitUnit()) + { + Unit* caster = GetCaster(); + target->CastSpell(caster, SPELL_IMPALING_CHARGE_CONTROL_VEHICLE, true); + caster->ToCreature()->AI()->SetGUID(target->GetGUID(), DATA_SHARE_THE_LOVE); + } + } - void KilledUnit(Unit* victim) override - { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_gal_darah_impaling_charge_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_CHARGE); + } + }; - Talk(SAY_SLAY); + SpellScript* GetSpellScript() const override + { + return new spell_gal_darah_impaling_charge_SpellScript(); } - }; - }; class achievement_share_the_love : public AchievementCriteriaScript { public: - achievement_share_the_love() : AchievementCriteriaScript("achievement_share_the_love") - { - } + achievement_share_the_love() : AchievementCriteriaScript("achievement_share_the_love") { } bool OnCheck(Player* /*player*/, Unit* target) override { @@ -309,5 +300,6 @@ class achievement_share_the_love : public AchievementCriteriaScript void AddSC_boss_gal_darah() { new boss_gal_darah(); + new spell_gal_darah_impaling_charge(); new achievement_share_the_love(); } diff --git a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp index 255a5ece261..7d7cac5601c 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_moorabi.cpp @@ -17,170 +17,165 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellInfo.h" #include "gundrak.h" +/// @todo: implement mojo frenzy + enum Spells { - SPELL_DETERMINED_STAB = 55104, - SPELL_GROUND_TREMOR = 55142, - SPELL_NUMBING_SHOUT = 55106, - SPELL_DETERMINED_GORE = 55102, - H_SPELL_DETERMINED_GORE = 59444, - SPELL_QUAKE = 55101, - SPELL_NUMBING_ROAR = 55100, - SPELL_MOJO_FRENZY = 55163, - SPELL_TRANSFORMATION = 55098, //Periodic, The caster transforms into a powerful mammoth, increasing Physical damage done by 25% and granting immunity to Stun effects. + SPELL_DETERMINED_GORE = 55102, + SPELL_DETERMINED_STAB = 55104, + SPELL_GROUND_TREMOR = 55142, + SPELL_NUMBING_SHOUT = 55106, + SPELL_QUAKE = 55101, + SPELL_NUMBING_ROAR = 55100, + SPELL_MOJO_FRENZY = 55163, + SPELL_TRANSFORMATION = 55098, // Periodic, The caster transforms into a powerful mammoth, increasing Physical damage done by 25% and granting immunity to Stun effects. }; enum Says { - SAY_AGGRO = 0, - SAY_SLAY = 1, - SAY_DEATH = 2, - SAY_TRANSFORM = 3, - SAY_QUAKE = 4, - EMOTE_TRANSFORM = 5 + SAY_AGGRO = 0, + SAY_SLAY = 1, + SAY_DEATH = 2, + SAY_TRANSFORM = 3, + SAY_QUAKE = 4, + EMOTE_BEGIN_TRANSFORM = 5, + EMOTE_TRANSFORMED = 6, + EMOTE_ACTIVATE_ALTAR = 7 +}; + +enum Events +{ + EVENT_GROUND_TREMOR = 1, + EVENT_NUMBLING_SHOUT, + EVENT_DETERMINED_STAB, + EVENT_TRANFORMATION }; enum Misc { - DATA_LESS_RABI = 1 + DATA_LESS_RABI = 1 }; class boss_moorabi : public CreatureScript { -public: - boss_moorabi() : CreatureScript("boss_moorabi") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI(creature); - } - - struct boss_moorabiAI : public ScriptedAI - { - boss_moorabiAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - instance = creature->GetInstanceScript(); - } - - void Initialize() - { - uiGroundTremorTimer = 18 * IN_MILLISECONDS; - uiNumblingShoutTimer = 10 * IN_MILLISECONDS; - uiDeterminedStabTimer = 20 * IN_MILLISECONDS; - uiTransformationTImer = 12 * IN_MILLISECONDS; - bPhase = false; - } - - InstanceScript* instance; - - bool bPhase; - - uint32 uiNumblingShoutTimer; - uint32 uiGroundTremorTimer; - uint32 uiDeterminedStabTimer; - uint32 uiTransformationTImer; - - void Reset() override - { - Initialize(); - - instance->SetData(DATA_MOORABI_EVENT, NOT_STARTED); - } - - void EnterCombat(Unit* /*who*/) override - { - Talk(SAY_AGGRO); - DoCast(me, SPELL_MOJO_FRENZY, true); - - instance->SetData(DATA_MOORABI_EVENT, IN_PROGRESS); - } + public: + boss_moorabi() : CreatureScript("boss_moorabi") { } - void UpdateAI(uint32 uiDiff) override + struct boss_moorabiAI : public BossAI { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (!bPhase && me->HasAura(SPELL_TRANSFORMATION)) + boss_moorabiAI(Creature* creature) : BossAI(creature, DATA_MOORABI) { - bPhase = true; - me->RemoveAura(SPELL_MOJO_FRENZY); + Initialize(); } - if (uiGroundTremorTimer <= uiDiff) + void Initialize() { - Talk(SAY_QUAKE); - if (bPhase) - DoCastVictim(SPELL_QUAKE, true); - else - DoCastVictim(SPELL_GROUND_TREMOR, true); - uiGroundTremorTimer = 10*IN_MILLISECONDS; - } else uiGroundTremorTimer -= uiDiff; - - if (uiNumblingShoutTimer <= uiDiff) + _transformed = false; + } + + void Reset() override { - if (bPhase) - DoCastVictim(SPELL_NUMBING_ROAR, true); - else - DoCastVictim(SPELL_NUMBING_SHOUT, true); - uiNumblingShoutTimer = 10*IN_MILLISECONDS; - } else uiNumblingShoutTimer -=uiDiff; - - if (uiDeterminedStabTimer <= uiDiff) + Initialize(); + _Reset(); + } + + void EnterCombat(Unit* /*who*/) override { - if (bPhase) - DoCastVictim(SPELL_DETERMINED_GORE); - else - DoCastVictim(SPELL_DETERMINED_STAB, true); - uiDeterminedStabTimer = 8*IN_MILLISECONDS; - } else uiDeterminedStabTimer -=uiDiff; - - if (!bPhase && uiTransformationTImer <= uiDiff) + _EnterCombat(); + Talk(SAY_AGGRO); + DoCast(me, SPELL_MOJO_FRENZY, true); + + events.ScheduleEvent(EVENT_GROUND_TREMOR, 18 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_NUMBLING_SHOUT, 10 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_DETERMINED_STAB, 20 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_TRANFORMATION, 12 * IN_MILLISECONDS); + } + + uint32 GetData(uint32 type) const override { - Talk(EMOTE_TRANSFORM); - Talk(SAY_TRANSFORM); - DoCast(me, SPELL_TRANSFORMATION, false); - uiTransformationTImer = 10*IN_MILLISECONDS; - } else uiTransformationTImer -= uiDiff; + if (type == DATA_LESS_RABI) + return _transformed ? 0 : 1; + return 0; + } - DoMeleeAttackIfReady(); - } + void KilledUnit(Unit* victim) override + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_SLAY); + } - uint32 GetData(uint32 type) const override - { - if (type == DATA_LESS_RABI) - return bPhase ? 0 : 1; + void JustDied(Unit* /*killer*/) override + { + _JustDied(); + Talk(SAY_DEATH); + Talk(EMOTE_ACTIVATE_ALTAR); + } - return 0; - } + void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) override + { + if (spellInfo->Id == SPELL_TRANSFORMATION) + { + _transformed = true; + Talk(EMOTE_TRANSFORMED); + events.CancelEvent(EVENT_TRANFORMATION); + me->RemoveAurasDueToSpell(SPELL_MOJO_FRENZY); + } + } - void JustDied(Unit* /*killer*/) override - { - Talk(SAY_DEATH); + void ExecuteEvent(uint32 eventId) override + { + switch (eventId) + { + case EVENT_GROUND_TREMOR: + Talk(SAY_QUAKE); + if (_transformed) + DoCastAOE(SPELL_QUAKE); + else + DoCastAOE(SPELL_GROUND_TREMOR); + events.ScheduleEvent(eventId, 10 * IN_MILLISECONDS); + break; + case EVENT_NUMBLING_SHOUT: + if (_transformed) + DoCastAOE(SPELL_NUMBING_ROAR); + else + DoCastAOE(SPELL_NUMBING_SHOUT); + events.ScheduleEvent(eventId, 10 * IN_MILLISECONDS); + break; + case EVENT_DETERMINED_STAB: + if (_transformed) + DoCastVictim(SPELL_DETERMINED_GORE); + else + DoCastVictim(SPELL_DETERMINED_STAB); + events.ScheduleEvent(eventId, 8 * IN_MILLISECONDS); + break; + case EVENT_TRANFORMATION: + Talk(EMOTE_BEGIN_TRANSFORM); + Talk(SAY_TRANSFORM); + DoCast(me, SPELL_TRANSFORMATION); + events.ScheduleEvent(eventId, 10 * IN_MILLISECONDS); + break; + default: + break; + } + } - instance->SetData(DATA_MOORABI_EVENT, DONE); - } + private: + bool _transformed; + }; - void KilledUnit(Unit* victim) override + CreatureAI* GetAI(Creature* creature) const override { - if (victim->GetTypeId() != TYPEID_PLAYER) - return; - - Talk(SAY_SLAY); + return GetGundrakAI(creature); } - }; - }; class achievement_less_rabi : public AchievementCriteriaScript { public: - achievement_less_rabi() : AchievementCriteriaScript("achievement_less_rabi") - { - } + achievement_less_rabi() : AchievementCriteriaScript("achievement_less_rabi") { } bool OnCheck(Player* /*player*/, Unit* target) override { diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp index 6c247b08097..9520736cdb5 100644 --- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp +++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp @@ -24,11 +24,10 @@ enum Spells { SPELL_POISON_NOVA = 55081, - H_SPELL_POISON_NOVA = 59842, SPELL_POWERFULL_BITE = 48287, - H_SPELL_POWERFULL_BITE = 59840, SPELL_VENOM_BOLT = 54970, - H_SPELL_VENOM_BOLT = 59839 + SPELL_SUMMON_SNAKES = 55060, // NYI + SPELL_SUMMON_CONSTRICTORS = 54969 // NYI }; enum Yells @@ -38,7 +37,8 @@ enum Yells SAY_DEATH = 2, SAY_SUMMON_SNAKES = 3, SAY_SUMMON_CONSTRICTORS = 4, - EMOTE_NOVA = 5 + EMOTE_NOVA = 5, + EMOTE_ACTIVATE_ALTAR = 6 }; enum Creatures @@ -50,18 +50,17 @@ enum Creatures enum ConstrictorSpells { SPELL_GRIP_OF_SLAD_RAN = 55093, - SPELL_SNAKE_WRAP = 55126, - SPELL_VENOMOUS_BITE = 54987, - H_SPELL_VENOMOUS_BITE = 58996 + SPELL_SNAKE_WRAP = 55126, // 55099 -> 55126 + SPELL_VENOMOUS_BITE = 54987 }; static Position SpawnLoc[]= { - {1783.81f, 646.637f, 133.948f, 3.71755f}, - {1775.03f, 606.586f, 134.165f, 1.43117f}, - {1717.39f, 630.041f, 129.282f, 5.96903f}, - {1765.66f, 646.542f, 134.02f, 5.11381f}, - {1716.76f, 635.159f, 129.282f, 0.191986f} + {1783.81f, 646.637f, 133.948f, 3.71755f}, + {1775.03f, 606.586f, 134.165f, 1.43117f}, + {1717.39f, 630.041f, 129.282f, 5.96903f}, + {1765.66f, 646.542f, 134.02f, 5.11381f}, + {1716.76f, 635.159f, 129.282f, 0.191986f} }; enum Misc @@ -74,17 +73,11 @@ class boss_slad_ran : public CreatureScript public: boss_slad_ran() : CreatureScript("boss_slad_ran") { } - CreatureAI* GetAI(Creature* creature) const override - { - return GetInstanceAI(creature); - } - - struct boss_slad_ranAI : public ScriptedAI + struct boss_slad_ranAI : public BossAI { - boss_slad_ranAI(Creature* creature) : ScriptedAI(creature), lSummons(me) + boss_slad_ranAI(Creature* creature) : BossAI(creature, DATA_SLAD_RAN) { Initialize(); - instance = creature->GetInstanceScript(); } void Initialize() @@ -104,25 +97,18 @@ public: uint8 uiPhase; GuidSet lWrappedPlayers; - SummonList lSummons; - - InstanceScript* instance; void Reset() override { Initialize(); + _Reset(); lWrappedPlayers.clear(); - - lSummons.DespawnAll(); - - instance->SetData(DATA_SLAD_RAN_EVENT, NOT_STARTED); } void EnterCombat(Unit* /*who*/) override { + _EnterCombat(); Talk(SAY_AGGRO); - - instance->SetData(DATA_SLAD_RAN_EVENT, IN_PROGRESS); } void UpdateAI(uint32 diff) override @@ -181,10 +167,9 @@ public: void JustDied(Unit* /*killer*/) override { + _JustDied(); Talk(SAY_DEATH); - lSummons.DespawnAll(); - - instance->SetData(DATA_SLAD_RAN_EVENT, DONE); + Talk(EMOTE_ACTIVATE_ALTAR); } void KilledUnit(Unit* who) override @@ -193,10 +178,10 @@ public: Talk(SAY_SLAY); } - void JustSummoned(Creature* summoned) override + void JustSummoned(Creature* summon) override { - summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); - lSummons.Summon(summoned); + summon->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()); + summons.Summon(summon); } void SetGUID(ObjectGuid guid, int32 type) override @@ -211,6 +196,10 @@ public: } }; + CreatureAI* GetAI(Creature* creature) const override + { + return GetGundrakAI(creature); + } }; class npc_slad_ran_constrictor : public CreatureScript @@ -310,9 +299,7 @@ public: class achievement_snakes_whyd_it_have_to_be_snakes : public AchievementCriteriaScript { public: - achievement_snakes_whyd_it_have_to_be_snakes() : AchievementCriteriaScript("achievement_snakes_whyd_it_have_to_be_snakes") - { - } + achievement_snakes_whyd_it_have_to_be_snakes() : AchievementCriteriaScript("achievement_snakes_whyd_it_have_to_be_snakes") { } bool OnCheck(Player* player, Unit* target) override { diff --git a/src/server/scripts/Northrend/Gundrak/gundrak.h b/src/server/scripts/Northrend/Gundrak/gundrak.h index fffeca82f39..9963c6caee8 100644 --- a/src/server/scripts/Northrend/Gundrak/gundrak.h +++ b/src/server/scripts/Northrend/Gundrak/gundrak.h @@ -15,59 +15,85 @@ * with this program. If not, see . */ -#ifndef DEF_GUNDRAK_H -#define DEF_GUNDRAK_H +#ifndef GUNDRAK_H_ +#define GUNDRAK_H_ +#define GundrakScriptName "instance_gundrak" #define DataHeader "GD" -enum Data +uint32 const EncounterCount = 5; + +enum DataTypes { - DATA_SLAD_RAN_EVENT, - DATA_MOORABI_EVENT, - DATA_DRAKKARI_COLOSSUS_EVENT, - DATA_GAL_DARAH_EVENT, - DATA_ECK_THE_FEROCIOUS_EVENT + // Encounter Ids // Encounter States // Boss GUIDs + DATA_SLAD_RAN = 0, + DATA_DRAKKARI_COLOSSUS = 1, + DATA_MOORABI = 2, + DATA_GAL_DARAH = 3, + DATA_ECK_THE_FEROCIOUS = 4, + + // Additional Objects + DATA_SLAD_RAN_ALTAR = 5, + DATA_DRAKKARI_COLOSSUS_ALTAR = 6, + DATA_MOORABI_ALTAR = 7, + + DATA_SLAD_RAN_STATUE = 8, + DATA_DRAKKARI_COLOSSUS_STATUE = 9, + DATA_MOORABI_STATUE = 10, + DATA_GAL_DARAH_STATUE = 11, + + DATA_TRAPDOOR = 12, + DATA_COLLISION = 13, + DATA_BRIDGE = 14, + + DATA_STATUE_ACTIVATE = 15, }; -enum Data64 +enum CreatureIds { - DATA_SLAD_RAN_ALTAR, - DATA_MOORABI_ALTAR, - DATA_DRAKKARI_COLOSSUS_ALTAR, - DATA_SLAD_RAN_STATUE, - DATA_MOORABI_STATUE, - DATA_DRAKKARI_COLOSSUS_STATUE, - DATA_DRAKKARI_COLOSSUS, - DATA_STATUE_ACTIVATE + NPC_SLAD_RAN = 29304, + NPC_MOORABI = 29305, + NPC_GAL_DARAH = 29306, + NPC_DRAKKARI_COLOSSUS = 29307, + NPC_RUIN_DWELLER = 29920, + NPC_ECK_THE_FEROCIOUS = 29932, + NPC_ALTAR_TRIGGER = 30298 }; -enum mainCreatures +enum GameObjectIds { - CREATURE_RUIN_DWELLER = 29920, - CREATURE_SLAD_RAN = 29304, - CREATURE_MOORABI = 29305, - CREATURE_GALDARAH = 29306, - CREATURE_DRAKKARICOLOSSUS = 29307, - CREATURE_ECK = 29932 + GO_SLAD_RAN_ALTAR = 192518, + GO_MOORABI_ALTAR = 192519, + GO_DRAKKARI_COLOSSUS_ALTAR = 192520, + GO_SLAD_RAN_STATUE = 192564, + GO_MOORABI_STATUE = 192565, + GO_GAL_DARAH_STATUE = 192566, + GO_DRAKKARI_COLOSSUS_STATUE = 192567, + GO_ECK_THE_FEROCIOUS_DOOR = 192632, + GO_ECK_THE_FEROCIOUS_DOOR_BEHIND = 192569, + GO_GAL_DARAH_DOOR_1 = 193208, + GO_GAL_DARAH_DOOR_2 = 193209, + GO_GAL_DARAH_DOOR_3 = 192568, + GO_TRAPDOOR = 193188, + GO_COLLISION = 192633, }; -enum Gameobjects +enum SpellIds { + SPELL_FIRE_BEAM_MAMMOTH = 57068, + SPELL_FIRE_BEAM_SNAKE = 57071, + SPELL_FIRE_BEAM_ELEMENTAL = 57072 +}; - GO_SLADRAN_ALTAR = 192518, - GO_MOORABI_ALTAR = 192519, - GO_DRAKKARI_COLOSSUS_ALTAR = 192520, - GO_SLADRAN_STATUE = 192564, - GO_MOORABI_STATUE = 192565, - GO_GALDARAH_STATUE = 192566, - GO_DRAKKARI_COLOSSUS_STATUE = 192567, - GO_ECK_THE_FEROCIOUS_DOOR = 192632, - GO_ECK_THE_FEROCIOUS_DOOR_BEHIND = 192569, - GO_GALDARAH_DOOR1 = 193208, - GO_GALDARAH_DOOR2 = 193209, - GO_GALDARAH_DOOR3 = 192568, - GO_BRIDGE = 193188, - GO_COLLISION = 192633 +enum InstanceMisc +{ + TIMER_STATUE_ACTIVATION = 3500 }; -#endif +template +inline AI* GetGundrakAI(Creature* creature) +{ + return GetInstanceAI(creature, GundrakScriptName); +} + +#endif // GUNDRAK_H_ diff --git a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp index 0fa26a3dee3..31722b06be8 100644 --- a/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp +++ b/src/server/scripts/Northrend/Gundrak/instance_gundrak.cpp @@ -15,550 +15,354 @@ * with this program. If not, see . */ -#include "ScriptMgr.h" #include "InstanceScript.h" -#include "gundrak.h" #include "Player.h" -#include "TemporarySummon.h" +#include "ScriptMgr.h" +#include "WorldSession.h" +#include "gundrak.h" -#define MAX_ENCOUNTER 5 +DoorData const doorData[] = +{ + { GO_GAL_DARAH_DOOR_1, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_GAL_DARAH_DOOR_2, DATA_GAL_DARAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_GAL_DARAH_DOOR_3, DATA_GAL_DARAH, DOOR_TYPE_ROOM, BOUNDARY_NONE }, + { GO_ECK_THE_FEROCIOUS_DOOR, DATA_MOORABI, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { GO_ECK_THE_FEROCIOUS_DOOR_BEHIND, DATA_ECK_THE_FEROCIOUS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE }, + { 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END +}; -/* GunDrak encounters: -0 - Slad'Ran -1 - Moorabi -2 - Drakkari Colossus -3 - Gal'Darah -4 - Eck the Ferocious -*/ +ObjectData const creatureData[] = +{ + { NPC_DRAKKARI_COLOSSUS, DATA_DRAKKARI_COLOSSUS }, + { 0, 0 } // END +}; + +ObjectData const gameObjectData[] = +{ + { GO_SLAD_RAN_ALTAR, DATA_SLAD_RAN_ALTAR }, + { GO_MOORABI_ALTAR, DATA_MOORABI_ALTAR }, + { GO_DRAKKARI_COLOSSUS_ALTAR, DATA_DRAKKARI_COLOSSUS_ALTAR }, + { GO_SLAD_RAN_STATUE, DATA_SLAD_RAN_STATUE }, + { GO_MOORABI_STATUE, DATA_MOORABI_STATUE }, + { GO_DRAKKARI_COLOSSUS_STATUE, DATA_DRAKKARI_COLOSSUS_STATUE }, + { GO_GAL_DARAH_STATUE, DATA_GAL_DARAH_STATUE }, + { GO_TRAPDOOR, DATA_TRAPDOOR }, + { GO_COLLISION, DATA_COLLISION }, + { 0, 0 } // END +}; Position const EckSpawnPoint = { 1643.877930f, 936.278015f, 107.204948f, 0.668432f }; class instance_gundrak : public InstanceMapScript { -public: - instance_gundrak() : InstanceMapScript("instance_gundrak", 604) { } - - InstanceScript* GetInstanceScript(InstanceMap* map) const override - { - return new instance_gundrak_InstanceMapScript(map); - } + public: + instance_gundrak() : InstanceMapScript(GundrakScriptName, 604) { } - struct instance_gundrak_InstanceMapScript : public InstanceScript - { - instance_gundrak_InstanceMapScript(Map* map) : InstanceScript(map) + struct instance_gundrak_InstanceMapScript : public InstanceScript { - SetHeaders(DataHeader); - isHeroic = map->IsHeroic(); - } - - bool isHeroic; - bool spawnSupport; - - uint32 timer; - uint32 phase; - ObjectGuid toActivate; - - ObjectGuid sladRanGUID; - ObjectGuid moorabiGUID; - ObjectGuid drakkariColossusGUID; - ObjectGuid galDarahGUID; - ObjectGuid eckTheFerociousGUID; - - ObjectGuid sladRanAltarGUID; - ObjectGuid moorabiAltarGUID; - ObjectGuid drakkariColossusAltarGUID; - ObjectGuid sladRanStatueGUID; - ObjectGuid moorabiStatueGUID; - ObjectGuid drakkariColossusStatueGUID; - ObjectGuid galDarahStatueGUID; - ObjectGuid eckTheFerociousDoorGUID; - ObjectGuid eckTheFerociousDoorBehindGUID; - ObjectGuid galDarahDoor1GUID; - ObjectGuid galDarahDoor2GUID; - ObjectGuid galDarahDoor3GUID; - ObjectGuid bridgeGUID; - ObjectGuid collisionGUID; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - GOState sladRanStatueState; - GOState moorabiStatueState; - GOState drakkariColossusStatueState; - GOState galDarahStatueState; - GOState bridgeState; - GOState collisionState; - - GuidSet DwellerGUIDs; - - std::string str_data; - - void Initialize() override - { - spawnSupport = false; - - timer = 0; - phase = 0; - - sladRanStatueState = GO_STATE_ACTIVE; - moorabiStatueState = GO_STATE_ACTIVE; - drakkariColossusStatueState = GO_STATE_ACTIVE; - galDarahStatueState = GO_STATE_READY; - bridgeState = GO_STATE_ACTIVE; - collisionState = GO_STATE_READY; - - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - } - - bool IsEncounterInProgress() const override - { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; - } + instance_gundrak_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetHeaders(DataHeader); + SetBossNumber(EncounterCount); + LoadDoorData(doorData); + LoadObjectData(creatureData, gameObjectData); + + SladRanStatueState = GO_STATE_ACTIVE; + DrakkariColossusStatueState = GO_STATE_ACTIVE; + MoorabiStatueState = GO_STATE_ACTIVE; + } - void OnCreatureCreate(Creature* creature) override - { - switch (creature->GetEntry()) + void OnCreatureCreate(Creature* creature) override { - case CREATURE_SLAD_RAN: - sladRanGUID = creature->GetGUID(); - break; - case CREATURE_MOORABI: - moorabiGUID = creature->GetGUID(); - break; - case CREATURE_GALDARAH: - galDarahGUID = creature->GetGUID(); - break; - case CREATURE_DRAKKARICOLOSSUS: - drakkariColossusGUID = creature->GetGUID(); - break; - case CREATURE_ECK: - eckTheFerociousGUID = creature->GetGUID(); - break; - case CREATURE_RUIN_DWELLER: - if (creature->IsAlive()) - DwellerGUIDs.insert(creature->GetGUID()); - break; + switch (creature->GetEntry()) + { + case NPC_RUIN_DWELLER: + if (creature->IsAlive()) + DwellerGUIDs.insert(creature->GetGUID()); + break; + default: + break; + } + + InstanceScript::OnCreatureCreate(creature); } - } - void OnGameObjectCreate(GameObject* go) override - { - switch (go->GetEntry()) + void OnGameObjectCreate(GameObject* go) override { - case GO_SLADRAN_ALTAR: - sladRanAltarGUID = go->GetGUID(); - // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - if (m_auiEncounter[0] == DONE) - { - if (sladRanStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - else + switch (go->GetEntry()) + { + case GO_SLAD_RAN_ALTAR: + if (GetBossState(DATA_SLAD_RAN) == DONE) { - ++phase; - go->SetGoState(GO_STATE_ACTIVE); + if (SladRanStatueState == GO_STATE_ACTIVE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + else + go->SetGoState(GO_STATE_ACTIVE); } - } - break; - case GO_MOORABI_ALTAR: - moorabiAltarGUID = go->GetGUID(); - // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - if (m_auiEncounter[0] == DONE) - { - if (moorabiStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - else + break; + case GO_MOORABI_ALTAR: + if (GetBossState(DATA_MOORABI) == DONE) { - ++phase; - go->SetGoState(GO_STATE_ACTIVE); + if (MoorabiStatueState == GO_STATE_ACTIVE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + else + go->SetGoState(GO_STATE_ACTIVE); } - } - break; - case GO_DRAKKARI_COLOSSUS_ALTAR: - drakkariColossusAltarGUID = go->GetGUID(); - // Make sure that they start out as unusuable - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - if (m_auiEncounter[0] == DONE) - { - if (drakkariColossusStatueState == GO_STATE_ACTIVE) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - else + break; + case GO_DRAKKARI_COLOSSUS_ALTAR: + if (GetBossState(DATA_DRAKKARI_COLOSSUS) == DONE) { - ++phase; - go->SetGoState(GO_STATE_ACTIVE); + if (DrakkariColossusStatueState == GO_STATE_ACTIVE) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + else + go->SetGoState(GO_STATE_ACTIVE); } - } - break; - case GO_SLADRAN_STATUE: - sladRanStatueGUID = go->GetGUID(); - go->SetGoState(sladRanStatueState); - break; - case GO_MOORABI_STATUE: - moorabiStatueGUID = go->GetGUID(); - go->SetGoState(moorabiStatueState); - break; - case GO_GALDARAH_STATUE: - galDarahStatueGUID = go->GetGUID(); - go->SetGoState(galDarahStatueState); - break; - case GO_DRAKKARI_COLOSSUS_STATUE: - drakkariColossusStatueGUID = go->GetGUID(); - go->SetGoState(drakkariColossusStatueState); - break; - case GO_ECK_THE_FEROCIOUS_DOOR: - eckTheFerociousDoorGUID = go->GetGUID(); - if (isHeroic && m_auiEncounter[1] == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - break; - case GO_ECK_THE_FEROCIOUS_DOOR_BEHIND: - eckTheFerociousDoorBehindGUID = go->GetGUID(); - if (isHeroic && m_auiEncounter[4] == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - break; - case GO_GALDARAH_DOOR1: - galDarahDoor1GUID = go->GetGUID(); - if (m_auiEncounter[3] == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - break; - case GO_GALDARAH_DOOR2: - galDarahDoor2GUID = go->GetGUID(); - if (m_auiEncounter[3] == DONE) - HandleGameObject(ObjectGuid::Empty, true, go); - break; - case GO_BRIDGE: - bridgeGUID = go->GetGUID(); - go->SetGoState(bridgeState); - break; - case GO_COLLISION: - collisionGUID = go->GetGUID(); - go->SetGoState(collisionState); - - // Can't spawn here with SpawnGameObject because go isn't added to world yet... - if (collisionState == GO_STATE_ACTIVE_ALTERNATIVE) - spawnSupport = true; - break; - case GO_GALDARAH_DOOR3: - galDarahDoor3GUID = go->GetGUID(); - if (m_auiEncounter[3] != IN_PROGRESS) - HandleGameObject(galDarahDoor3GUID, true, go); - break; + break; + case GO_SLAD_RAN_STATUE: + go->SetGoState(SladRanStatueState); + break; + case GO_MOORABI_STATUE: + go->SetGoState(MoorabiStatueState); + break; + case GO_GAL_DARAH_STATUE: + go->SetGoState(CheckRequiredBosses(DATA_GAL_DARAH) ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_READY); + break; + case GO_DRAKKARI_COLOSSUS_STATUE: + go->SetGoState(DrakkariColossusStatueState); + break; + case GO_ECK_THE_FEROCIOUS_DOOR: + // Don't store door on non-heroic + if (!instance->IsHeroic()) + return; + break; + case GO_TRAPDOOR: + go->SetGoState(CheckRequiredBosses(DATA_GAL_DARAH) ? GO_STATE_READY : GO_STATE_ACTIVE); + break; + case GO_COLLISION: + go->SetGoState(CheckRequiredBosses(DATA_GAL_DARAH) ? GO_STATE_ACTIVE : GO_STATE_READY); + break; + default: + break; + } + + InstanceScript::OnGameObjectCreate(go); } - } - void OnUnitDeath(Unit* unit) override - { - if (unit->GetEntry() == CREATURE_RUIN_DWELLER) + void OnUnitDeath(Unit* unit) override { - DwellerGUIDs.erase(unit->GetGUID()); + if (unit->GetEntry() == NPC_RUIN_DWELLER) + { + DwellerGUIDs.erase(unit->GetGUID()); - if (DwellerGUIDs.empty()) - unit->SummonCreature(CREATURE_ECK, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300 * IN_MILLISECONDS); + if (DwellerGUIDs.empty()) + unit->SummonCreature(NPC_ECK_THE_FEROCIOUS, EckSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300 * IN_MILLISECONDS); + } } - } - void SetData(uint32 type, uint32 data) override - { - switch (type) + bool SetBossState(uint32 type, EncounterState state) override { - case DATA_SLAD_RAN_EVENT: - m_auiEncounter[0] = data; - if (data == DONE) - { - GameObject* go = instance->GetGameObject(sladRanAltarGUID); - if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - } - break; - case DATA_MOORABI_EVENT: - m_auiEncounter[1] = data; - if (data == DONE) - { - GameObject* go = instance->GetGameObject(moorabiAltarGUID); - if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - if (isHeroic) - HandleGameObject(eckTheFerociousDoorGUID, true); - } - break; - case DATA_DRAKKARI_COLOSSUS_EVENT: - m_auiEncounter[2] = data; - if (data == DONE) + if (!InstanceScript::SetBossState(type, state)) + return false; + + switch (type) { - GameObject* go = instance->GetGameObject(drakkariColossusAltarGUID); - if (go) - go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + case DATA_SLAD_RAN: + if (state == DONE) + if (GameObject* go = GetGameObject(DATA_SLAD_RAN_ALTAR)) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case DATA_DRAKKARI_COLOSSUS: + if (state == DONE) + if (GameObject* go = GetGameObject(DATA_DRAKKARI_COLOSSUS_ALTAR)) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + case DATA_MOORABI: + if (state == DONE) + if (GameObject* go = GetGameObject(DATA_MOORABI_ALTAR)) + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + break; + default: + break; } - break; - case DATA_GAL_DARAH_EVENT: - m_auiEncounter[3] = data; - if (data == DONE) + + return true; + } + + bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override + { + if (player && player->GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES)) + return true; + + switch (bossId) { - HandleGameObject(galDarahDoor1GUID, true); - HandleGameObject(galDarahDoor2GUID, true); + case DATA_ECK_THE_FEROCIOUS: + if (!instance->IsHeroic() || GetBossState(DATA_MOORABI) != DONE) + return false; + break; + case DATA_GAL_DARAH: + if (SladRanStatueState != GO_STATE_ACTIVE_ALTERNATIVE + || DrakkariColossusStatueState != GO_STATE_ACTIVE_ALTERNATIVE + || MoorabiStatueState != GO_STATE_ACTIVE_ALTERNATIVE) + return false; + break; + default: + break; } - HandleGameObject(galDarahDoor3GUID, data == IN_PROGRESS ? false : true); - break; - case DATA_ECK_THE_FEROCIOUS_EVENT: - m_auiEncounter[4] = data; - if (isHeroic && data == DONE) - HandleGameObject(eckTheFerociousDoorBehindGUID, true); - break; - } - if (data == DONE) - SaveToDB(); - } + return true; + } - void SetGuidData(uint32 type, ObjectGuid data) override - { - if (type == DATA_STATUE_ACTIVATE) + bool IsBridgeReady() const { - toActivate = data; - timer = 3500; - ++phase; + return SladRanStatueState == GO_STATE_READY && DrakkariColossusStatueState == GO_STATE_READY && MoorabiStatueState == GO_STATE_READY; } - } - uint32 GetData(uint32 type) const override - { - switch (type) + void SetData(uint32 type, uint32 data) override { - case DATA_SLAD_RAN_EVENT: - return m_auiEncounter[0]; - case DATA_MOORABI_EVENT: - return m_auiEncounter[1]; - case DATA_GAL_DARAH_EVENT: - return m_auiEncounter[2]; - case DATA_DRAKKARI_COLOSSUS_EVENT: - return m_auiEncounter[3]; - case DATA_ECK_THE_FEROCIOUS_EVENT: - return m_auiEncounter[4]; + if (type == DATA_STATUE_ACTIVATE) + { + switch (data) + { + case GO_SLAD_RAN_ALTAR: + Events.ScheduleEvent(DATA_SLAD_RAN_STATUE, TIMER_STATUE_ACTIVATION); + break; + case GO_DRAKKARI_COLOSSUS_ALTAR: + Events.ScheduleEvent(DATA_DRAKKARI_COLOSSUS_STATUE, TIMER_STATUE_ACTIVATION); + break; + case GO_MOORABI_ALTAR: + Events.ScheduleEvent(DATA_MOORABI_STATUE, TIMER_STATUE_ACTIVATION); + break; + default: + break; + } + } } - return 0; - } - - ObjectGuid GetGuidData(uint32 type) const override - { - switch (type) + void WriteSaveDataMore(std::ostringstream& data) override { - case DATA_SLAD_RAN_ALTAR: - return sladRanAltarGUID; - case DATA_MOORABI_ALTAR: - return moorabiAltarGUID; - case DATA_DRAKKARI_COLOSSUS_ALTAR: - return drakkariColossusAltarGUID; - case DATA_SLAD_RAN_STATUE: - return sladRanStatueGUID; - case DATA_MOORABI_STATUE: - return moorabiStatueGUID; - case DATA_DRAKKARI_COLOSSUS_STATUE: - return drakkariColossusStatueGUID; - case DATA_DRAKKARI_COLOSSUS: - return drakkariColossusGUID; - case DATA_STATUE_ACTIVATE: - return toActivate; + data << uint32(SladRanStatueState) << ' '; + data << uint32(DrakkariColossusStatueState) << ' '; + data << uint32(MoorabiStatueState) << ' '; } - return ObjectGuid::Empty; - } + void ReadSaveDataMore(std::istringstream& data) override + { + uint32 temp; - std::string GetSaveData() override - { - OUT_SAVE_INST_DATA; + data >> temp; + SladRanStatueState = GOState(temp); - std::ostringstream saveStream; - saveStream << "G D " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' - << m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' ' << m_auiEncounter[4] << ' ' - << (sladRanStatueGUID ? GetObjState(sladRanStatueGUID) : GO_STATE_ACTIVE) << ' ' << (moorabiStatueGUID ? GetObjState(moorabiStatueGUID) : GO_STATE_ACTIVE) << ' ' - << (drakkariColossusStatueGUID ? GetObjState(drakkariColossusStatueGUID) : GO_STATE_ACTIVE) << ' ' << (galDarahStatueGUID ? GetObjState(galDarahStatueGUID) : GO_STATE_READY) << ' ' - << (bridgeGUID ? GetObjState(bridgeGUID) : GO_STATE_ACTIVE) << ' ' << (collisionGUID ? GetObjState(collisionGUID) : GO_STATE_READY); + data >> temp; + DrakkariColossusStatueState = GOState(temp); - str_data = saveStream.str(); + data >> temp; + MoorabiStatueState = GOState(temp); - OUT_SAVE_INST_DATA_COMPLETE; - return str_data; - } + if (IsBridgeReady()) + Events.ScheduleEvent(DATA_BRIDGE, TIMER_STATUE_ACTIVATION); + } - void Load(const char* in) override - { - if (!in) + void ToggleGameObject(uint32 type, GOState state) { - OUT_LOAD_INST_DATA_FAIL; - return; + if (GameObject* go = GetGameObject(type)) + go->SetGoState(state); + + switch (type) + { + case DATA_SLAD_RAN_STATUE: + SladRanStatueState = state; + break; + case DATA_DRAKKARI_COLOSSUS_STATUE: + DrakkariColossusStatueState = state; + break; + case DATA_MOORABI_STATUE: + MoorabiStatueState = state; + break; + default: + break; + } } - OUT_LOAD_INST_DATA(in); + void Update(uint32 diff) override + { + Events.Update(diff); - char dataHead1, dataHead2; - uint16 data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10; + while (uint32 eventId = Events.ExecuteEvent()) + { + uint32 spellId = 0; + uint32 altarId = 0; + switch (eventId) + { + case DATA_SLAD_RAN_STATUE: + spellId = SPELL_FIRE_BEAM_SNAKE; + altarId = DATA_SLAD_RAN_ALTAR; + break; + case DATA_DRAKKARI_COLOSSUS_STATUE: + spellId = SPELL_FIRE_BEAM_ELEMENTAL; + altarId = DATA_DRAKKARI_COLOSSUS_ALTAR; + break; + case DATA_MOORABI_STATUE: + spellId = SPELL_FIRE_BEAM_MAMMOTH; + altarId = DATA_MOORABI_ALTAR; + break; + case DATA_BRIDGE: + for (uint32 type = DATA_SLAD_RAN_STATUE; type <= DATA_GAL_DARAH_STATUE; ++type) + ToggleGameObject(type, GO_STATE_ACTIVE_ALTERNATIVE); + ToggleGameObject(DATA_TRAPDOOR, GO_STATE_READY); + ToggleGameObject(DATA_COLLISION, GO_STATE_ACTIVE); + SaveToDB(); + return; + default: + return; + } - std::istringstream loadStream(in); - loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 - >> data4 >> data5 >> data6 >> data7 >> data8 >> data9 >> data10; + if (GameObject* altar = GetGameObject(altarId)) + if (Creature* trigger = altar->FindNearestCreature(NPC_ALTAR_TRIGGER, 10.0f)) + trigger->CastSpell((Unit*)nullptr, spellId, true); - if (dataHead1 == 'G' && dataHead2 == 'D') - { - m_auiEncounter[0] = data0; - m_auiEncounter[1] = data1; - m_auiEncounter[2] = data2; - m_auiEncounter[3] = data3; - m_auiEncounter[4] = data4; - sladRanStatueState = GOState(data5); - moorabiStatueState = GOState(data6); - drakkariColossusStatueState = GOState(data7); - galDarahStatueState = GOState(data8); - bridgeState = GOState(data9); - collisionState = GOState(data10); - - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } else OUT_LOAD_INST_DATA_FAIL; - - OUT_LOAD_INST_DATA_COMPLETE; - } + // eventId equals statueId + ToggleGameObject(eventId, GO_STATE_READY); - void Update(uint32 diff) override - { - // Spawn the support for the bridge if necessary - if (spawnSupport) - { - if (GameObject* collision = instance->GetGameObject(collisionGUID)) - collision->SummonGameObject(192743, collision->GetPositionX(), collision->GetPositionY(), collision->GetPositionZ(), collision->GetOrientation(), 0, 0, 0, 0, 0); - spawnSupport = false; - } - - // If there is nothing to activate, then return - if (!toActivate) - return; - - if (timer < diff) - { - timer = 0; - if (toActivate == bridgeGUID) - { - GameObject* bridge = instance->GetGameObject(bridgeGUID); - GameObject* collision = instance->GetGameObject(collisionGUID); - GameObject* sladRanStatue = instance->GetGameObject(sladRanStatueGUID); - GameObject* moorabiStatue = instance->GetGameObject(moorabiStatueGUID); - GameObject* drakkariColossusStatue = instance->GetGameObject(drakkariColossusStatueGUID); - GameObject* galDarahStatue = instance->GetGameObject(galDarahStatueGUID); - - toActivate.Clear(); - - if (bridge && collision && sladRanStatue && moorabiStatue && drakkariColossusStatue && galDarahStatue) - { - bridge->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - collision->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - sladRanStatue->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - moorabiStatue->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - drakkariColossusStatue->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - galDarahStatue->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - - // Add the GO that solidifies the bridge so you can walk on it - spawnSupport = true; - SaveToDB(); - } - } - else - { - uint32 spell = 0; - GameObject* altar = NULL; - if (toActivate == sladRanStatueGUID) - { - spell = 57071; - altar = instance->GetGameObject(sladRanAltarGUID); - } - else if (toActivate == moorabiStatueGUID) - { - spell = 57068; - altar = instance->GetGameObject(moorabiAltarGUID); - } - else if (toActivate == drakkariColossusStatueGUID) - { - spell = 57072; - altar = instance->GetGameObject(drakkariColossusAltarGUID); - } - - // This is a workaround to make the beam cast properly. The caster should be ID 30298 but since the spells - // all are with scripted target for that same ID, it will hit itself. - if (altar) - if (Creature* trigger = altar->SummonCreature(18721, altar->GetPositionX(), altar->GetPositionY(), altar->GetPositionZ() + 3, altar->GetOrientation(), TEMPSUMMON_CORPSE_DESPAWN, 5000)) - { - // Set the trigger model to invisible - trigger->SetDisplayId(11686); - trigger->CastSpell(trigger, spell, false); - } - - if (GameObject* statueGO = instance->GetGameObject(toActivate)) - statueGO->SetGoState(GO_STATE_READY); - - toActivate.Clear(); - - if (phase == 3) - SetGuidData(DATA_STATUE_ACTIVATE, bridgeGUID); - else - SaveToDB(); // Don't save in between last statue and bridge turning in case of crash leading to stuck instance + if (IsBridgeReady()) + Events.ScheduleEvent(DATA_BRIDGE, TIMER_STATUE_ACTIVATION); + + SaveToDB(); } } - else - timer -= diff; - } - GOState GetObjState(ObjectGuid guid) - { - if (GameObject* go = instance->GetGameObject(guid)) - return go->GetGoState(); - return GO_STATE_ACTIVE; - } - }; + protected: + EventMap Events; + GuidSet DwellerGUIDs; + + GOState SladRanStatueState; + GOState DrakkariColossusStatueState; + GOState MoorabiStatueState; + }; + InstanceScript* GetInstanceScript(InstanceMap* map) const override + { + return new instance_gundrak_InstanceMapScript(map); + } }; class go_gundrak_altar : public GameObjectScript { -public: - go_gundrak_altar() : GameObjectScript("go_gundrak_altar") { } - - bool OnGossipHello(Player* /*player*/, GameObject* go) override - { - InstanceScript* instance = go->GetInstanceScript(); - ObjectGuid statueGUID; + public: + go_gundrak_altar() : GameObjectScript("go_gundrak_altar") { } - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - go->SetGoState(GO_STATE_ACTIVE); - - if (instance) + bool OnGossipHello(Player* /*player*/, GameObject* go) override { - switch (go->GetEntry()) - { - case GO_SLADRAN_ALTAR: - statueGUID = instance->GetGuidData(DATA_SLAD_RAN_STATUE); - break; - case GO_MOORABI_ALTAR: - statueGUID = instance->GetGuidData(DATA_MOORABI_STATUE); - break; - case GO_DRAKKARI_COLOSSUS_ALTAR: - statueGUID = instance->GetGuidData(DATA_DRAKKARI_COLOSSUS_STATUE); - break; - } + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); + go->SetGoState(GO_STATE_ACTIVE); - if (!instance->GetGuidData(DATA_STATUE_ACTIVATE)) + if (InstanceScript* instance = go->GetInstanceScript()) { - instance->SetGuidData(DATA_STATUE_ACTIVATE, statueGUID); - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE); - go->SetGoState(GO_STATE_ACTIVE); + instance->SetData(DATA_STATUE_ACTIVATE, go->GetEntry()); + return true; } - return true; - } - return false; - } + return false; + } }; void AddSC_instance_gundrak() -- cgit v1.2.3 From 0e877e784d02164bbdc04bf9fca3aa1cf301e515 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Thu, 18 Sep 2014 00:44:48 +0200 Subject: forgotten to click save :( --- sql/updates/world/2014_09_18_00_world_gundrak.sql | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_00_world_gundrak.sql b/sql/updates/world/2014_09_18_00_world_gundrak.sql index 0d43fa39ee6..b8188c34270 100644 --- a/sql/updates/world/2014_09_18_00_world_gundrak.sql +++ b/sql/updates/world/2014_09_18_00_world_gundrak.sql @@ -7,6 +7,8 @@ INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry (13,1,57072,0,0,31,0,3,30298,127033,0,0, '', 'Cosmetic - Fire Beam Elemental'), (13,1,54988,0,0,31,0,3,22517,0,0,0, '', 'Heart Beam Visual'); +UPDATE `creature_addon` SET `auras`=NULL WHERE `guid`=127213; + UPDATE `creature_model_info` SET `bounding_radius`=0.3875, `combat_reach`=6.25 WHERE `modelid`=26278; DELETE FROM `spell_script_names` WHERE `spell_id` IN (54956,59827); -- cgit v1.2.3 From 55ecd1c9132a7fd8c6ca51a0089b39aec606c0ff Mon Sep 17 00:00:00 2001 From: Dr-J Date: Thu, 18 Sep 2014 01:06:27 +0100 Subject: DB/Misc: Queen Angerboda Fixes script for the Slumbering King. Closes #10247 --- sql/updates/world/2014_09_18_01_world_misc.sql | 90 ++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 sql/updates/world/2014_09_18_01_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_01_world_misc.sql b/sql/updates/world/2014_09_18_01_world_misc.sql new file mode 100644 index 00000000000..964420d4ab6 --- /dev/null +++ b/sql/updates/world/2014_09_18_01_world_misc.sql @@ -0,0 +1,90 @@ +SET @CGuid := 74517; + +DELETE FROM `creature` WHERE `id`IN(24014,29393)AND `guid` BETWEEN @CGUID AND @CGUID+3; +UPDATE `creature_template` SET `faction`=21, `unit_flags`=33536, `unit_flags2`=2099200 WHERE `entry`=29394; + +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID+0, 24014, 571, 1, 1, 2846.022, -3855.99, 248.6132, 5.315152, 120, 0, 0), -- 24014 (Area: 495) +(@CGUID+1, 24014, 571, 1, 1, 2846.136, -3866.035, 248.6132, 0.4537856, 120, 0, 0), -- 24014 (Area: 495) +(@CGUID+2, 24014, 571, 1, 1, 2855.766, -3859.292, 248.6132, 3.944444, 120, 0, 0), -- 24014 (Area: 495) +(@CGUID+3, 29393, 571, 1, 1, 2851.356, -3863.74, 248.6132, 5.305801, 120, 0, 0); -- 29393 (Area: 495) + +DELETE FROM `creature_text` WHERE `entry` IN(29394,24023); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(29394, 0, 0, 'Not yet, Ymiron, I have other plans for you. You will serve me better within Utgarde Pinnacle. And if these insects survive to find you again, you will get the chance to avenge your wife.', 14, 0, 100, 1, 0, 14748, 'The Lich King',23803), +(24023, 0, 0, 'Give me your souls that I might slay the enemy!', 14, 0, 100, 0, 0, 13774, 'Queen Angerboda',22622), +(24023, 1, 0, 'You will not stop my work here! My husband-king will awaken!', 14, 0, 100, 0, 0, 13775, 'Queen Angerboda',22636), +(24023, 2, 0, 'The ritual proceeds too slowly. More sacrifices are needed!', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23802), +(24023, 2, 1, 'Soon, my love. Soon you will waken and all of Azeroth will know fear!', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23795), +(24023, 2, 2, 'Awaken, Ymiron, the time of your continued reign is nigh.', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23796), +(24023, 2, 3, 'Double your efforts! King Ymiron will awaken and then he will ascend!', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23799), +(24023, 2, 4, 'Sleep no longer, my love. With the might of the Lich King behind you, the world will tremble.', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23797), +(24023, 2, 5, 'Why is this ritual taking so long? Your master promised that your assistance would speed the process!', 14, 0, 100, 0, 0, 0, 'Queen Angerboda',23798); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`IN(24023,29394,29394,29393); +UPDATE `creature_template` SET `unit_flags`=768 WHERE `entry`=29393; +UPDATE `creature_template` SET `unit_flags`=32768 WHERE `entry`=24023; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(42808,42809); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 42808, 0, 0, 31, 0, 3, 24014, 0, 0, 0, 0, '', 'Queen Angerbodas On Reaction 2 Beam - Targets Necrolord'), +(13, 1, 42809, 0, 0, 31, 0, 3, 24023, 0, 0, 0, 0, '', 'Queen Angerboda Soul Absorption - Targets Queen Angerboda'); + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(-@CGUID,-@CGUID-1,-@CGUID-2,24023,2402300,2401400,29394,2939400,29393); +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 +(24023, 0, 0, 0, 1, 2, 100, 0, 0, 0, 1000, 1000, 11, 44473, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - OOC (Phase 2) - Cast Queen Angerboda: Soul Beam'), +(24023, 0, 1, 0, 1, 1, 100, 0, 0, 0, 1000, 1000, 11, 42808, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - OOC (Phase 2) - Cast Queen Angerboda: Soul Beam'), +(24023, 0, 2, 0, 10, 0, 100, 0, 0, 50, 60000, 90000, 80, 2402300, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - OOC LOS (Phase 2) - Run Script'), +(24023, 0, 3, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - OOC LOS (Phase 2) - Run Script'), +(24023, 0, 4, 0, 4, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - On Agro - Say Line 2'), +(24023, 0, 5, 0, 6, 0, 100, 0, 0, 0, 0, 0, 12, 29394, 1, 60000, 0, 0, 0, 8, 0, 0, 0, 2850.257, -3872.007, 248.6132, 1.413717, 'Queen Angerboda - On Death - Summon the Lich king'), +(24023, 0, 6, 7, 25, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - On Reset - Set Phase 2'), +(24023, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 10, @CGUID, 24014, 0, 0, 0, 0, 0, 'Queen Angerboda - On Reset - Respawn Necrolord 1'), +(24023, 0, 8, 8, 61, 0, 100, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 10, @CGUID+1, 24014, 0, 0, 0, 0, 0, 'Queen Angerboda - On Reset - Respawn Necrolord 2'), +(24023, 0, 9, 8, 61, 0, 100, 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 10, @CGUID+2, 24014, 0, 0, 0, 0, 0, 'Queen Angerboda - On Reset - Respawn Necrolord 3'), +(24023, 0, 10, 0, 1, 0, 100, 0, 0, 45000, 45000, 90000, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - OOC - Say'), + +(29394, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 80, 2939400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - On Just Summoned - Run Script'), +(29394, 0, 1, 0, 1, 2, 100, 0, 0, 0, 1000, 1000, 11, 42811, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'The Lich King - OOC (Phase 2) - Cast Teleport Other'), +(29393, 0, 0, 1, 38, 0, 100, 0, 1, 1, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'King Ymiron - On Data Set - Cast Ethereal Teleport'), +(29393, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 500, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'King Ymiron - On Data Set - Cast Ethereal Teleport'), +(2939400, 9, 1, 0, 0, 0, 100, 0, 500, 500, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Cast Ethereal Teleport'), +(2939400, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Say'), +(2939400, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Set Orientation'), +(2939400, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Cast Teleport Other'), +(2939400, 9, 5, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Despawn King Ymiron'), +(2939400, 9, 6, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Cast Teleport Other'), +(2939400, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 92, 0, 42811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Interupt'), +(2939400, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 11, 34427, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Cast Ethereal Teleport'), +(2939400, 9, 9, 0, 0, 0, 100, 0, 500, 500, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'The Lich King - Script 1 - Despawn'), +(2402300, 9, 1, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 92, 0, 44473, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Interupt'), +(2402300, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Remove Aura Queen Angerboda: Soul Beam'), +(2402300, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Say Line 1'), +(2402300, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 24014, 0, 100, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Set Data'), +(2402300, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Set Data'), +(2401400, 9, 0, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 37, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Queen Angerboda - Script 1 - Set Data'), +(-@CGUID, 0, 0, 0, 1, 2, 100, 0, 0, 0, 3000, 3000, 11, 44473, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'Necrolord - OOC (Phase 2) - Cast Queen Angerboda: Soul Beam'), +(-@CGUID, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 92, 0, 44473, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 11, 42809, 0, 0, 0, 0, 0, 19, 24023, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2401400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID, 0, 5, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID, 0, 6, 0, 25, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-1, 0, 0, 0, 1, 2, 100, 0, 0, 0, 3000, 3000, 11, 44473, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'Necrolord - OOC (Phase 2) - Cast Queen Angerboda: Soul Beam'), +(-@CGUID-1, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 92, 0, 44473, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-1, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-1, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 11, 42809, 0, 0, 0, 0, 0, 19, 24023, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-1, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2401400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-1, 0, 5, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-1, 0, 6, 0, 25, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-2, 0, 0, 0, 1, 2, 100, 0, 0, 0, 3000, 3000, 11, 44473, 0, 0, 0, 0, 0, 19, 29393, 0, 0, 0, 0, 0, 0, 'Necrolord - OOC (Phase 2) - Cast Queen Angerboda: Soul Beam'), +(-@CGUID-2, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 92, 0, 44473, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-2, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-2, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 11, 42809, 0, 0, 0, 0, 0, 19, 24023, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Cast Queen Angerboda Soul Absorption'), +(-@CGUID-2, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 80, 2401400, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-2, 0, 5, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'), +(-@CGUID-2, 0, 6, 0, 25, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Necrolord - On Data Set - Die'); + +DELETE FROM `creature_template_addon` WHERE `entry`=29394; +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(29394, 0, 0x0, 0x0, '41408'); -- 29394 - 41408 -- cgit v1.2.3 From ad49bd5194db889d93f4b411ef21344da8fbe59a Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Thu, 18 Sep 2014 06:05:38 +0200 Subject: SQL: Fix sql import --- sql/updates/world/2014_09_18_01_world_misc.sql | 2 +- src/server/game/Handlers/PetHandler.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_01_world_misc.sql b/sql/updates/world/2014_09_18_01_world_misc.sql index 964420d4ab6..0100573c404 100644 --- a/sql/updates/world/2014_09_18_01_world_misc.sql +++ b/sql/updates/world/2014_09_18_01_world_misc.sql @@ -1,4 +1,4 @@ -SET @CGuid := 74517; +SET @CGuid := 74518; DELETE FROM `creature` WHERE `id`IN(24014,29393)AND `guid` BETWEEN @CGUID AND @CGUID+3; UPDATE `creature_template` SET `faction`=21, `unit_flags`=33536, `unit_flags2`=2099200 WHERE `entry`=29394; diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp index cb58d8968e8..1a2a571266d 100644 --- a/src/server/game/Handlers/PetHandler.cpp +++ b/src/server/game/Handlers/PetHandler.cpp @@ -270,7 +270,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe { case REACT_PASSIVE: //passive pet->AttackStop(); - + // no break; case REACT_DEFENSIVE: //recovery case REACT_AGGRESSIVE: //activete if (pet->GetTypeId() == TYPEID_UNIT) -- cgit v1.2.3 From 46193d6a1437ff5f488eb265c1718d02ca233ad8 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Thu, 18 Sep 2014 22:50:55 +0200 Subject: DB/Creature: Remove disable combat movement from some SAI By Malcrom --- sql/updates/world/2014_09_18_02_world_misc.sql | 95 ++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 sql/updates/world/2014_09_18_02_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_02_world_misc.sql b/sql/updates/world/2014_09_18_02_world_misc.sql new file mode 100644 index 00000000000..9ce5e14d555 --- /dev/null +++ b/sql/updates/world/2014_09_18_02_world_misc.sql @@ -0,0 +1,95 @@ +-- Nexus Guardian SAI +SET @ENTRY := 26276; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,3400,4800,11,47425,64,0,0,0,0,2,0,0,0,0,0,0,0,"Nexus Guardian - Combat CMC - Cast 'Frost Breath'"), +(@ENTRY,0,1,0,9,0,100,0,0,5,9000,13000,11,51857,1,0,0,0,0,2,0,0,0,0,0,0,0,"Nexus Guardian - Within 0-5 Range - Cast 'Frost Cleave'"); + +-- Saragosa SAI +SET @ENTRY := 26232; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,3400,6200,11,51779,64,0,0,0,0,2,0,0,0,0,0,0,0,"Saragosa - In Combat CMC - Cast 'Frostfire Bolt'"), +(@ENTRY,0,1,0,0,0,100,0,8500,17500,20100,40100,11,15063,1,0,0,0,0,1,0,0,0,0,0,0,0,"Saragosa - In Combat - Cast 'Frost Nova'"); + +-- Snowfall Glade Shaman SAI +SET @ENTRY := 26201; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,1,0,100,0,1000,1000,600000,600000,11,12550,1,0,0,0,0,1,0,0,0,0,0,0,0,"Snowfall Glade Shaman - Out of Combat - Cast 'Lightning Shield'"), +(@ENTRY,0,1,0,0,0,100,0,0,0,3400,4800,11,12548,64,0,0,0,0,2,0,0,0,0,0,0,0,"Snowfall Glade Shaman - In Combat CMC - Cast 'Frost Shock'"), +(@ENTRY,0,2,0,14,0,100,0,4000,40,23000,30000,11,11986,1,0,0,0,0,7,0,0,0,0,0,0,0,"Snowfall Glade Shaman - Friendly At 4000 Health - Cast 'Healing Wave'"); + +-- Snowfall Glade Wolvar SAI +SET @ENTRY := 26198; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,2300,3900,11,43413,64,0,0,0,0,2,0,0,0,0,0,0,0,"Snowfall Glade Wolvar - In Combat CMC - Cast 'Throw Spear'"), +(@ENTRY,0,1,0,9,0,100,0,0,20,9000,14000,11,6533,1,0,0,0,0,2,0,0,0,0,0,0,0,"Snowfall Glade Wolvar - Within 0-20 Range - Cast 'Net'"); + +-- Storm Tempest SAI +SET @ENTRY := 26045; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,63,0,100,0,0,0,0,0,11,8609,2,0,0,0,0,1,0,0,0,0,0,0,0,"Storm Tempest - On Just Created - Cast 'Cyclone Visual Spawn (DND)' (No Repeat)"), +(@ENTRY,0,1,0,1,0,100,1,1000,1000,1000,1000,12,23837,2,120000,0,0,0,8,0,0,0,3404,4133,18,6,"Storm Tempest - Out of Combat - Summon Creature 'ELM General Purpose Bunny'(No Repeat)"), +(@ENTRY,0,2,0,60,0,100,1,1000,1000,7000,8000,11,40136,2,0,0,0,0,19,23837,5,0,0,0,0,0,"Storm Tempest - On Update - Cast 'Lightning Cloud' (No Repeat)"), +(@ENTRY,0,3,0,4,0,100,1,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0,"Storm Tempest - On Aggro - Say Line 0 (No Repeat)"), +(@ENTRY,0,4,0,0,0,100,0,0,30,6000,7500,11,15659,64,0,0,0,0,2,0,0,0,0,0,0,0,"Storm Tempest - In Combat CMC - Cast 'Chain Lightning'"), +(@ENTRY,0,5,0,0,0,100,0,8000,11000,9000,14000,11,31272,0,0,0,0,0,2,0,0,0,0,0,0,0,"Storm Tempest - In Combat - Cast 'Wind Shock'"), +(@ENTRY,0,6,7,6,0,100,0,0,0,0,0,51,0,0,0,0,0,0,9,23837,0,10,0,0,0,0,"Storm Tempest - On Just Died - Kill Target"), +(@ENTRY,0,7,8,61,0,100,0,0,0,0,0,81,16777216,0,0,0,0,0,19,26048,10,0,0,0,0,0,"Storm Tempest - On Just Died - Set Npc Flag Spellclick"), +(@ENTRY,0,8,0,61,0,100,0,0,0,0,0,85,46424,2,0,0,0,0,16,0,0,0,0,0,0,0,"Storm Tempest - On Just Died - Invoker Cast 'Power of the Storm'"); + +-- Coldarra Spellweaver SAI +SET @ENTRY := 25722; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,600,5300,11,34447,64,0,0,0,0,2,0,0,0,0,0,0,0,"Coldarra Spellweaver - In Combat CMC - Cast 'Arcane Missiles' (No Repeat)"); + +-- Coldarra Spellbinder SAI +SET @ENTRY := 25719; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,3900,5800,11,9672,64,0,0,0,0,2,0,0,0,0,0,0,0,"Coldarra Spellbinder - In Combat CMC - Cast 'Frostbolt'"), +(@ENTRY,0,1,0,0,0,100,0,1700,13500,172100,172100,11,50583,1,0,0,0,0,1,0,0,0,0,0,0,0,"Coldarra Spellbinder - In Combat - Cast 'Summon Frozen Spheres'"); + +-- Inquisitor Caleras SAI +SET @ENTRY := 25720; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,3400,6200,11,15043,64,0,0,0,0,2,0,0,0,0,0,0,0,"Inquisitor Caleras - In Combat CMC - Cast 'Frostbolt'"), +(@ENTRY,0,1,0,0,0,100,0,9800,21300,18400,18400,11,32192,1,0,0,0,0,1,0,0,0,0,0,0,0,"Inquisitor Caleras - In Combat - Cast 'Frost Nova'"); + +-- Bloodspore Firestarter SAI +SET @ENTRY := 25470; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,1,0,100,0,1000,1000,600000,600000,11,45985,1,1,0,0,0,1,0,0,0,0,0,0,0,"Bloodspore Firestarter - Out of Combat - Cast 'Flaming Touch'"), +(@ENTRY,0,1,0,0,0,100,0,0,0,3800,6200,11,20793,64,0,0,0,0,2,0,0,0,0,0,0,0,"Bloodspore Firestarter - In Combat CMC - Cast 'Fireball'"); + +-- Winterfin Oracle SAI +SET @ENTRY := 25216; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,4,0,100,0,0,0,0,0,11,50272,1,0,0,0,0,1,0,0,0,0,0,0,0,"Winterfin Oracle - On Aggro - Cast 'Unstable Magic'"), +(@ENTRY,0,1,0,0,1,100,0,0,0,2700,5600,11,9532,64,0,0,0,0,2,0,0,0,0,0,0,0,"Winterfin Oracle - In Combat CMC - Cast 'Lightning Bolt'"), +(@ENTRY,0,2,0,2,0,100,1,0,15,0,0,25,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Winterfin Oracle - Between 0-15% Health - Flee For Assist (No Repeat)"); + +-- Budd's Bodyguard SAI +SET @ENTRY := 25145; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,2300,3900,11,23337,64,0,0,0,0,2,0,0,0,0,0,0,0,"Budd's Bodyguard - In Combat CMC - Cast 'Shoot'"), +(@ENTRY,0,1,0,9,0,100,0,0,20,8000,13000,11,12024,1,0,0,0,0,2,0,0,0,0,0,0,0,"Budd's Bodyguard - Within 0-20 Range - Cast 'Net'"); -- cgit v1.2.3 From e567ab95972508adc85a36f867723114a04fe227 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Thu, 18 Sep 2014 23:33:59 +0200 Subject: Core/Texts: added TextRange parameter to creature_text Ranges: 0 - Normal (Default) 1 - Area 2 - Zone 3 - Map 4 - World Ref #13116 --- .../world/2014_09_18_03_world_creature_text.sql | 10 ++++ src/server/game/AI/CreatureAI.cpp | 7 +-- src/server/game/AI/CreatureAI.h | 8 ++-- src/server/game/Battlegrounds/Battleground.cpp | 2 +- .../game/Battlegrounds/Zones/BattlegroundAV.cpp | 14 +++--- src/server/game/Groups/Group.cpp | 4 +- src/server/game/Groups/Group.h | 18 +++++++- src/server/game/Texts/CreatureTextMgr.cpp | 49 +++++++++++--------- src/server/game/Texts/CreatureTextMgr.h | 53 +++++++++++++--------- .../EasternKingdoms/ScarletEnclave/chapter1.cpp | 2 +- .../instance_culling_of_stratholme.cpp | 8 ++-- .../Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 4 +- .../Database/Implementation/WorldDatabase.cpp | 2 +- 13 files changed, 107 insertions(+), 74 deletions(-) create mode 100644 sql/updates/world/2014_09_18_03_world_creature_text.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_03_world_creature_text.sql b/sql/updates/world/2014_09_18_03_world_creature_text.sql new file mode 100644 index 00000000000..a3ccd371ecc --- /dev/null +++ b/sql/updates/world/2014_09_18_03_world_creature_text.sql @@ -0,0 +1,10 @@ +ALTER TABLE `creature_text` + CHANGE `BroadcastTextID` `BroadcastTextId` MEDIUMINT(6) DEFAULT 0 NOT NULL AFTER `sound`, + ADD COLUMN `TextRange` TINYINT(3) UNSIGNED DEFAULT 0 NOT NULL AFTER `BroadcastTextId`; + +-- Zone +UPDATE `creature_text` SET `TextRange`=2 WHERE `entry`=15214; + +-- Map +UPDATE `creature_text` SET `TextRange`=3 WHERE `entry` IN (29, 14848, 22515, 26527, 27915, 30084); + diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index 7a79bb722a0..933cb38aef5 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -38,16 +38,11 @@ void CreatureAI::OnCharmed(bool /*apply*/) AISpellInfoType* UnitAI::AISpellInfo; AISpellInfoType* GetAISpellInfo(uint32 i) { return &CreatureAI::AISpellInfo[i]; } -void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= NULL*/) +void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= nullptr*/) { sCreatureTextMgr->SendChat(me, id, whisperTarget); } -void CreatureAI::TalkToMap(uint8 id, WorldObject const* whisperTarget /*= NULL*/) -{ - sCreatureTextMgr->SendChat(me, id, whisperTarget, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP); -} - void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToNearestTarget /* = 50.0f*/) { if (!creature) diff --git a/src/server/game/AI/CreatureAI.h b/src/server/game/AI/CreatureAI.h index b79dd6abbc8..83ecb11a8ef 100644 --- a/src/server/game/AI/CreatureAI.h +++ b/src/server/game/AI/CreatureAI.h @@ -78,8 +78,8 @@ class CreatureAI : public UnitAI Creature* DoSummonFlyer(uint32 entry, WorldObject* obj, float flightZ, float radius = 5.0f, uint32 despawnTime = 30000, TempSummonType summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN); public: - void Talk(uint8 id, WorldObject const* whisperTarget = NULL); - void TalkToMap(uint8 id, WorldObject const* whisperTarget = NULL); + void Talk(uint8 id, WorldObject const* whisperTarget = nullptr); + explicit CreatureAI(Creature* creature) : UnitAI(creature), me(creature), m_MoveInLineOfSight_locked(false) { } virtual ~CreatureAI() { } @@ -165,14 +165,12 @@ class CreatureAI : public UnitAI /// == Fields ======================================= - // Pointer to controlled by AI creature - //Creature* const me; - virtual void PassengerBoarded(Unit* /*passenger*/, int8 /*seatId*/, bool /*apply*/) { } virtual void OnSpellClick(Unit* /*clicker*/, bool& /*result*/) { } virtual bool CanSeeAlways(WorldObject const* /*obj*/) { return false; } + protected: virtual void MoveInLineOfSight(Unit* /*who*/); diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 90a84774a81..86081c7f074 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -620,7 +620,7 @@ void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player* void Battleground::SendChatMessage(Creature* source, uint8 textId, WorldObject* target /*= NULL*/) { - sCreatureTextMgr->SendChat(source, textId, target, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP); + sCreatureTextMgr->SendChat(source, textId, target); } void Battleground::PlaySoundToAll(uint32 SoundID) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index c028698f5ae..0490923510c 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -119,7 +119,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer) DelCreature(AV_CPLACE_TRIGGER16); if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) - herold->AI()->TalkToMap(TEXT_STORMPIKE_GENERAL_DEAD); + herold->AI()->Talk(TEXT_STORMPIKE_GENERAL_DEAD); } else if (entry == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN]) { @@ -138,7 +138,7 @@ void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer) DelCreature(AV_CPLACE_TRIGGER18); if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) - herold->AI()->TalkToMap(TEXT_FROSTWOLF_GENERAL_DEAD); + herold->AI()->Talk(TEXT_FROSTWOLF_GENERAL_DEAD); } else if (entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_N_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_A_4] || entry == BG_AV_CreatureInfo[AV_NPC_N_MINE_H_4]) ChangeMineOwner(AV_NORTH_MINE, killer->GetTeam()); @@ -603,7 +603,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node) if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node)) if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) - herold->AI()->TalkToMap(owner == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture); + herold->AI()->Talk(owner == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture); } void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial) @@ -679,9 +679,9 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial) if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) { if (mine == AV_NORTH_MINE) - herold->AI()->TalkToMap(team == ALLIANCE ? TEXT_IRONDEEP_MINE_ALLIANCE_TAKEN : TEXT_IRONDEEP_MINE_HORDE_TAKEN); + herold->AI()->Talk(team == ALLIANCE ? TEXT_IRONDEEP_MINE_ALLIANCE_TAKEN : TEXT_IRONDEEP_MINE_HORDE_TAKEN); else if (mine == AV_SOUTH_MINE) - herold->AI()->TalkToMap(team == ALLIANCE ? TEXT_COLDTOOTH_MINE_ALLIANCE_TAKEN : TEXT_COLDTOOTH_MINE_HORDE_TAKEN); + herold->AI()->Talk(team == ALLIANCE ? TEXT_COLDTOOTH_MINE_ALLIANCE_TAKEN : TEXT_COLDTOOTH_MINE_HORDE_TAKEN); } } else @@ -923,7 +923,7 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object) if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node)) if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) - herold->AI()->TalkToMap(team == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture); + herold->AI()->Talk(team == ALLIANCE ? nodeInfo->TextIds.AllianceCapture : nodeInfo->TextIds.HordeCapture); // update the statistic for the defending player UpdatePlayerScore(player, IsTower(node) ? SCORE_TOWERS_DEFENDED : SCORE_GRAVEYARDS_DEFENDED, 1); @@ -1014,7 +1014,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object) if (StaticNodeInfo const* nodeInfo = GetStaticNodeInfo(node)) if (Creature* herold = GetBGCreature(AV_CPLACE_HERALD)) - herold->AI()->TalkToMap(team == ALLIANCE ? nodeInfo->TextIds.AllianceAttack : nodeInfo->TextIds.HordeAttack); + herold->AI()->Talk(team == ALLIANCE ? nodeInfo->TextIds.AllianceAttack : nodeInfo->TextIds.HordeAttack); // update the statistic for the assaulting player UpdatePlayerScore(player, (IsTower(node)) ? SCORE_TOWERS_ASSAULTED : SCORE_GRAVEYARDS_ASSAULTED, 1); diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index df34c12e332..b203ccb8bb9 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1591,12 +1591,12 @@ void Group::UpdatePlayerOutOfRange(Player* player) } } -void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group, ObjectGuid ignore) +void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group /*= -1*/, ObjectGuid ignoredPlayer /*= ObjectGuid::Empty*/) { for (GroupReference* itr = GetFirstMember(); itr != NULL; itr = itr->next()) { Player* player = itr->GetSource(); - if (!player || (!ignore.IsEmpty() && player->GetGUID() == ignore) || (ignorePlayersInBGRaid && player->GetGroup() != this)) + if (!player || (!ignoredPlayer.IsEmpty() && player->GetGUID() == ignoredPlayer) || (ignorePlayersInBGRaid && player->GetGroup() != this)) continue; if (player->GetSession() && (group == -1 || itr->getSubGroup() == group)) diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 6abfd5b667d..5e9ab911292 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -269,8 +269,22 @@ class Group void SendUpdate(); void SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot = NULL); void UpdatePlayerOutOfRange(Player* player); - // ignore: GUID of player that will be ignored - void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group = -1, ObjectGuid ignore = ObjectGuid::Empty); + + template + void BroadcastWorker(Worker& worker) + { + for (GroupReference* itr = GetFirstMember(); itr != nullptr; itr = itr->next()) + worker(itr->GetSource()); + } + + template + void BroadcastWorker(Worker const& worker) const + { + for (GroupReference const* itr = GetFirstMember(); itr != nullptr; itr = itr->next()) + worker(itr->GetSource()); + } + + void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group = -1, ObjectGuid ignoredPlayer = ObjectGuid::Empty); void BroadcastReadyCheck(WorldPacket* packet); void OfflineReadyCheck(); diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 0412128754c..05769c84f94 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -91,7 +91,6 @@ void CreatureTextMgr::LoadCreatureTexts() } uint32 textCount = 0; - uint32 creatureCount = 0; do { @@ -109,25 +108,26 @@ void CreatureTextMgr::LoadCreatureTexts() temp.duration = fields[8].GetUInt32(); temp.sound = fields[9].GetUInt32(); temp.BroadcastTextId = fields[10].GetUInt32(); + temp.TextRange = CreatureTextRange(fields[11].GetUInt8()); if (temp.sound) { if (!sSoundEntriesStore.LookupEntry(temp.sound)) { - TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound); + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound); temp.sound = 0; } } if (!GetLanguageDescByID(temp.lang)) { - TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang)); + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang)); temp.lang = LANG_UNIVERSAL; } if (temp.type >= MAX_CHAT_MSG_TYPE) { - TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type)); + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type)); temp.type = CHAT_MSG_SAY; } @@ -135,7 +135,7 @@ void CreatureTextMgr::LoadCreatureTexts() { if (!sEmotesStore.LookupEntry(temp.emote)) { - TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote)); + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote)); temp.emote = EMOTE_ONESHOT_NONE; } } @@ -149,9 +149,11 @@ void CreatureTextMgr::LoadCreatureTexts() } } - // entry not yet added, add empty TextHolder (list of groups) - if (mTextMap.find(temp.entry) == mTextMap.end()) - ++creatureCount; + if (temp.TextRange > TEXT_RANGE_WORLD) + { + TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u, Id %u in table `creature_text` has incorrect TextRange %u.", temp.entry, temp.group, temp.id, temp.TextRange); + temp.TextRange = TEXT_RANGE_NORMAL; + } // add the text into our entry's group mTextMap[temp.entry][temp.group].push_back(temp); @@ -160,7 +162,7 @@ void CreatureTextMgr::LoadCreatureTexts() } while (result->NextRow()); - TC_LOG_INFO("server.loading", ">> Loaded %u creature texts for %u creatures in %u ms", textCount, creatureCount, GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO("server.loading", ">> Loaded %u creature texts for " SZFMTD " creatures in %u ms", textCount, mTextMap.size(), GetMSTimeDiffToNow(oldMSTime)); } void CreatureTextMgr::LoadCreatureTextLocales() @@ -193,7 +195,7 @@ void CreatureTextMgr::LoadCreatureTextLocales() } -uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= NULL*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= NULL*/) +uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget /*= nullptr*/, ChatMsg msgType /*= CHAT_MSG_ADDON*/, Language language /*= LANG_ADDON*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, uint32 sound /*= 0*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/, Player* srcPlr /*= nullptr*/) { if (!source) return 0; @@ -274,6 +276,9 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject Language finalLang = (language == LANG_ADDON) ? iter->lang : language; uint32 finalSound = sound ? sound : iter->sound; + if (range == TEXT_RANGE_NORMAL) + range = iter->TextRange; + if (finalSound) SendSound(source, finalSound, finalType, whisperTarget, range, team, gmOnly); @@ -334,6 +339,18 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, { switch (msgType) { + case CHAT_MSG_MONSTER_PARTY: + { + if (!whisperTarget) + return; + + if (Player const* whisperPlayer = whisperTarget->ToPlayer()) + { + if (Group const* group = whisperPlayer->GetGroup()) + group->BroadcastWorker([data](Player* player) { player->SendDirectMessage(data); }); + } + return; + } case CHAT_MSG_MONSTER_WHISPER: case CHAT_MSG_RAID_BOSS_WHISPER: { @@ -347,18 +364,6 @@ void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, } break; } - case CHAT_MSG_MONSTER_PARTY: - if (!whisperTarget) - return; - - if (Player const* player = whisperTarget->ToPlayer()) - { - if (Group* group = const_cast(player->GetGroup())) - for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) - if (Player* member = itr->GetSource()) - member->GetSession()->SendPacket(data); - } - return; default: break; } diff --git a/src/server/game/Texts/CreatureTextMgr.h b/src/server/game/Texts/CreatureTextMgr.h index 49d83b91353..d6fa2b2492c 100644 --- a/src/server/game/Texts/CreatureTextMgr.h +++ b/src/server/game/Texts/CreatureTextMgr.h @@ -24,6 +24,15 @@ #include "SharedDefines.h" #include "Opcodes.h" +enum CreatureTextRange +{ + TEXT_RANGE_NORMAL = 0, + TEXT_RANGE_AREA = 1, + TEXT_RANGE_ZONE = 2, + TEXT_RANGE_MAP = 3, + TEXT_RANGE_WORLD = 4 +}; + struct CreatureTextEntry { uint32 entry; @@ -37,15 +46,7 @@ struct CreatureTextEntry uint32 duration; uint32 sound; uint32 BroadcastTextId; -}; - -enum CreatureTextRange -{ - TEXT_RANGE_NORMAL = 0, - TEXT_RANGE_AREA = 1, - TEXT_RANGE_ZONE = 2, - TEXT_RANGE_MAP = 3, - TEXT_RANGE_WORLD = 4 + CreatureTextRange TextRange; }; struct CreatureTextLocale @@ -55,9 +56,7 @@ struct CreatureTextLocale struct CreatureTextId { - CreatureTextId(uint32 e, uint32 g, uint32 i) : entry(e), textGroup(g), textId(i) - { - } + CreatureTextId(uint32 e, uint32 g, uint32 i) : entry(e), textGroup(g), textId(i) { } bool operator<(CreatureTextId const& right) const { @@ -69,9 +68,9 @@ struct CreatureTextId uint32 textId; }; -typedef std::vector CreatureTextGroup; //texts in a group -typedef std::unordered_map CreatureTextHolder; //groups for a creature by groupid -typedef std::unordered_map CreatureTextMap; //all creatures by entry +typedef std::vector CreatureTextGroup; // texts in a group +typedef std::unordered_map CreatureTextHolder; // groups for a creature by groupid +typedef std::unordered_map CreatureTextMap; // all creatures by entry typedef std::map LocaleCreatureTextMap; @@ -83,8 +82,8 @@ typedef std::unordered_map CreatureTextRepe class CreatureTextMgr { private: - CreatureTextMgr() { }; - ~CreatureTextMgr() { }; + CreatureTextMgr() { } + ~CreatureTextMgr() { } public: static CreatureTextMgr* instance() @@ -101,11 +100,11 @@ class CreatureTextMgr void SendEmote(Unit* source, uint32 emote); //if sent, returns the 'duration' of the text else 0 if error - uint32 SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget = NULL, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = NULL); + uint32 SendChat(Creature* source, uint8 textGroup, WorldObject const* whisperTarget = nullptr, ChatMsg msgType = CHAT_MSG_ADDON, Language language = LANG_ADDON, CreatureTextRange range = TEXT_RANGE_NORMAL, uint32 sound = 0, Team team = TEAM_OTHER, bool gmOnly = false, Player* srcPlr = nullptr); bool TextExist(uint32 sourceEntry, uint8 textGroup); std::string GetLocalizedChatString(uint32 entry, uint8 gender, uint8 textGroup, uint32 id, LocaleConstant locale) const; - template void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget = NULL, CreatureTextRange range = TEXT_RANGE_NORMAL, Team team = TEAM_OTHER, bool gmOnly = false) const; + template void SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget = nullptr, CreatureTextRange range = TEXT_RANGE_NORMAL, Team team = TEAM_OTHER, bool gmOnly = false) const; private: CreatureTextRepeatIds GetRepeatGroup(Creature* source, uint8 textGroup); @@ -181,7 +180,7 @@ class CreatureTextLocalizer }; template -void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget /*= NULL*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/) const +void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder, ChatMsg msgType, WorldObject const* whisperTarget /*= nullptr*/, CreatureTextRange range /*= TEXT_RANGE_NORMAL*/, Team team /*= TEAM_OTHER*/, bool gmOnly /*= false*/) const { if (!source) return; @@ -190,6 +189,18 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder switch (msgType) { + case CHAT_MSG_MONSTER_PARTY: + { + if (!whisperTarget) + return; + + if (Player* whisperPlayer = const_cast(whisperTarget->ToPlayer())) + { + if (Group* group = whisperPlayer->GetGroup()) + group->BroadcastWorker(localizer); + } + return; + } case CHAT_MSG_MONSTER_WHISPER: case CHAT_MSG_RAID_BOSS_WHISPER: { @@ -240,7 +251,7 @@ void CreatureTextMgr::SendChatPacket(WorldObject* source, Builder const& builder SessionMap const& smap = sWorld->GetAllSessions(); for (SessionMap::const_iterator iter = smap.begin(); iter != smap.end(); ++iter) if (Player* player = iter->second->GetPlayer()) - if (player->GetSession() && (!team || Team(player->GetTeam()) == team) && (!gmOnly || player->IsGameMaster())) + if ((!team || Team(player->GetTeam()) == team) && (!gmOnly || player->IsGameMaster())) localizer(player); return; } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index e9039da892c..2fcdd276bdc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -420,7 +420,7 @@ class npc_eye_of_acherus : public CreatureScript for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i) me->SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true); - TalkToMap(TALK_CONTROL, owner); + Talk(TALK_CONTROL, owner); } me->SetDisableGravity(false); DoCast(me, SPELL_EYE_FLIGHT); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp index ae0fa2aa564..c25a061d622 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/instance_culling_of_stratholme.cpp @@ -163,7 +163,7 @@ class instance_culling_of_stratholme : public InstanceMapScript // Summon Chromie and global whisper if (Creature* chromie = instance->SummonCreature(NPC_CHROMIE_2, ChromieSummonPos[0])) if (!instance->GetPlayers().isEmpty()) - chromie->AI()->TalkToMap(SAY_CRATES_COMPLETED); + chromie->AI()->Talk(SAY_CRATES_COMPLETED); } DoUpdateWorldState(WORLDSTATE_CRATES_REVEALED, _crateCount); break; @@ -277,17 +277,17 @@ class instance_culling_of_stratholme : public InstanceMapScript case 25: if (instance->HavePlayers()) if (Creature* chromie = instance->GetCreature(_chromieGUID)) - chromie->AI()->TalkToMap(SAY_INFINITE_START); + chromie->AI()->Talk(SAY_INFINITE_START); break; case 5: if (instance->HavePlayers()) if (Creature* chromie = instance->GetCreature(_chromieGUID)) - chromie->AI()->TalkToMap(SAY_INFINITE); + chromie->AI()->Talk(SAY_INFINITE); break; case 0: if (instance->HavePlayers()) if (Creature* chromie = instance->GetCreature(_chromieGUID)) - chromie->AI()->TalkToMap(SAY_INFINITE_FAIL); + chromie->AI()->Talk(SAY_INFINITE_FAIL); if (Creature* infinite = instance->GetCreature(_infiniteGUID)) { diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 5862453731e..bd1a345e55b 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -672,7 +672,7 @@ public: Talk(SAY_BUFF_SPARK); } else if (spell->Id == SPELL_MALYGOS_BERSERK) - TalkToMap(EMOTE_HIT_BERSERKER_TIMER); + Talk(EMOTE_HIT_BERSERKER_TIMER); } void MoveInLineOfSight(Unit* who) override @@ -1121,7 +1121,7 @@ public: npc_power_sparkAI(Creature* creature) : ScriptedAI(creature) { _instance = creature->GetInstanceScript(); - TalkToMap(EMOTE_POWER_SPARK_SUMMONED); + Talk(EMOTE_POWER_SPARK_SUMMONED); MoveToMalygos(); } diff --git a/src/server/shared/Database/Implementation/WorldDatabase.cpp b/src/server/shared/Database/Implementation/WorldDatabase.cpp index f5d9913bc5b..e83901c8557 100644 --- a/src/server/shared/Database/Implementation/WorldDatabase.cpp +++ b/src/server/shared/Database/Implementation/WorldDatabase.cpp @@ -25,7 +25,7 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_SEL_QUEST_POOLS, "SELECT entry, pool_entry FROM pool_quest", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_CRELINKED_RESPAWN, "DELETE FROM linked_respawn WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_REP_CREATURE_LINKED_RESPAWN, "REPLACE INTO linked_respawn (guid, linkedGuid) VALUES (?, ?)", CONNECTION_ASYNC); - PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound, BroadcastTextID FROM creature_text", CONNECTION_SYNCH); + PrepareStatement(WORLD_SEL_CREATURE_TEXT, "SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound, BroadcastTextId, TextRange FROM creature_text", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_SMART_SCRIPTS, "SELECT 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 FROM smart_scripts ORDER BY entryorguid, source_type, id, link", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_SMARTAI_WP, "SELECT entry, pointid, position_x, position_y, position_z FROM waypoints ORDER BY entry, pointid", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_GAMEOBJECT, "DELETE FROM gameobject WHERE guid = ?", CONNECTION_ASYNC); -- cgit v1.2.3 From 3a7fed7346c0654fcd272f47829ac42a4b49ce30 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 19 Sep 2014 01:12:52 +0100 Subject: DB/Misc: More texts Howling Fjord again, also fixes the error from https://github.com/TrinityCore/TrinityCore/commit/55ecd1c9132a7fd8c6ca51a0089b39aec606c0ff --- sql/updates/world/2014_09_18_03_world_misc.sql | 143 +++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 sql/updates/world/2014_09_18_03_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_18_03_world_misc.sql b/sql/updates/world/2014_09_18_03_world_misc.sql new file mode 100644 index 00000000000..7342c9f96cc --- /dev/null +++ b/sql/updates/world/2014_09_18_03_world_misc.sql @@ -0,0 +1,143 @@ +UPDATE `smart_scripts` SET `link`=9 WHERE `entryorguid`=24023 AND `source_type`=0 AND `id`=8 AND `link`=8; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=24023 AND `source_type`=0 AND `id`=9 AND `link`=8; + +DELETE FROM `creature_text` WHERE `entry` IN(23780,24041,23778,24252,28313); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`,`BroadcastTextID`) VALUES +(23780, 1, 0, 'Send these scumbags back to hell! Fire at will!', 14, 0, 100, 0, 0, 0, 'High Executor Anselm',22687), +(23780, 2, 0, 'Archers at the ready! Hold your fire!', 14, 0, 100, 0, 0, 0, 'High Executor Anselm',22662), +(23780, 3, 0, 'What fool dares to enter her majesty''s dominion unannounced?', 14, 0, 100, 0, 0, 0, 'High Executor Anselm',22663), +(23780, 4, 0, 'Is that all you''ve come to say?', 12, 0, 100, 0, 0, 0, 'High Executor Anselm',22686), +(24041, 0, 0, 'Arthas is prepared to offer you power beyond your imagination. The puny army you lead here would pale in comparison to the phalanxes at your command if you returned to the Scourge''s embrace.', 12, 0, 100, 0, 0, 0, 'Prince Keleseth',22671), +(24041, 1, 0, 'Behold the Vrykul! A race that has perfected war and destruction to the point of an art form. Already they''ve cast their lot with the Lich King! Their dwellings surround you and their numbers are easily five times yours.', 12, 0, 100, 0, 0, 0, 'Prince Keleseth',22722), +(24041, 2, 0, 'The choice is yours, Anselm. Return to the Lich King''s army and fight alongside them or remain loyal to your so-called queen and suffer their wrath as they drive you from their homelands!', 12, 0, 100, 0, 0, 0, 'Prince Keleseth',22723), +(24041, 3, 0, 'Such a futile gesture.', 12, 0, 100, 0, 0, 0, 'Prince Keleseth',22758), +(24041, 4, 0, 'Listen to your men''s dying breaths as I drink in their souls!', 12, 0, 100, 0, 0, 0, 'Prince Keleseth',22766), +(24041, 5, 0, 'This will not be the last you hear of me. I will return to spit on your corpse after Utgarde''s armies have descended upon you!', 12, 0, 100, 25, 0, 0, 'Prince Keleseth',22764), +(23778, 0, 0, 'Keep them split from their main force!', 14, 0, 100, 0, 0, 0, 'Dark Ranger Lyana',22382), +(23778, 0, 1, 'Cover fire, now!', 14, 0, 100, 0, 0, 0, 'Dark Ranger Lyana',22381), +(23778, 0, 2, 'Keep firing! Cut off their reinforcements!', 14, 0, 100, 0, 0, 0, 'Dark Ranger Lyana',22380), +(24252, 0, 0, 'The foot bone''s connected to the... hip bone! The hip bone''s connected to this... other bone! Hmmmhmmmmhmmm...', 12, 1, 100, 0, 0, 0, '"Hacksaw" Jenny',23066), +(24252, 0, 1, 'It''s hard work putting these things together!', 12, 1, 100, 0, 0, 0, '"Hacksaw" Jenny',23065), +(28313, 0, 0, 'Longrunner, your fodder... err, people will be a valuable resource against the vrykul. Did I say resource? I meant, ''ally.'' ', 12, 1, 100, 25, 0, 0, 'Apothecary Scyllis',27727); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=23780; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(23780, 0, 1, 24041, 1872.434, -6088.859, 16.2164, 4.480728, 1, 120000), +(23780, 0, 1, 24044, 1874.466, -6086.84, 16.18892, 4.502949, 1, 120000), +(23780, 0, 1, 24044, 1869.646, -6086.073, 15.54029, 4.572762, 1, 120000), +(23780, 0, 1, 24044, 1874.853, -6082.172, 15.52153, 4.502949, 1, 120000), +(23780, 0, 1, 24044, 1869.973, -6082.041, 15.13161, 4.572762, 1, 120000), + +(23780, 0, 2, 23883, 1860.395, -6158.918, 23.70322, 1.48353, 1, 120000), +(23780, 0, 2, 23883, 1861.823, -6159.1, 23.71347, 1.518436, 1, 120000), +(23780, 0, 2, 23883, 1863.592, -6159.383, 23.73547, 1.570796, 1, 120000), +(23780, 0, 2, 23883, 1865.439, -6159.756, 23.76573, 1.58825, 1, 120000), +(23780, 0, 2, 23883, 1867.87, -6161.885, 23.78007, 1.64061, 1, 120000), +(23780, 0, 2, 23883, 1865.965, -6161.611, 23.77313, 1.605703, 1, 120000), +(23780, 0, 2, 23883, 1867.106, -6160.068, 23.77399, 1.64061, 1, 120000), +(23780, 0, 2, 23883, 1860.735, -6160.702, 23.73123, 1.64061, 1, 120000), +(23780, 0, 2, 23883, 1862.237, -6161.036, 23.74415, 1.53589, 1, 120000), +(23780, 0, 2, 23883, 1864.234, -6161.245, 23.76622, 1.570796, 1, 120000); + +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`IN(23780,24041,24044,23883,23778,24252,28314); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN(23780,24044,24041,2378000,23883,2404400,2404401,2404402,2404403,23778,24252,28314); +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 +(23778, 0, 0, 0, 1, 0, 100, 0, 0, 45000, 90000, 180000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Dark Ranger Lyana - OOC - Say'), +(24252, 0, 0, 0, 1, 0, 100, 0, 0, 90000, 180000, 360000, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, '"Hacksaw" Jenny - OOC - Say'), +(28314, 0, 0, 0, 19, 0, 100, 0, 12566, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 28313, 0, 0, 0, 0, 0, 0, 'Longrunner Nanik - On Quest Accept (Help for camp Winterhoof) - Say on Apothecary Scyllis'), +(23883, 0, 0, 0, 1, 2, 100, 0, 0, 2000, 2000, 3000, 11, 42905, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Crossbowman - OOC (Phase 2) - Cast Time-Warped Shoot'), +(23883, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Crossbowman - On Data Set - Set Phase 2'), +(23883, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 11, 45254, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Crossbowman - On Data Set - Cast Suicide'), +(23883, 0, 3, 0, 54, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Forsaken Crossbowman - On Just Summoned - Set Passive'), +(23780, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - On Spawn - Set Phase 2'), +(23780, 0, 1, 0, 20, 2, 100, 0, 11234, 0, 0, 0, 80, 2378000, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - On Quest Reward (Report to Anselm) - Run Script'), +(24041, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 53, 0, 24041, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Keleseth - On Just Summoned - Start WP'), +(24041, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Keleseth - On Just Summoned - Set Passive'), +(24041, 0, 2, 0, 40, 0, 100, 0, 2, 24041, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 24044, 0, 200, 0, 0, 0, 0, 'Prince Keleseth - On Just Summoned - Set Data'), +(24041, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 11, 42982, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Keleseth - On Data Set - Cast Vampire Prince Teleport'), +(24041, 0, 4, 0, 38, 0, 100, 0, 2, 2, 0, 0, 11, 43056, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Prince Keleseth - On Data Set - Cast Vampire Soul Retrieve Channel'), +(24044, 0, 5, 0, 38, 0, 100, 0, 3, 3, 0, 0, 11, 43066, 0, 0, 0, 0, 0, 19, 23883, 0, 0, 0, 0, 0, 0, 'Prince Keleseth - On Data Set - Cast Cone of Cold'), +(24044, 0, 0, 0, 38, 0, 100, 0, 1, 1, 0, 0, 87, 2404400,2404401,2404402,2404403, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - On Data Set - Run Random script'), +(24044, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - On Just Summoned - Set Passive'), +(24044, 0, 2, 0, 38, 0, 100, 0, 2, 2, 0, 0, 17, 375, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - On Data Set - Set Emote State STATE_READY2H'), +(2404400, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 2404400, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - Script 1 - Set WP Path 1'), +(2404401, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 2404401, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - Script 2 - Set WP Path 2'), +(2404402, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 2404402, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - Script 3 - Set WP Path 3'), +(2404403, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 53, 0, 2404403, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Winterskorn Guard - Script 4 - Set WP Path 4'), +(2378000, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Phase 1'), +(2378000, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Summon Group 1'), +(2378000, 9, 2, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 107, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Summon Group 2'), +(2378000, 9, 4, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 5, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 6, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 7, 0, 0, 0, 100, 0, 12000, 12000, 0, 0, 1, 2, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 8, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 9, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 23883, 0, 200, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Data on Forsaken Crossbow Man'), +(2378000, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 2, 2, 0, 0, 0, 0, 9, 24044, 0, 200, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Data on Forsaken Crossbow Man'), +(2378000, 9, 11, 0, 0, 0, 100, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 12, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 1, 3, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 13, 0, 0, 0, 100, 0, 9000, 9000, 0, 0, 45, 3, 3, 0, 0, 0, 0, 9, 24044, 0, 200, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Data on Forsaken Crossbow Man'), +(2378000, 9, 14, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 15, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 9, 23883, 0, 200, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Data on Forsaken Crossbow Man'), +(2378000, 9, 16, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 45, 2, 2, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 17, 0, 0, 0, 100, 0, 4000, 4000, 0, 0, 1, 4, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 18, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 1, 5, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Say'), +(2378000, 9, 19, 0, 0, 0, 100, 0, 8000, 8000, 0, 0, 22, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Set Phase 2'), +(2378000, 9, 20, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 19, 24041, 0, 0, 0, 0, 0, 0, 'High Executor Anselm - Script - Despawn Prince Keleseth'), +(2378000, 9, 21, 0, 0, 0, 100, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 9, 24044, 0, 200, 0, 0, 0, 0, 'High Executor Anselm - Script - Despawn Prince Keleseth'); + + +DELETE FROM `waypoints` WHERE `entry` IN(24041,2404400,2404401,2404402,2404403); +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(24041, 1,1869.068, -6103.232, 18.61364, 'Prince Keleseth'), +(24041, 2,1868.818, -6103.982, 18.61364, 'Prince Keleseth'), +(24041, 3,1868.568, -6107.982, 19.11364, 'Prince Keleseth'), +(24041, 4,1868.068, -6111.732, 19.61364, 'Prince Keleseth'), +(24041, 5,1867.818, -6114.482, 20.36364, 'Prince Keleseth'), +(24041, 6,1867.64, -6114.858, 20.70264, 'Prince Keleseth'), +(24041, 7, 1867.64, -6114.858, 20.70264, 'Prince Keleseth'), +(24041, 8,1867.39, -6115.358, 20.70264, 'Prince Keleseth'), +(24041, 9,1866.89, -6118.108, 21.20264, 'Prince Keleseth'), +(24041, 10,1866.64, -6120.108, 21.95264, 'Prince Keleseth'), +(24041, 11,1865.917, -6123.001, 22.53001, 'Prince Keleseth'), +(24041, 12,1865.417, -6128.001, 23.28001, 'Prince Keleseth'), +(2404400, 1,1875.425, -6090.365, 17.16468, 'Winterskorn Guard'), +(2404400, 2,1872.005, -6118.739, 21.11884, 'Winterskorn Guard'), +(2404400, 3,1871.447, -6121.616, 22.15128, 'Winterskorn Guard'), +(2404400, 4,1870.969, -6123.601, 23.02849, 'Winterskorn Guard'), +(2404400, 5,1870.273, -6129.765, 23.70144, 'Winterskorn Guard'), +(2404400, 6,1868.965, -6133.233, 23.70714, 'Winterskorn Guard'), +(2404400, 7,1869.78, -6135.36, 23.69079, 'Winterskorn Guard'), +(2404401, 1,1872.459, -6087.843, 16.14432, 'Winterskorn Guard'), +(2404401, 2,1875.459, -6089.593, 16.89432, 'Winterskorn Guard'), +(2404401, 3,1874.702, -6092.098, 16.92072, 'Winterskorn Guard'), +(2404401, 4,1870.703, -6117.124, 20.66587, 'Winterskorn Guard'), +(2404401, 5,1870.083, -6119.843, 21.78509, 'Winterskorn Guard'), +(2404401, 6,1869.592, -6122.629, 22.48122, 'Winterskorn Guard'), +(2404401, 7,1869.204, -6126.333, 23.55935, 'Winterskorn Guard'), +(2404402, 1,1869.436, -6101.171, 17.9098, 'Winterskorn Guard'), +(2404402, 2,1868.036, -6112.884, 19.76395, 'Winterskorn Guard'), +(2404402, 3,1867.521, -6115.753, 20.59173, 'Winterskorn Guard'), +(2404402, 4,1866.822, -6117.842, 21.29473, 'Winterskorn Guard'), +(2404402, 5,1866.265, -6120.752, 21.82966, 'Winterskorn Guard'), +(2404402, 6,1865.867, -6124.451, 22.92881, 'Winterskorn Guard'), +(2404403, 1,1865.726, -6101.417, 17.51821, 'Winterskorn Guard'), +(2404403, 2,1865.292, -6105.095, 18.34744, 'Winterskorn Guard'), +(2404403, 3,1864.667, -6110.865, 19.50322, 'Winterskorn Guard'), +(2404403, 4,1864.29, -6113.655, 19.8951, 'Winterskorn Guard'), +(2404403, 5,1863.765, -6115.762, 20.65482, 'Winterskorn Guard'), +(2404403, 6,1863.103, -6118.501, 21.33856, 'Winterskorn Guard'), +(2404403, 7,1862.853, -6120.251, 22.08856, 'Winterskorn Guard'), +(2404403, 8,1862.581, -6121.738, 22.45348, 'Winterskorn Guard'), +(2404403, 9,1862.182, -6125.501, 23.30622, 'Winterskorn Guard'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(42905,43066,43055,43053,42982,43056,43054); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 42905, 0, 0, 31, 0, 3, 24044, 0, 0, 0, 0, '', 'Time-Warped Shoot targets Winterskorn Guard'), +(13, 1, 43055, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Soul Retrieve targets Forsaken Crossbowman'), +(13, 1, 43053, 0, 0, 31, 0, 3, 24041, 0, 0, 0, 0, '', 'Vampire Soul Expel targets Prince Keleseth'), +(13, 1, 42982, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Prince Teleport targets Forsaken Crossbowman'), +(13, 1, 43056, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Soul Retrieve channel targets Forsaken Crossbowman'), +(13, 2, 43056, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Soul Retrieve channel targets Forsaken Crossbowman'), +(13, 1, 43054, 0, 0, 31, 0, 3, 24041, 0, 0, 0, 0, '', 'Vampire Soul Expel Channeltargets Prince Keleseth'); -- cgit v1.2.3 From 5b363992ff26c33de4f797ea83d831e815901e33 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 19 Sep 2014 01:48:48 +0100 Subject: DB/Gossip: Proenitus Closes #13165 --- sql/updates/world/2014_09_19_00_world_gossip.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2014_09_19_00_world_gossip.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_19_00_world_gossip.sql b/sql/updates/world/2014_09_19_00_world_gossip.sql new file mode 100644 index 00000000000..f5b63aeb540 --- /dev/null +++ b/sql/updates/world/2014_09_19_00_world_gossip.sql @@ -0,0 +1,14 @@ +-- Proenitus, Azuremyst Isle +UPDATE `creature_template` SET `gossip_menu_id`=7305 WHERE `entry`=16477; +-- 8667 before quest 9280 or 9369 is completed, 8669 after quest 9280 or 9369 is completed +DELETE FROM `gossip_menu` WHERE `entry`=7305; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(7305,8667), +(7305,8669); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=7305; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14, 7305, 8669, 0, 0, 8, 0, 9280, 0, 0, 0, 0, 0, '', 'Proenitus - Show Gossip Text only if Replenishing the Healing Crystals rewarded - or'), +(14, 7305, 8669, 0, 1, 8, 0, 9369, 0, 0, 0, 0, 0, '', 'Proenitus - Show Gossip Text only if Replenishing the Healing Crystals rewarded - or'), +(14, 7305, 8667, 0, 0, 8, 0, 9280, 0, 0, 1, 0, 0, '', 'Proenitus - Show Gossip Text only if Replenishing the Healing Crystals not rewarded - and'), +(14, 7305, 8667, 0, 0, 8, 0, 9369, 0, 0, 1, 0, 0, '', 'Proenitus - Show Gossip Text only if Replenishing the Healing Crystals not rewarded'); -- cgit v1.2.3 From bb5becaffc52f83c2d33705d0a8d609fc351264f Mon Sep 17 00:00:00 2001 From: Malcrom Date: Thu, 18 Sep 2014 23:42:41 -0230 Subject: DB/Misc: Some misc fixes for Northrend. Mostly fix flight speed of some npcs. --- sql/updates/world/2014_09_19_01_world_misc.sql | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sql/updates/world/2014_09_19_01_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_19_01_world_misc.sql b/sql/updates/world/2014_09_19_01_world_misc.sql new file mode 100644 index 00000000000..5b62b07a6db --- /dev/null +++ b/sql/updates/world/2014_09_19_01_world_misc.sql @@ -0,0 +1,25 @@ +-- Reanimated Frost Wyrm SAI +SET @ENTRY := 26841; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,0,0,100,0,0,0,5000,7000,11,47425,64,0,0,0,0,2,0,0,0,0,0,0,0,"Reanimated Frost Wyrm - In Combat CMC - Cast 'Frost Breath'"); + +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1169630, 1169640, 1169650, 1169660, 1169670, 1169680, 1169740, 1169750, 1169760, 1169770, 1169780, 1169790, 1169800, 1169810, 1169820, 1169910, 1169920, 1169930, 1170010, 1170020, 1170030, 1170040, 1170050, 1170060, 1170070, 1170190, 1170220, 1170230, 1170480, 1170490, 1170500, 1170510, 1170520, 1170530, 1170550, 1170560); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1311770, 1311780, 1099150, 1099160, 1099270, 1158790); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1081500, 1081510, 1081520, 1081550, 1081560, 1081580); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (971330, 971340, 971350, 971390, 971400, 1076260); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1181900, 1181890, 1181860, 1181850, 1181880); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (404970, 404980, 404990, 405000, 405010, 405020, 405030, 405040, 405050, 1124010); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1033880, 1033910, 1033940, 1033960, 1033980, 1034000, 1034030, 1034110); +UPDATE `waypoint_data` SET `move_type`=1 WHERE `id` IN (1311770,1311780); + +UPDATE `creature` SET `spawndist`=0, `MovementType`=0 WHERE id IN (26175); + +UPDATE `creature_addon` SET bytes1=50331648 WHERE `guid`=118406; +UPDATE `creature_template_addon` SET bytes1=0, bytes2=1 WHERE `entry` IN (728, 731, 3862, 9696, 10200, 11361, 30219); + +DELETE FROM `creature_equip_template` WHERE `entry`=27361; +INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`,`VerifiedBuild`) VALUES +(27361, 1, 35312, 0, 0, 12340), +(27361, 2, 1903, 0, 0, 12340); -- cgit v1.2.3 From d672e78a5b7a98f4b58936a0bd1c948028005dc0 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 19 Sep 2014 13:47:25 +0100 Subject: DB/Misc: Various Fixes * Noggenfogger Elixir - Fix by @Rushor Closes #13041 * Sprinkle's Secret Ingredient - Fix by @Rushor Closes #13040 * Xavian Satyrs - Fix by @Rushor Closes #12965 * Icepaw Bear / Tails up - Closes #13030 --- sql/updates/world/2014_09_19_02_world_misc.sql | 77 ++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sql/updates/world/2014_09_19_02_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_19_02_world_misc.sql b/sql/updates/world/2014_09_19_02_world_misc.sql new file mode 100644 index 00000000000..ea0a57583ab --- /dev/null +++ b/sql/updates/world/2014_09_19_02_world_misc.sql @@ -0,0 +1,77 @@ +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN(43055,43053,43056,43054); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 2, 43056, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Soul Retrieve channel targets Forsaken Crossbowman'), +(13, 4, 43056, 0, 0, 31, 0, 3, 23883, 0, 0, 0, 0, '', 'Vampire Soul Retrieve channel targets Forsaken Crossbowman'); + +-- Marin Noggenfogger SAI +SET @ENTRY := 7564; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,20,0,100,0,2662,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Marin Noggenfogger - On Quest '2662' Finished - Run Script"); + +-- Actionlist SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 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 +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Marin Noggenfogger - On Script - Remove Npc Flag Questgiver"), +(@ENTRY*100,9,1,0,0,0,100,0,500,500,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Marin Noggenfogger - On Script - Say Line 0"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,5,432,0,0,0,0,0,1,0,0,0,0,0,0,0,"Marin Noggenfogger - On Script - Play Emote 432"), +(@ENTRY*100,9,3,0,0,0,100,0,5000,5000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Marin Noggenfogger - On Script - Add Npc Flag Questgiver"); + +DELETE FROM `creature_text` WHERE `entry`=7564; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(7564, 0, 0, 'I''m going to carefully mix this - oops! ...Well, I spilled a little, but it''s ready!', 12, 0, 100, 0, 0, 0, 'Marin Noggenfogger', 4548); + +-- Sprinkle SAI +SET @ENTRY := 7583; +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY 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 +(@ENTRY,0,0,0,20,0,100,0,2641,0,0,0,80,@ENTRY*100+00,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Quest '' Finished - Run Script"); + +-- Actionlist SAI +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY*100 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 +(@ENTRY*100,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Remove Npc Flag Questgiver"), +(@ENTRY*100,9,1,0,0,0,100,0,500,500,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Say Line 0"), +(@ENTRY*100,9,2,0,0,0,100,0,0,0,0,0,5,432,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Play Emote 432"), +(@ENTRY*100,9,3,0,0,0,100,0,5000,5000,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Sprinkle - On Script - Add Npc Flag Questgiver"); + +DELETE FROM `creature_text` WHERE `entry`=7583; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES +(7583, 0, 0, 'Just sit tight while i get this prepared for you!', 12, 0, 100, 0, 0, 0, 'Sprinkle', 3661); + +UPDATE `smart_scripts` SET `event_type`=11 WHERE `entryorguid`=29327 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `link`=4 WHERE `entryorguid`=29327 AND `source_type`=0 AND `id`=3 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=29327 AND `source_type`=0 AND `id`=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`, `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 +(29327, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 180000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frost Leopard - On Gossip Option 0 Selected - Despawn After 3 mins'); +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry`=29319; + +UPDATE `smart_scripts` SET `event_type`=11 WHERE `entryorguid`=29319 AND `source_type`=0 AND `id`=1 AND `link`=0; +UPDATE `smart_scripts` SET `link`=4 WHERE `entryorguid`=29319 AND `source_type`=0 AND `id`=3 AND `link`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=29319 AND `source_type`=0 AND `id`=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`, `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 +(29319, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 41, 180000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Icepaw Bear - On Gossip Option 0 Selected - Despawn After 3 mins'); + +UPDATE `creature_template` SET `unit_flags`=262400 WHERE `entry`=33007; +UPDATE `creature_template` SET `unit_flags`=262400 WHERE `entry`=33008; +UPDATE `creature_template` SET `unit_flags`=32768 WHERE `entry`=29319; + +DELETE FROM `creature_template_addon` WHERE `entry` IN(33007,33008,29319); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(33007, 0, 0x0, 0x1, '42386'), -- 33007 - 42386 +(33008, 0, 0x0, 0x1, '54240 42386'), -- 33008 - 54240, 42386 +(29319, 0, 0x0, 0x1, '54240'); -- 29319 - 54240 + +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN(2932701,2932703,2931901,2931903) AND `id`=2; + +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 +(2932701, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 19, 262400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frost Leopard - On Script - Remove Unit Flags'), +(2932703, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 19, 262400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Frost Leopard - On Script - Remove Unit Flags'), +(2931901, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 19, 262400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Icepaw Bear - On Script - Remove Unit Flags'), +(2931903, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 19, 262400, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Icepaw Bear - On Script - Remove Unit Flags'); + +UPDATE `smart_scripts` SET `event_param3`=12000, `event_param4`=19000 WHERE `entryorguid`=3752 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=12000, `event_param4`=19000 WHERE `entryorguid`=3755 AND `id`=2; +UPDATE `smart_scripts` SET `event_param3`=12000, `event_param4`=19000 WHERE `entryorguid`=3754 AND `id`=2; -- cgit v1.2.3 From 72dcd95015fcd4009c2b2d7c660705c52ec8dfe6 Mon Sep 17 00:00:00 2001 From: Dr-J Date: Fri, 19 Sep 2014 17:20:31 +0100 Subject: DB/Misc: Medical Supplies / Sunhawk Reclaimer * Spawn Missing Medical Supplies http://www.wowhead.com/object=181898/medical-supplies * Script Sunhawk Reclaimer --- sql/updates/world/2014_09_19_03_world_misc.sql | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sql/updates/world/2014_09_19_03_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_19_03_world_misc.sql b/sql/updates/world/2014_09_19_03_world_misc.sql new file mode 100644 index 00000000000..d7c11d07cac --- /dev/null +++ b/sql/updates/world/2014_09_19_03_world_misc.sql @@ -0,0 +1,42 @@ +SET @OGUID := 75983; + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=17606; +DELETE FROM `smart_scripts` WHERE `entryorguid`=17606 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 +(17606,0,0,0,1,0,100,0,0,0,300000,600000,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sunhawk Reclaimer - OOC - Cast Frost Armor'), +(17606,0,1,0,4,0,100,0,0,0,0,0,11,12544,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sunhawk Reclaimer - On Agro - Cast Frost Armor'), +(17606,0,2,0,0,0,100,0,0,3000,4500,5000,11,19816,64,0,0,0,0,2,0,0,0,0,0,0,0,'Sunhawk Reclaimer - IC - Cast Fireball'); + +DELETE FROM `gameobject` WHERE `id`=181898; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+00, 181898, 530, 1, 1, -2128.94, -11347.78, 63.18245, 5.846854, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+01, 181898, 530, 1, 1, -2090.865, -11338.04, 62.10437, 0.8726639, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+02, 181898, 530, 1, 1, -2114.608, -11316.94, 63.31125, 2.635444, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+03, 181898, 530, 1, 1, -2102.472, -11289.79, 63.27425, 5.462882, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+04, 181898, 530, 1, 1, -2094.636, -11376.86, 63.56096, 2.583081, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+05, 181898, 530, 1, 1, -2158.835, -11376.7, 65.99394, 4.363324, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+06, 181898, 530, 1, 1, -2144.111, -11395.16, 68.00031, 1.378809, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+07, 181898, 530, 1, 1, -2108.114, -11325.42, 63.28682, 3.019413, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+08, 181898, 530, 1, 1, -2055.864, -11367.56, 63.91008, 1.431168, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+09, 181898, 530, 1, 1, -2074.024, -11286.16, 65.40942, 5.235988, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+10, 181898, 530, 1, 1, -2050.685, -11284.97, 67.24374, 2.164206, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+11, 181898, 530, 1, 1, -2092.109, -11241.65, 68.33092, 3.054327, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+12, 181898, 530, 1, 1, -2047.771, -11247.62, 78.15426, 3.455756, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+13, 181898, 530, 1, 1, -2093.055, -11278.73, 64.95576, 2.82743, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+14, 181898, 530, 1, 1, -2072.344, -11255.33, 68.58928, 6.021387, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+15, 181898, 530, 1, 1, -2136.231, -11360.67, 63.38724, 3.403396, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+16, 181898, 530, 1, 1, -2005.523, -11315.54, 62.96782, 2.321287, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+17, 181898, 530, 1, 1, -2014.982, -11348.47, 65.60223, 3.892087, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+18, 181898, 530, 1, 1, -2090.292, -11311.16, 63.29559, 1.221729, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+19, 181898, 530, 1, 1, -2075.02, -11326.98, 62.18038, 0.4014249, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+20, 181898, 530, 1, 1, -2072.561, -11347.09, 62.11678, 0.9250238, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+21, 181898, 530, 1, 1, -2036.568, -11329.65, 66.35213, 0.9599299, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+22, 181898, 530, 1, 1, -2106.364, -11361.37, 63.50148, 2.844883, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+23, 181898, 530, 1, 1, -2057.144, -11409.91, 57.81938, 4.607672, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+24, 181898, 530, 1, 1, -2116.335, -11416.35, 66.44828, 2.652894, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+25, 181898, 530, 1, 1, -2126.774, -11243.78, 66.18503, 5.480334, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+26, 181898, 530, 1, 1, -2108.323, -11212.03, 78.05769, 1.692969, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+27, 181898, 530, 1, 1, -2121.754, -11306.33, 63.27412, 4.921829, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+28, 181898, 530, 1, 1, -2073.555, -11372.19, 63.8179, 3.124123, 0, 0, 0, 1, 120, 255, 1), -- 181898 (Area: 3525) +(@OGUID+29, 181898, 530, 1, 1, -2103.406, -11396.29, 63.33431, 6.126106, 0, 0, 0, 1, 120, 255, 1); -- 181898 (Area: 3525) -- cgit v1.2.3 From 09f9f3b6b12545e603cca4ef9c50b5415dca9d9a Mon Sep 17 00:00:00 2001 From: DDuarte Date: Fri, 19 Sep 2014 18:17:48 +0100 Subject: SQL: Update dev/world_database.sql --- sql/base/dev/world_database.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sql') diff --git a/sql/base/dev/world_database.sql b/sql/base/dev/world_database.sql index 72faba49b8b..fd711888814 100644 --- a/sql/base/dev/world_database.sql +++ b/sql/base/dev/world_database.sql @@ -620,8 +620,9 @@ CREATE TABLE `creature_text` ( `emote` mediumint(8) unsigned NOT NULL DEFAULT '0', `duration` mediumint(8) unsigned NOT NULL DEFAULT '0', `sound` mediumint(8) unsigned NOT NULL DEFAULT '0', + `BroadcastTextId` mediumint(6) NOT NULL DEFAULT '0', + `TextRange` tinyint(3) unsigned NOT NULL DEFAULT '0', `comment` varchar(255) DEFAULT '', - `BroadcastTextID` mediumint(6) NOT NULL DEFAULT '0', PRIMARY KEY (`entry`,`groupid`,`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -983,7 +984,7 @@ CREATE TABLE `game_tele` ( `map` smallint(5) unsigned NOT NULL DEFAULT '0', `name` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=1424 DEFAULT CHARSET=utf8 COMMENT='Tele Command'; +) ENGINE=MyISAM AUTO_INCREMENT=1425 DEFAULT CHARSET=utf8 COMMENT='Tele Command'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3634,4 +3635,4 @@ CREATE TABLE `waypoints` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2014-08-27 14:06:19 +-- Dump completed on 2014-09-19 18:15:42 -- cgit v1.2.3 From eeaf7ef6fab3765d2d5b383541d72cf1235d442f Mon Sep 17 00:00:00 2001 From: DDuarte Date: Fri, 19 Sep 2014 18:42:09 +0100 Subject: Revert "SQL: Update dev/world_database.sql" This reverts commit 09f9f3b6b12545e603cca4ef9c50b5415dca9d9a. I forgot that world_database.sql should only get updated in TDB releases. --- sql/base/dev/world_database.sql | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sql') diff --git a/sql/base/dev/world_database.sql b/sql/base/dev/world_database.sql index fd711888814..72faba49b8b 100644 --- a/sql/base/dev/world_database.sql +++ b/sql/base/dev/world_database.sql @@ -620,9 +620,8 @@ CREATE TABLE `creature_text` ( `emote` mediumint(8) unsigned NOT NULL DEFAULT '0', `duration` mediumint(8) unsigned NOT NULL DEFAULT '0', `sound` mediumint(8) unsigned NOT NULL DEFAULT '0', - `BroadcastTextId` mediumint(6) NOT NULL DEFAULT '0', - `TextRange` tinyint(3) unsigned NOT NULL DEFAULT '0', `comment` varchar(255) DEFAULT '', + `BroadcastTextID` mediumint(6) NOT NULL DEFAULT '0', PRIMARY KEY (`entry`,`groupid`,`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -984,7 +983,7 @@ CREATE TABLE `game_tele` ( `map` smallint(5) unsigned NOT NULL DEFAULT '0', `name` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=1425 DEFAULT CHARSET=utf8 COMMENT='Tele Command'; +) ENGINE=MyISAM AUTO_INCREMENT=1424 DEFAULT CHARSET=utf8 COMMENT='Tele Command'; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3635,4 +3634,4 @@ CREATE TABLE `waypoints` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2014-09-19 18:15:42 +-- Dump completed on 2014-08-27 14:06:19 -- cgit v1.2.3 From 050d56ac21fff48d260908e72e430f212e1d770d Mon Sep 17 00:00:00 2001 From: Malcrom Date: Fri, 19 Sep 2014 16:53:40 -0230 Subject: DB/Misc: Proper spawning and pathing of Stormpeak Wyrm --- sql/updates/world/2014_09_19_04_world_misc.sql | 279 +++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 sql/updates/world/2014_09_19_04_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2014_09_19_04_world_misc.sql b/sql/updates/world/2014_09_19_04_world_misc.sql new file mode 100644 index 00000000000..905320a0a72 --- /dev/null +++ b/sql/updates/world/2014_09_19_04_world_misc.sql @@ -0,0 +1,279 @@ +-- Stormpeak Wyrm proper spawning and waypoints + +DELETE FROM `creature` WHERE `guid` IN (101053,101062,101074,101075,101077,101116,101087); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(101053,29753,571,1,1,7452.299,-1354.762,942.6544,1.972222,120,0,0), +(101062,29753,571,1,1,7236.676,-1416.466,931.475,0.1919862,120,0,0), +(101074,29753,571,1,1,7353.788,-1644.01,1141.247,1.745329,120,0,0), +(101075,29753,571,1,1,7248.159,-1659.583,1080.83,1.099557,120,0,0), +(101077,29753,571,1,1,6998.847,-1445.083,984.7883,6.126106,120,0,0), +(101116,29753,571,1,1,7144.828,-1255.926,1100.343,5.77704,120,0,0), +(101087,29753,571,1,1,7135.227,-1283.292,1091.594,5.72468,120,0,0); + +UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=7584.947,`position_y`=-1634.492,`position_z`=1212.406,`orientation`=2.059489 WHERE `guid`=101123; +UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=7694.302,`position_y`=-1493.291,`position_z`=1177.766,`orientation`=2.70526 WHERE `guid`=101124; +UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=7596.796,`position_y`=-1506.441,`position_z`=1053.565,`orientation`=2.199115 WHERE `guid`=101125; +UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=7684.877,`position_y`=-1422.165,`position_z`=1176.521,`orientation`=2.80998 WHERE `guid`=101126; +UPDATE `creature` SET `spawndist`=0,`MovementType`=0,`position_x`=7477.212,`position_y`=-1534.251,`position_z`=1038.112,`orientation`=2.146755 WHERE `guid`=101127; + +DELETE FROM `creature_addon` WHERE `guid` IN (101123,101124,101125,101126,101127,101053,101062,101074,101075,101077,101116,101087); +INSERT INTO `creature_addon` (`guid`,`bytes1`,`bytes2`,`auras`) VALUES +(101123,50331649,1, ''),(101124,50331649,1, ''),(101125,50331649,1, ''),(101126,50331649,1, ''),(101127,50331649,1, ''),(101053,50331649,1, ''), +(101062,50331649,1, ''),(101074,50331649,1, ''),(101075,50331649,1, ''),(101077,50331649,1, ''),(101116,50331649,1, ''),(101087,50331649,1, ''); + +DELETE FROM `waypoint_data` WHERE `id` IN (1011090,1011110,1011120,1011210,1011230,1011240); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101000; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7501.124,`position_y`=-1449.262,`position_z`=1017.798 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7501.124,-1449.262,1017.798,0,0,1,0,100,0), +(@PATH,2,7376.508,-1303.557,1049.854,0,0,1,0,100,0), +(@PATH,3,7325.549,-1146.471,1046.354,0,0,1,0,100,0), +(@PATH,4,7422.022,-1135.82,1033.438,0,0,1,0,100,0), +(@PATH,5,7518.522,-1237.663,1056.826,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101107; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7286.94,`position_y`=-1422.521,`position_z`=978.0876 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7286.94,-1422.521,978.0876,0,0,1,0,100,0), +(@PATH,2,7141.904,-1431.155,978.0876,0,0,1,0,100,0), +(@PATH,3,7141.696,-1557.372,978.0876,0,0,1,0,100,0), +(@PATH,4,7391.402,-1533.6,1071.171,0,0,1,0,100,0), +(@PATH,5,7711.191,-1351.858,1194.367,0,0,1,0,100,0), +(@PATH,6,7616.785,-1342.911,1117.866,0,0,1,0,100,0), +(@PATH,7,7441.751,-1377.483,985.6154,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101108; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7451.667,`position_y`=-1273.214,`position_z`=958.2651 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7451.667,-1273.214,958.2651,0,0,1,0,100,0), +(@PATH,2,7438.734,-1387.923,990.5983,0,0,1,0,100,0), +(@PATH,3,7339.777,-1394.429,954.5706,0,0,1,0,100,0), +(@PATH,4,7277.429,-1311.084,941.7929,0,0,1,0,100,0), +(@PATH,5,7389.834,-1218.347,954.5706,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101109; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7361.022,`position_y`=-1158.353,`position_z`=980.812 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7361.022,-1158.353,980.812,0,0,1,0,100,0), +(@PATH,2,7505.094,-1216.21,980.812,0,0,1,0,100,0), +(@PATH,3,7458.424,-1438.003,1005.173,0,0,1,0,100,0), +(@PATH,4,7528.125,-1725.565,1300.173,0,0,1,0,100,0), +(@PATH,5,7422.311,-1569.981,1141.312,0,0,1,0,100,0), +(@PATH,6,7330.956,-1412.603,980.812,0,0,1,0,100,0), +(@PATH,7,7303.932,-1283.664,980.812,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101110; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7468.895,`position_y`=-1421.992,`position_z`=1035.363 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7468.895,-1421.992,1035.363,0,0,1,0,100,0), +(@PATH,2,7499.714,-1349.263,1035.363,0,0,1,0,100,0), +(@PATH,3,7436.533,-1280.687,1035.363,0,0,1,0,100,0), +(@PATH,4,7396.054,-1281.403,1035.363,0,0,1,0,100,0), +(@PATH,5,7298.188,-1334.745,1035.363,0,0,1,0,100,0), +(@PATH,6,7306.776,-1409.522,1035.363,0,0,1,0,100,0), +(@PATH,7,7403.804,-1456.458,1035.363,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101111; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7146.302,`position_y`=-1430.093,`position_z`=1026.784 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7146.302,-1430.093,1026.784,0,0,1,0,100,0), +(@PATH,2,7277.046,-1312.483,941.7841,0,0,1,0,100,0), +(@PATH,3,7350.68,-1247.736,932.9788,0,0,1,0,100,0), +(@PATH,4,7462.04,-1145.189,1073.34,0,0,1,0,100,0), +(@PATH,5,7534.368,-1192.623,1109.757,0,0,1,0,100,0), +(@PATH,6,7491.979,-1297.336,1075.256,0,0,1,0,100,0), +(@PATH,7,7435.823,-1388.198,963.8117,0,0,1,0,100,0), +(@PATH,8,7374.318,-1466.145,951.8396,0,0,1,0,100,0), +(@PATH,9,7270.311,-1513.188,983.5063,0,0,1,0,100,0), +(@PATH,10,7186.261,-1542.495,999.2841,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101112; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7265.552,`position_y`=-1393.914,`position_z`=944.9113 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7265.552,-1393.914,944.9113,0,0,1,0,100,0), +(@PATH,2,7286.167,-1323.842,960.5223,0,0,1,0,100,0), +(@PATH,3,7397.717,-1365.071,953.9946,0,0,1,0,100,0), +(@PATH,4,7411.863,-1480.148,974.6611,0,0,1,0,100,0), +(@PATH,5,7293.046,-1491.665,952.7723,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101113; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7415.385,`position_y`=-1216.037,`position_z`=904.5762 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7415.385,-1216.037,904.5762,0,0,1,0,100,0), +(@PATH,2,7414.542,-1215.5,904.5762,0,0,1,0,100,0), +(@PATH,3,7133.187,-1316.918,1033.504,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101114; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7325.963,`position_y`=-1333.517,`position_z`=1030.937 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7325.963,-1333.517,1030.937,0,0,1,0,100,0), +(@PATH,2,7292.63,-1292.261,1030.937,0,0,1,0,100,0), +(@PATH,3,7242.074,-1296.146,1030.937,0,0,1,0,100,0), +(@PATH,4,7221.022,-1309.755,1030.937,0,0,1,0,100,0), +(@PATH,5,7184.733,-1362.635,1030.937,0,0,1,0,100,0), +(@PATH,6,7258.752,-1422.953,1030.937,0,0,1,0,100,0), +(@PATH,7,7322.385,-1391.359,1030.937,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101115; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7324.458,`position_y`=-1450.861,`position_z`=1008.698 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7324.458,-1450.861,1008.698,0,0,1,0,100,0), +(@PATH,2,7325.36,-1451.292,1008.698,0,0,1,0,100,0), +(@PATH,3,7386.206,-1228.145,918.316,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101117; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7136.357,`position_y`=-1325.542,`position_z`=1034.863 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7136.357,-1325.542,1034.863,0,0,1,0,100,0), +(@PATH,2,7135.358,-1325.567,1034.863,0,0,1,0,100,0), +(@PATH,3,7313.184,-1221.475,952.9126,0,0,1,0,100,0), +(@PATH,4,7282.429,-1268.767,952.9125,0,0,1,0,100,0), +(@PATH,5,7309.16,-1330.981,952.9125,0,0,1,0,100,0), +(@PATH,6,7367.971,-1345.04,952.9125,0,0,1,0,100,0), +(@PATH,7,7421.329,-1313.719,952.9125,0,0,1,0,100,0), +(@PATH,8,7452.836,-1261.122,952.9125,0,0,1,0,100,0), +(@PATH,9,7428.057,-1204.526,952.9125,0,0,1,0,100,0), +(@PATH,10,7386.783,-1192.458,952.9125,0,0,1,0,100,0), +(@PATH,11,7339.101,-1202.982,952.9125,0,0,1,0,100,0), +(@PATH,12,7313.184,-1221.475,952.9126,0,0,1,0,100,0), +(@PATH,13,7282.429,-1268.767,952.9125,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101118; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7232.853,`position_y`=-1552.436,`position_z`=1018.612 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7232.853,-1552.436,1018.612,0,0,1,0,100,0), +(@PATH,2,7307.723,-1450.282,1031.335,0,0,1,0,100,0), +(@PATH,3,7331.675,-1329.285,1071.668,0,0,1,0,100,0), +(@PATH,4,7358.584,-1200.453,1095.084,0,0,1,0,100,0), +(@PATH,5,7466.604,-1189.773,1087.835,0,0,1,0,100,0), +(@PATH,6,7551.937,-1306.039,1036.918,0,0,1,0,100,0), +(@PATH,7,7448.903,-1429.033,989.2788,0,0,1,0,100,0), +(@PATH,8,7265.264,-1460.603,924.7513,0,0,1,0,100,0), +(@PATH,9,7092.603,-1462.597,1039.613,0,0,1,0,100,0), +(@PATH,10,6996.566,-1627.143,1060.558,0,0,1,0,100,0), +(@PATH,11,7050.83,-1759.601,1026.474,0,0,1,0,100,0), +(@PATH,12,7171.794,-1623.425,1024.391,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101119; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7259.109,`position_y`=-1469.671,`position_z`=987.5555 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7259.109,-1469.671,987.5555,0,0,1,0,100,0), +(@PATH,2,7301.777,-1415.748,987.5555,0,0,1,0,100,0), +(@PATH,3,7272.482,-1346.15,987.5555,0,0,1,0,100,0), +(@PATH,4,7209.799,-1353.067,987.5555,0,0,1,0,100,0), +(@PATH,5,7162.837,-1385.03,987.5555,0,0,1,0,100,0), +(@PATH,6,7167.143,-1445.456,987.5555,0,0,1,0,100,0), +(@PATH,7,7194.672,-1478.044,987.5555,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101120; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7327.854,`position_y`=-1587.84,`position_z`=1019.788 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7327.854,-1587.84,1019.788,0,0,1,0,100,0), +(@PATH,2,7289.005,-1581.716,1019.788,0,0,1,0,100,0), +(@PATH,3,7237.962,-1537.732,1019.788,0,0,1,0,100,0), +(@PATH,4,7256.116,-1485.327,1019.788,0,0,1,0,100,0), +(@PATH,5,7329.179,-1461.23,1019.788,0,0,1,0,100,0), +(@PATH,6,7373.025,-1497.708,1019.788,0,0,1,0,100,0), +(@PATH,7,7376.84,-1544.165,1019.788,0,0,1,0,100,0), +(@PATH,8,7361.692,-1568.81,1019.788,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101121; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7199.313,`position_y`=-1325.969,`position_z`=978.4598 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7199.313,-1325.969,978.4598,0,0,1,0,100,0), +(@PATH,2,7170.299,-1447.351,1015.265,0,0,1,0,100,0), +(@PATH,3,7248.966,-1581.538,1015.265,0,0,1,0,100,0), +(@PATH,4,7413.176,-1485.288,1031.738,0,0,1,0,100,0), +(@PATH,5,7400.03,-1300.325,978.4598,0,0,1,0,100,0), +(@PATH,6,7290.922,-1270.148,1009.015,0,0,1,0,100,0); + +-- Pathing for Stormpeak Wyrm Entry: 29753 +SET @NPC := 101122; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=7202.806,`position_y`=-1459.161,`position_z`=960.2362 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes1`,`bytes2`,`auras`) VALUES (@NPC,@PATH,50331648,1, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_type`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,7202.806,-1459.161,960.2362,0,0,1,0,100,0), +(@PATH,2,7251.087,-1367.685,984.6526,0,0,1,0,100,0), +(@PATH,3,7332.536,-1407.866,956.3196,0,0,1,0,100,0), +(@PATH,4,7354.014,-1492.446,984.6526,0,0,1,0,100,0), +(@PATH,5,7307.592,-1550.958,984.6525,0,0,1,0,100,0), +(@PATH,6,7252.655,-1530.636,984.6526,0,0,1,0,100,0); -- cgit v1.2.3