Scripts/Spells: Bloodlust/Heroism handling changed, it is now possible to use these spells even if caster is under Sated/Exhaustion debuff
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_bloodlust';
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_heroism';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(2825,'spell_sha_bloodlust'),
|
||||||
|
(32182,'spell_sha_heroism');
|
||||||
|
|
||||||
@@ -2955,12 +2955,6 @@ void SpellMgr::LoadDbcDataCorrections()
|
|||||||
// because of bug in dbc
|
// because of bug in dbc
|
||||||
spellInfo->procChance = 0;
|
spellInfo->procChance = 0;
|
||||||
break;
|
break;
|
||||||
case 32182: // Heroism
|
|
||||||
spellInfo->excludeCasterAuraSpell = 57723; // Exhaustion
|
|
||||||
break;
|
|
||||||
case 2825: // Bloodlust
|
|
||||||
spellInfo->excludeCasterAuraSpell = 57724; // Sated
|
|
||||||
break;
|
|
||||||
case 20335: // Heart of the Crusader
|
case 20335: // Heart of the Crusader
|
||||||
case 20336:
|
case 20336:
|
||||||
case 20337:
|
case 20337:
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ enum ShamanSpells
|
|||||||
SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609,
|
SHAMAN_SPELL_MANA_TIDE_TOTEM = 39609,
|
||||||
SHAMAN_SPELL_FIRE_NOVA_R1 = 1535,
|
SHAMAN_SPELL_FIRE_NOVA_R1 = 1535,
|
||||||
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
|
SHAMAN_SPELL_FIRE_NOVA_TRIGGERED_R1 = 8349,
|
||||||
|
SHAMAN_SPELL_SATED = 57724,
|
||||||
|
SHAMAN_SPELL_EXHAUSTION = 57723,
|
||||||
|
|
||||||
//For Earthen Power
|
//For Earthen Power
|
||||||
SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, //Spell casted by totem
|
SHAMAN_TOTEM_SPELL_EARTHBIND_TOTEM = 6474, //Spell casted by totem
|
||||||
@@ -88,7 +90,8 @@ public:
|
|||||||
|
|
||||||
class spell_sha_fire_nova_SpellScript : public SpellScript
|
class spell_sha_fire_nova_SpellScript : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareSpellScript(spell_sha_fire_nova_SpellScript)
|
PrepareSpellScript(spell_sha_fire_nova_SpellScript);
|
||||||
|
|
||||||
bool Validate(SpellInfo const* spellEntry)
|
bool Validate(SpellInfo const* spellEntry)
|
||||||
{
|
{
|
||||||
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_FIRE_NOVA_R1))
|
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_FIRE_NOVA_R1))
|
||||||
@@ -147,7 +150,8 @@ public:
|
|||||||
|
|
||||||
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
|
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
|
||||||
{
|
{
|
||||||
PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript)
|
PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript);
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||||
{
|
{
|
||||||
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE))
|
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_GLYPH_OF_MANA_TIDE))
|
||||||
@@ -228,10 +232,94 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_sha_bloodlust : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_sha_bloodlust() : SpellScriptLoader("spell_sha_bloodlust") { }
|
||||||
|
|
||||||
|
class spell_sha_bloodlust_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_sha_bloodlust_SpellScript);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||||
|
{
|
||||||
|
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_SATED))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveInvalidTargets(std::list<Unit*>& targets)
|
||||||
|
{
|
||||||
|
targets.remove_if(Trinity::UnitAuraCheck(true, SHAMAN_SPELL_SATED));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyDebuff()
|
||||||
|
{
|
||||||
|
GetHitUnit()->CastSpell(GetHitUnit(), SHAMAN_SPELL_SATED, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_2, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
AfterHit += SpellHitFn(spell_sha_bloodlust_SpellScript::ApplyDebuff);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_sha_bloodlust_SpellScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_sha_heroism : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_sha_heroism() : SpellScriptLoader("spell_sha_heroism") { }
|
||||||
|
|
||||||
|
class spell_sha_heroism_SpellScript : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_sha_heroism_SpellScript);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||||
|
{
|
||||||
|
if (!sSpellMgr->GetSpellInfo(SHAMAN_SPELL_EXHAUSTION))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveInvalidTargets(std::list<Unit*>& targets)
|
||||||
|
{
|
||||||
|
targets.remove_if(Trinity::UnitAuraCheck(true, SHAMAN_SPELL_EXHAUSTION));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyDebuff()
|
||||||
|
{
|
||||||
|
GetHitUnit()->CastSpell(GetHitUnit(), SHAMAN_SPELL_EXHAUSTION, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
OnUnitTargetSelect += SpellUnitTargetFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_2, TARGET_UNIT_CASTER_AREA_RAID);
|
||||||
|
AfterHit += SpellHitFn(spell_sha_heroism_SpellScript::ApplyDebuff);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
SpellScript* GetSpellScript() const
|
||||||
|
{
|
||||||
|
return new spell_sha_heroism_SpellScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_shaman_spell_scripts()
|
void AddSC_shaman_spell_scripts()
|
||||||
{
|
{
|
||||||
new spell_sha_astral_shift();
|
new spell_sha_astral_shift();
|
||||||
new spell_sha_fire_nova();
|
new spell_sha_fire_nova();
|
||||||
new spell_sha_mana_tide_totem();
|
new spell_sha_mana_tide_totem();
|
||||||
new spell_sha_earthbind_totem();
|
new spell_sha_earthbind_totem();
|
||||||
|
new spell_sha_bloodlust();
|
||||||
|
new spell_sha_heroism();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user