mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Scripts: Proper fix Gal'Darah Puncture remove
This commit is contained in:
3
sql/updates/world/3.3.5/2019_08_22_00_world.sql
Normal file
3
sql/updates/world/3.3.5/2019_08_22_00_world.sql
Normal file
@@ -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');
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user