aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2021_12_18_28_world_2019_08_22_00_world.sql3
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp27
2 files changed, 28 insertions, 2 deletions
diff --git a/sql/updates/world/master/2021_12_18_28_world_2019_08_22_00_world.sql b/sql/updates/world/master/2021_12_18_28_world_2019_08_22_00_world.sql
new file mode 100644
index 00000000000..d5b8414eaa8
--- /dev/null
+++ b/sql/updates/world/master/2021_12_18_28_world_2019_08_22_00_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_gal_darah_clear_puncture';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(60022,'spell_gal_darah_clear_puncture');
diff --git a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
index be62c459251..4a2713a9ba1 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_gal_darah.cpp
@@ -17,7 +17,6 @@
#include "ScriptMgr.h"
#include "gundrak.h"
-#include "InstanceScript.h"
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
@@ -36,6 +35,7 @@ enum Spells
SPELL_HEARTH_BEAM_VISUAL = 54988,
SPELL_TRANSFORM_RHINO = 55297,
SPELL_TRANSFORM_BACK = 55299,
+ SPELL_CLEAR_PUNCTURE = 60022,
// Rhino Spirit
SPELL_STAMPEDE_SPIRIT = 55221,
@@ -164,7 +164,7 @@ class boss_gal_darah : public CreatureScript
{
_JustDied();
Talk(SAY_DEATH);
- instance->DoRemoveAurasDueToSpellOnPlayers(IsHeroic() ? SPELL_PUNCTURE_HEROIC : SPELL_PUNCTURE);
+ DoCastSelf(SPELL_CLEAR_PUNCTURE, true);
}
void KilledUnit(Unit* victim) override
@@ -315,6 +315,28 @@ public:
}
};
+// 60022 - Clear Puncture
+class spell_gal_darah_clear_puncture : public SpellScript
+{
+ PrepareSpellScript(spell_gal_darah_clear_puncture);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_PUNCTURE, SPELL_PUNCTURE_HEROIC });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ Unit* target = GetHitUnit();
+ target->RemoveAurasDueToSpell(target->GetMap()->IsHeroic() ? SPELL_PUNCTURE_HEROIC : SPELL_PUNCTURE);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gal_darah_clear_puncture::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
class achievement_share_the_love : public AchievementCriteriaScript
{
public:
@@ -338,5 +360,6 @@ void AddSC_boss_gal_darah()
new boss_gal_darah();
new spell_gal_darah_impaling_charge();
new spell_gal_darah_stampede_charge();
+ RegisterSpellScript(spell_gal_darah_clear_puncture);
new achievement_share_the_love();
}