diff options
-rw-r--r-- | sql/FULL/world_script_texts.sql | 11 | ||||
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 4 | ||||
-rw-r--r-- | sql/updates/5613_world_scripts.sql | 11 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp | 100 | ||||
-rw-r--r-- | src/bindings/scripts/system/ScriptLoader.cpp | 2 |
5 files changed, 110 insertions, 18 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index e8e8a0472ea..bf6d68a4dab 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1854,6 +1854,17 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (28587,-1602041,'%s runs to his anvil!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'volkhan EMOTE_TO_ANVIL'), (28587,-1602042,'%s prepares to shatter his Brittle Golems!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'volkhan EMOTE_SHATTER'); +-- 1 603 000 HALLS OF STONE +/* Maiden of Grief */ +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES + (27975,-1603000,'You shouldn''t have come...now you will die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13487,1,0,0,'maiden of grief SAY_AGGRO'), + (27975,-1603001,'Why must it be this way?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13488,1,0,0,'maiden of grief SAY_SLAY_1'), + (27975,-1603002,'You had it coming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13489,1,0,0,'maiden of grief SAY_SLAY_2'), + (27975,-1603003,'My burden grows heavier.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13490,1,0,0,'maiden of grief SAY_SLAY_3'), + (27975,-1603004,'This is your own fault!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13491,1,0,0,'maiden of grief SAY_SLAY_4'), + (27975,-1603005,'I hope you all rot! I never...wanted...this.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13493,1,0,0,'maiden of grief SAY_DEATH'), + (27975,-1603006,'So much lost time... that you''ll never get back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13492,1,0,0,'maiden of grief SAY_STUN'); + -- -1 615 000 OBSIDIAN SANCTUM INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES (30451,-1615000,'I fear nothing! Least of all you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,14111,1,0,0,'shadron SAY_SHADRON_AGGRO'), diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index eb8157ff9a9..ddb92bd670f 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -519,6 +519,10 @@ UPDATE `creature_template` SET `ScriptName`='npc_volkhan_anvil' WHERE `entry`=28 UPDATE `creature_template` SET `ScriptName`='boss_ionar' WHERE `entry`=28546; UPDATE `creature_template` SET `ScriptName`='mob_spark_of_ionar' WHERE `entry`=28926; +/* HALLS OF STONE */ +/* Maiden of Grief */ +UPDATE `creature_template` SET `ScriptName`='boss_maiden_of_grief' WHERE `entry`=27975; + /* HELLFIRE CITADEL */ /* BLOOD FURNACE */ diff --git a/sql/updates/5613_world_scripts.sql b/sql/updates/5613_world_scripts.sql new file mode 100644 index 00000000000..7976edfd773 --- /dev/null +++ b/sql/updates/5613_world_scripts.sql @@ -0,0 +1,11 @@ + +UPDATE `creature_template` SET `ScriptName`='boss_maiden_of_grief' WHERE `entry`=27975; + +REPLACE INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES + (27975,-1603000,'You shouldn''t have come...now you will die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13487,1,0,0,'maiden of grief SAY_AGGRO'), + (27975,-1603001,'Why must it be this way?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13488,1,0,0,'maiden of grief SAY_SLAY_1'), + (27975,-1603002,'You had it coming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13489,1,0,0,'maiden of grief SAY_SLAY_2'), + (27975,-1603003,'My burden grows heavier.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13490,1,0,0,'maiden of grief SAY_SLAY_3'), + (27975,-1603004,'This is your own fault!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13491,1,0,0,'maiden of grief SAY_SLAY_4'), + (27975,-1603005,'I hope you all rot! I never...wanted...this.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13493,1,0,0,'maiden of grief SAY_DEATH'), + (27975,-1603006,'So much lost time... that you''ll never get back!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13492,1,0,0,'maiden of grief SAY_STUN'); diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index 6f6884918d0..e6f2f375ed1 100644 --- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -13,55 +13,119 @@ update creature_template set scriptname = 'boss_maiden_of_grief' where entry = ' //Spell #define SPELL_PARTING_SORROW 59723 -#define SPELL_STORM_OF_GRIEF 50752 -#define SPELL_STORM_OF_GRIEF_2 59772 -#define SPELL_SHOCK_OF_SORROW 50760 -#define SPELL_SHOCK_OF_SORROW_2 59726 -#define SPELL_PILLAR_OF_WOE 50761 -#define SPELL_PILLAR_OF_WOE_2 59727 +#define SPELL_STORM_OF_GRIEF_N 50752 +#define SPELL_STORM_OF_GRIEF_H 59772 +#define SPELL_SHOCK_OF_SORROW_N 50760 +#define SPELL_SHOCK_OF_SORROW_H 59726 +#define SPELL_PILLAR_OF_WOE_N 50761 +#define SPELL_PILLAR_OF_WOE_H 59727 //not in db //Yell -#define SAY_AGGRO -1599004 -#define SAY_SLAY_1 -1599005 -#define SAY_SLAY_2 -1599006 -#define SAY_SLAY_3 -1599007 -#define SAY_SLAY_4 -1599008 -#define SAY_DEATH -1599009 -#define SAY_STUN -1599010 +#define SAY_AGGRO -1603000 +#define SAY_SLAY_1 -1603001 +#define SAY_SLAY_2 -1603002 +#define SAY_SLAY_3 -1603003 +#define SAY_SLAY_4 -1603004 +#define SAY_DEATH -1603005 +#define SAY_STUN -1603006 struct TRINITY_DLL_DECL boss_maiden_of_griefAI : public ScriptedAI { - boss_maiden_of_griefAI(Creature *c) : ScriptedAI(c) {} + boss_maiden_of_griefAI(Creature *c) : ScriptedAI(c) + { + pInstance = m_creature->GetInstanceData(); + IsHeroic = m_creature->GetMap()->IsHeroic(); + } + + ScriptedInstance* pInstance; + bool IsHeroic; + + uint32 PartingSorrowTimer; + uint32 StormOfGriefTimer; + uint32 ShockOfSorrowTimer; + uint32 PillarOfWoeTimer; + + void Reset() + { + PartingSorrowTimer = 25000 + rand()%5000; + StormOfGriefTimer = 10000; + ShockOfSorrowTimer = 20000+rand()%5000; + PillarOfWoeTimer = 5000 + rand()%10000; + + //Missing support for instance data (and door?) + } - void Reset() {} void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); + + //Missing support for instance data (and door?) } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; + if(IsHeroic) + { + if (PartingSorrowTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); + + if(target) + DoCast(target,SPELL_PARTING_SORROW); + + PartingSorrowTimer = 30000 + rand()%10000; + }else PartingSorrowTimer -= diff; + } + + if (StormOfGriefTimer < diff) + { + DoCast(m_creature->getVictim(),IsHeroic ? SPELL_STORM_OF_GRIEF_H : SPELL_STORM_OF_GRIEF_N, true); + StormOfGriefTimer = 15000 + rand()%5000; + }else StormOfGriefTimer -= diff; + + if (ShockOfSorrowTimer < diff) + { + DoResetThreat(); + DoScriptText(SAY_STUN, m_creature); + DoCast(m_creature,IsHeroic ? SPELL_SHOCK_OF_SORROW_H : SPELL_SHOCK_OF_SORROW_N); + ShockOfSorrowTimer = 20000 + rand()%10000; + }else ShockOfSorrowTimer -= diff; + + if (PillarOfWoeTimer < diff) + { + Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1); + + if(target) + DoCast(target,IsHeroic ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE_N); + else + DoCast(m_creature->getVictim(),IsHeroic ? SPELL_PILLAR_OF_WOE_H : SPELL_PILLAR_OF_WOE_N); + + PillarOfWoeTimer = 5000 + rand()%20000; + }else PillarOfWoeTimer -= diff; + DoMeleeAttackIfReady(); } void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); + + //Missing support for instance data (and door?) } void KilledUnit(Unit *victim) { if (victim == m_creature) return; - switch(rand()%3) + switch(rand()%4) { case 0: DoScriptText(SAY_SLAY_1, m_creature);break; case 1: DoScriptText(SAY_SLAY_2, m_creature);break; case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + case 3: DoScriptText(SAY_SLAY_4, m_creature);break; } } }; diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp index cec1cfedfb8..5e9307902be 100644 --- a/src/bindings/scripts/system/ScriptLoader.cpp +++ b/src/bindings/scripts/system/ScriptLoader.cpp @@ -288,6 +288,7 @@ extern void AddSC_boss_loken(); extern void AddSC_boss_ionar(); extern void AddSC_boss_volkhan(); extern void AddSC_instance_halls_of_lightning(); +extern void AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone extern void AddSC_boss_auriaya(); //Ulduar Ulduar extern void AddSC_boss_flame_leviathan(); extern void AddSC_boss_ignis(); @@ -683,6 +684,7 @@ void AddScripts() AddSC_boss_ionar(); AddSC_boss_volkhan(); AddSC_instance_halls_of_lightning(); + AddSC_boss_maiden_of_grief(); //Ulduar Halls of Stone AddSC_boss_auriaya(); //Ulduar Ulduar AddSC_boss_flame_leviathan(); AddSC_boss_ignis(); |