aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2019-08-21 23:03:25 -0300
committerKeader <keader.android@gmail.com>2019-08-21 23:03:25 -0300
commitcbc01f35b6b80c1069b2274a619c8f7a3ff730c7 (patch)
tree70b696192433b1bdfb9fba76a59dfc798c6ea740
parent1886507e7f91249a335978e2fa1a859e93d56ffa (diff)
Core/Scripts: Proper fix Gal'Darah Puncture remove
-rw-r--r--sql/updates/world/3.3.5/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/3.3.5/2019_08_22_00_world.sql b/sql/updates/world/3.3.5/2019_08_22_00_world.sql
new file mode 100644
index 00000000000..d5b8414eaa8
--- /dev/null
+++ b/sql/updates/world/3.3.5/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 2f638f664b1..75347b1f571 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();
}