diff --git a/data/sql/updates/db_world/2023_04_12_00.sql b/data/sql/updates/db_world/2023_04_12_00.sql new file mode 100644 index 000000000..3c7e6d5a4 --- /dev/null +++ b/data/sql/updates/db_world/2023_04_12_00.sql @@ -0,0 +1,18 @@ +-- DB update 2023_04_09_12 -> 2023_04_12_00 +-- ID 20985 (Captain Saeed) +DELETE FROM `gossip_menu_option` WHERE `MenuID` = 8228; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(8228, 0, 0, 'I am that fleshling, Saeed. Let\'s go!', 18639, 0, 1, 0, 0, 0, 0, '', 0, 0), +(8228, 1, 0, 'I am ready. Let\'s make history!', 18641, 0, 1, 0, 0, 0, 0, '', 0, 0); + +-- ID 20907 (Professor Dabiri) +UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 20907; +DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20907); +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(20907, 0, 0, 1, 62, 0, 100, 0, 8207, 0, 0, 0, 0, 85, 35780, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Professor Dabiri - On Gossip Option 0 Selected - Invoker Cast \'Summon Phase Disruptor\''), +(20907, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Professor Dabiri - On Gossip Option 0 Selected - Close Gossip'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=8207; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 8207, 0, 0, 0, 2, 0, 29778, 1, 0, 1, 0, 0, '', '(AND) Professor Dabiri - Show gossip option 0 if item 29778 is NOT in inventory.'), +(15, 8207, 0, 0, 0, 47, 0, 10438, 10, 0, 0, 0, 0, '', '(AND) Professor Dabiri - Show gossip option 0 if quest 10438 is complete or incomplete.'); diff --git a/data/sql/updates/db_world/2023_04_12_01.sql b/data/sql/updates/db_world/2023_04_12_01.sql new file mode 100644 index 000000000..4e181ac94 --- /dev/null +++ b/data/sql/updates/db_world/2023_04_12_01.sql @@ -0,0 +1,6 @@ +-- DB update 2023_04_12_00 -> 2023_04_12_01 +-- Add spell script to database for 63471 - Spawn Blood Pool +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_spawn_blood_pool'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(63471, 'spell_spawn_blood_pool'); + diff --git a/data/sql/updates/db_world/2023_04_12_02.sql b/data/sql/updates/db_world/2023_04_12_02.sql new file mode 100644 index 000000000..8e223d5b9 --- /dev/null +++ b/data/sql/updates/db_world/2023_04_12_02.sql @@ -0,0 +1,2 @@ +-- DB update 2023_04_12_01 -> 2023_04_12_02 +DELETE FROM `creature_loot_template` WHERE `Item` = 21855 AND `Entry` IN (17796,20630); diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp index 06526c199..2f615ec50 100644 --- a/src/server/scripts/Outland/zone_netherstorm.cpp +++ b/src/server/scripts/Outland/zone_netherstorm.cpp @@ -15,20 +15,6 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Netherstorm -SD%Complete: 80 -SDComment: Quest support: 10337, 10438, 10652 (special flight paths), 10198, 10191 -SDCategory: Netherstorm -EndScriptData */ - -/* ContentData -npc_commander_dawnforge -npc_bessy -npc_maxx_a_million -go_captain_tyralius_prison -EndContentData */ - #include "GameObjectAI.h" #include "Player.h" #include "ScriptMgr.h" @@ -59,7 +45,11 @@ enum saeed QUEST_DIMENSIUS_DEVOURING = 10439, - SPELL_DIMENSIUS_TRANSFORM = 35939 + SPELL_DIMENSIUS_TRANSFORM = 35939, + + GOSSIP_MENU_SAEED = 8228, + TEXT_NPC_SAEED_DEFAULT = 10229, + TEXT_NPC_SAEED_START_FIGHT = 10232, }; class npc_captain_saeed : public CreatureScript @@ -280,12 +270,12 @@ public: if (player->GetQuestStatus(QUEST_DIMENSIUS_DEVOURING) == QUEST_STATUS_INCOMPLETE) { if (!creature->AI()->GetData(1)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's move out.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + AddGossipItemFor(player, GOSSIP_MENU_SAEED, 0, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); else - AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Let's start the battle.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + AddGossipItemFor(player, GOSSIP_MENU_SAEED, 1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); } - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); + SendGossipMenuFor(player, creature->AI()->GetData(1) ? TEXT_NPC_SAEED_START_FIGHT : TEXT_NPC_SAEED_DEFAULT, creature->GetGUID()); return true; } @@ -587,56 +577,6 @@ public: } }; -/*###### -## npc_professor_dabiri -######*/ -enum ProfessorDabiriData -{ - SPELL_PHASE_DISTRUPTOR = 35780, - - //WHISPER_DABIRI = 0, not existing in database - - QUEST_DIMENSIUS = 10439, - QUEST_ON_NETHERY_WINGS = 10438, -}; - -#define GOSSIP_ITEM "I need a new phase distruptor, Professor" - -class npc_professor_dabiri : public CreatureScript -{ -public: - npc_professor_dabiri() : CreatureScript("npc_professor_dabiri") { } - - //OnQuestAccept: - //if (quest->GetQuestId() == QUEST_DIMENSIUS) - //creature->AI()->Talk(WHISPER_DABIRI, player); - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - ClearGossipMenuFor(player); - if (action == GOSSIP_ACTION_INFO_DEF + 1) - { - creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false); - CloseGossipMenuFor(player); - } - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) override - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778)) - AddGossipItemFor(player, GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - - SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID()); - - return true; - } -}; - /*###### ## npc_phase_hunter ######*/ @@ -979,7 +919,6 @@ void AddSC_netherstorm() // Theirs new npc_commander_dawnforge(); new at_commander_dawnforge(); - new npc_professor_dabiri(); new npc_phase_hunter(); new npc_bessy(); new npc_maxx_a_million_escort(); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index ac326f538..e4acbc9a1 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2030,8 +2030,7 @@ class spell_gen_animal_blood : public AuraScript { if (Unit* owner = GetUnitOwner()) { - if (owner->IsInWater()) - owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true); + owner->CastSpell(owner, SPELL_SPAWN_BLOOD_POOL, true); } } @@ -2042,6 +2041,27 @@ class spell_gen_animal_blood : public AuraScript } }; +// 63471 - Spawn Blood Pool +class spell_spawn_blood_pool : public SpellScript +{ + PrepareSpellScript(spell_spawn_blood_pool); + + void SetDest(SpellDestination &dest) + { + Unit* caster = GetCaster(); + LiquidData liquidStatus = caster->GetMap()->GetLiquidData(caster->GetPhaseMask(), caster->GetPositionX(), caster->GetPositionY(), caster->GetPositionZ(), caster->GetCollisionHeight(), MAP_ALL_LIQUIDS); + + float level = liquidStatus.Level > INVALID_HEIGHT ? liquidStatus.Level : caster->GetPositionZ(); + Position pos = Position(caster->GetPositionX(), caster->GetPositionY(), level, caster->GetOrientation()); + dest.Relocate(pos); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_spawn_blood_pool::SetDest, EFFECT_0, TARGET_DEST_CASTER); + } +}; + enum DivineStormSpell { SPELL_DIVINE_STORM = 53385, @@ -4893,6 +4913,7 @@ void AddSC_generic_spell_scripts() RegisterSpellScript(spell_gen_feign_death_no_prevent_emotes); RegisterSpellScript(spell_pvp_trinket_wotf_shared_cd); RegisterSpellScript(spell_gen_animal_blood); + RegisterSpellScript(spell_spawn_blood_pool); RegisterSpellScript(spell_gen_divine_storm_cd_reset); RegisterSpellScript(spell_gen_profession_research); RegisterSpellScript(spell_gen_clone);