diff --git a/data/sql/updates/pending_db_world/rev_1486030596737432500.sql b/data/sql/updates/pending_db_world/rev_1486030596737432500.sql new file mode 100644 index 000000000..e3be5749a --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1486030596737432500.sql @@ -0,0 +1,17 @@ +INSERT INTO version_db_world (`sql_rev`) VALUES ('1486030596737432500'); + +DELETE FROM `creature_template` WHERE `entry` = "32322"; +DELETE FROM `creature_template` WHERE `entry` = "32341"; +DELETE FROM `creature_template` WHERE `entry` = "32321"; +DELETE FROM `creature_template` WHERE `entry` = "32324"; + +UPDATE `creature` SET `spawndist`= "10" WHERE `guid` = "102313"; +UPDATE `creature` SET `spawndist`= "10" WHERE `guid` = "102123"; +UPDATE `creature` SET `spawndist`= "10" WHERE `guid` = "103579"; +UPDATE `creature` SET `spawndist`= "10" WHERE `guid` = "102063"; + +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `exp`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `unit_flags2`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `PetSpellDataId`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `Health_mod`, `Mana_mod`, `Armor_mod`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES +(32322, 0, 0, 0, 0, 0, 27916, 27917, 27918, 0, 'Gold Warrior', '', '', 0, 70, 70, 0, 11, 0, 1, 1.14286, 1, 0, 252, 357, 0, 304, 1, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 0, 0, 215, 320, 44, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'npc_dalaran_warrior', 12340), +(32341, 0, 0, 0, 0, 0, 27926, 27927, 0, 0, 'Gold Mage', '', '', 0, 70, 70, 2, 11, 0, 1, 1.14286, 1, 0, 248, 363, 0, 135, 1, 2000, 2000, 8, 0, 0, 0, 0, 0, 0, 0, 0, 233, 347, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'npc_dalaran_mage', 12340), +(32321, 0, 0, 0, 0, 0, 27919, 27920, 27921, 0, 'Green Warrior', '', '', 0, 70, 70, 0, 85, 0, 1, 1.14286, 1, 0, 252, 357, 0, 304, 1, 2000, 2000, 1, 0, 0, 0, 0, 0, 0, 0, 0, 215, 320, 44, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'npc_dalaran_warrior', 12340), +(32324, 0, 0, 0, 0, 0, 27928, 27929, 0, 0, 'Green Mage', '', '', 0, 70, 70, 2, 85, 0, 1, 1.14286, 1, 0, 248, 363, 0, 135, 1, 2000, 2000, 8, 0, 0, 0, 0, 0, 0, 0, 0, 233, 347, 28, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 1, 1, 0, 0, 1, 0, 0, 'npc_dalaran_mage', 12340); diff --git a/src/scripts/Northrend/zone_dalaran.cpp b/src/scripts/Northrend/zone_dalaran.cpp index 23f1a2acd..ab6215a83 100644 --- a/src/scripts/Northrend/zone_dalaran.cpp +++ b/src/scripts/Northrend/zone_dalaran.cpp @@ -107,6 +107,22 @@ enum DisguiseMisc NPC_AQUANOS_ENTRY = 36851, }; +enum spells +{ + // Sewers Warrior Spells + SPELL_WARRIOR_BATTLESHOUT = 9128, + SPELL_WARRIOR_DISARM = 6713, + SPELL_WARRIOR_SHOUT = 19134, + SPELL_WARRIOR_HAMSTRING = 9080, + + // Sewers Mage Spells + SPELL_BLINK = 14514, + SPELL_BLIZZARD = 44178, + SPELL_COC = 12611, + SPELL_FROST_NOVA = 15532, + SPELL_FROSTFIRE = 44614 +}; + class npc_shandy_dalaran : public CreatureScript { public: @@ -590,6 +606,195 @@ class npc_minigob_manabonk : public CreatureScript } }; +class npc_dalaran_mage : public CreatureScript +{ +public: + npc_dalaran_mage() : CreatureScript("npc_dalaran_mage") {} + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_dalaran_mageAI(creature); + } + + struct npc_dalaran_mageAI : public ScriptedAI + { + npc_dalaran_mageAI(Creature* creature) : ScriptedAI(creature) + { + + } + + uint32 CoC_Timer; + uint32 frostnova_timer; + uint32 blink_timer; + uint32 blizzard_timer; + uint32 frostfire_timer; + uint32 restoremana_timer; + + void Initialize() + { + CoC_Timer = 20000; + frostnova_timer = 55000; + blink_timer = 35000; + blizzard_timer = 30000; + frostfire_timer = 1000; + restoremana_timer = 10000; + } + + void Reset() + { + Initialize(); + me->AddAura(1908, me); + } + + void EnterCombat(Unit* /*who*/) + { + } + void UpdateAI(uint32 diff) + { + + if (!UpdateVictim()) + return; + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + if (restoremana_timer <= diff) + { + me->SetPower(POWER_MANA, (me->GetMaxPower(POWER_MANA))); + restoremana_timer = 10000; + } + else + restoremana_timer -= diff; + + if (frostfire_timer <= diff) + { + DoCast(SPELL_FROSTFIRE); + frostfire_timer = urand(1000, 3000); + } + else + frostfire_timer -= diff; + + if (CoC_Timer <= diff) + { + DoCast(SPELL_COC); + CoC_Timer = urand(10000, 15000); + } + else + CoC_Timer -= diff; + + if (blizzard_timer <= diff) + { + DoCast(SPELL_BLIZZARD); + blizzard_timer = urand(20000, 30000); + } + else + blizzard_timer -= diff; + + if (frostnova_timer <= diff) + { + DoCast(SPELL_FROST_NOVA); + frostnova_timer = urand(30000, 40000); + } + else + frostnova_timer -= diff; + + if (blink_timer <= diff) + { + DoCast(SPELL_BLINK); + blink_timer = urand(20000, 25000); + } + else + blink_timer -= diff; + + DoMeleeAttackIfReady(); + } + }; +}; + + + class npc_dalaran_warrior : public CreatureScript + { + public: + npc_dalaran_warrior() : CreatureScript("npc_dalaran_warrior") {} + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_dalaran_warriorAI(creature); + } + + struct npc_dalaran_warriorAI : public ScriptedAI + { + npc_dalaran_warriorAI(Creature* creature) : ScriptedAI(creature) + { + Battleshout_timer = 1000; + } + + uint32 Battleshout_timer; + uint32 hamstring_timer; + uint32 disarm_timer; + uint32 shout_timer; + + void Initialize() + { + Battleshout_timer = 120000; + shout_timer = 60000; + hamstring_timer = 30000; + disarm_timer = 50000; + } + + void Reset() + { + Initialize(); + } + + void EnterCombat(Unit* /*who*/) + { + me->AddAura(1908, me); + Battleshout_timer = 1000; + } + void UpdateAI(uint32 diff) + { + + if (!UpdateVictim()) + return; + + if (Battleshout_timer <= diff) + { + DoCast(SPELL_WARRIOR_SHOUT); + Battleshout_timer = 120000; + } + else + Battleshout_timer -= diff; + + if (shout_timer <= diff) + { + DoCast(SPELL_WARRIOR_SHOUT); + shout_timer = 60000; + } + else + shout_timer -= diff; + + if (hamstring_timer <= diff) + { + DoCast(SPELL_WARRIOR_HAMSTRING); + hamstring_timer = urand(20000, 25000); + } + else + hamstring_timer -= diff; + + if (disarm_timer <= diff) + { + DoCast(SPELL_WARRIOR_DISARM); + disarm_timer = urand(50000, 60000); + } + else + disarm_timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + }; + void AddSC_dalaran() { // our @@ -597,6 +802,8 @@ void AddSC_dalaran() new npc_mei_francis_mount(); new npc_shandy_dalaran(); new npc_archmage_landalock(); + new npc_dalaran_mage(); + new npc_dalaran_warrior(); // theirs new npc_mageguard_dalaran();