Core/Spells: Convert/Update more spells for 4.3.4

This commit is contained in:
Vincent-Michael
2013-07-18 18:20:01 +02:00
parent 0b94293dba
commit de673fc4b0
5 changed files with 105 additions and 49 deletions

View File

@@ -0,0 +1,12 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (-31571,-51664);
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
(-31571,'spell_mage_arcane_potency'),
(-51664,'spell_rog_cut_to_the_chase');
DELETE FROM `spell_ranks` WHERE `first_spell_id` IN (31571,51664);
INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
(31571, 31571, 1),
(31571, 31572, 2),
(51664, 51664, 1),
(51664, 51665, 2),
(51664, 51667, 3);

View File

@@ -5398,35 +5398,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_MAGE:
{
// Magic Absorption
if (dummySpell->SpellIconID == 459) // only this spell has SpellIconID == 459 and dummy aura
{
if (getPowerType() != POWER_MANA)
return false;
// mana reward
basepoints0 = CalculatePct(GetMaxPower(POWER_MANA), triggerAmount);
target = this;
triggered_spell_id = 29442;
break;
}
// Arcane Potency
if (dummySpell->SpellIconID == 2120)
{
if (!procSpell)
return false;
target = this;
switch (dummySpell->Id)
{
case 31571: triggered_spell_id = 57529; break;
case 31572: triggered_spell_id = 57531; break;
default:
TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleDummyAuraProc: non handled spell id: %u", dummySpell->Id);
return false;
}
break;
}
// Hot Streak & Improved Hot Streak
if (dummySpell->SpellIconID == 2999)
{
@@ -5921,17 +5892,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
switch (dummySpell->SpellIconID)
{
case 2909: // Cut to the Chase
{
// "refresh your Slice and Dice duration to its 5 combo point maximum"
// lookup Slice and Dice
if (Aura* aur = GetAura(5171))
{
aur->SetDuration(aur->GetSpellInfo()->GetMaxDuration(), true);
return true;
}
return false;
}
case 2963: // Deadly Brew
{
triggered_spell_id = 3409;

View File

@@ -29,6 +29,10 @@
enum MageSpells
{
SPELL_ARCANCE_POTENCY_RANK_1 = 31571,
SPELL_ARCANCE_POTENCY_RANK_2 = 31572,
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1 = 57529,
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2 = 57531,
SPELL_MAGE_BLAZING_SPEED = 31643,
SPELL_MAGE_BURNOUT = 29077,
SPELL_MAGE_COLD_SNAP = 11958,
@@ -84,6 +88,54 @@ enum MageIcons
ICON_MAGE_IMPROVED_MANA_GEM = 1036
};
// -31571 - Arcane Potency
class spell_mage_arcane_potency : public SpellScriptLoader
{
public:
spell_mage_arcane_potency () : SpellScriptLoader("spell_mage_arcane_potency") { }
class spell_mage_arcane_potency_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mage_arcane_potency_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_RANK_1) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_RANK_2) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1) ||
!sSpellMgr->GetSpellInfo(SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
uint32 spellId = 0;
if (GetSpellInfo()->Id == SPELL_ARCANCE_POTENCY_RANK_1)
spellId = SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1;
else if (GetSpellInfo()->Id == SPELL_ARCANCE_POTENCY_RANK_2)
spellId = SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2;
if (!spellId)
return;
GetTarget()->CastSpell(GetTarget(), spellId, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_mage_arcane_potency_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_mage_arcane_potency_AuraScript();
}
};
// Incanter's Absorbtion
class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
{
@@ -1224,6 +1276,7 @@ class spell_mage_water_elemental_freeze : public SpellScriptLoader
void AddSC_mage_spell_scripts()
{
new spell_mage_arcane_potency();
new spell_mage_blast_wave();
new spell_mage_blazing_speed();
new spell_mage_blizzard();

View File

@@ -591,15 +591,15 @@ class spell_pal_hand_of_salvation : public SpellScriptLoader
}
};
// 37705 - Greater Heal Refund
class spell_pri_item_greater_heal_refund : public SpellScriptLoader
// 37705 - Healing Discount
class spell_pal_item_healing_discount : public SpellScriptLoader
{
public:
spell_pri_item_greater_heal_refund() : SpellScriptLoader("spell_pri_item_greater_heal_refund") { }
spell_pal_item_healing_discount() : SpellScriptLoader("spell_pal_item_healing_discount") { }
class spell_pri_item_greater_heal_refund_AuraScript : public AuraScript
class spell_pal_item_healing_discount_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript);
PrepareAuraScript(spell_pal_item_healing_discount_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
@@ -608,7 +608,7 @@ class spell_pri_item_greater_heal_refund : public SpellScriptLoader
return true;
}
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff);
@@ -616,13 +616,13 @@ class spell_pri_item_greater_heal_refund : public SpellScriptLoader
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_pal_item_healing_discount_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_item_greater_heal_refund_AuraScript();
return new spell_pal_item_healing_discount_AuraScript();
}
};
@@ -1008,7 +1008,7 @@ void AddSC_paladin_spell_scripts()
new spell_pal_guarded_by_the_light();
new spell_pal_hand_of_sacrifice();
new spell_pal_hand_of_salvation();
new spell_pri_item_greater_heal_refund();
new spell_pal_item_healing_discount();
new spell_pal_holy_shock();
new spell_pal_judgement_of_command();
new spell_pal_lay_on_hands();

View File

@@ -33,6 +33,7 @@ enum RogueSpells
SPELL_ROGUE_GLYPH_OF_PREPARATION = 56819,
SPELL_ROGUE_PREY_ON_THE_WEAK = 58670,
SPELL_ROGUE_SHIV_TRIGGERED = 5940,
SPELL_ROGUE_SILCE_AND_DICE = 5171,
SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST = 57933,
SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628,
};
@@ -160,6 +161,35 @@ class spell_rog_cheat_death : public SpellScriptLoader
}
};
// -51664 - Cut to the Chase
class spell_rog_cut_to_the_chase : public SpellScriptLoader
{
public:
spell_rog_cut_to_the_chase () : SpellScriptLoader("spell_rog_cut_to_the_chase") { }
class spell_rog_cut_to_the_chase_AuraScript : public AuraScript
{
PrepareAuraScript(spell_rog_cut_to_the_chase_AuraScript);
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
if (Aura* aur = GetTarget()->GetAura(SPELL_ROGUE_SILCE_AND_DICE))
aur->SetDuration(aur->GetSpellInfo()->GetMaxDuration(), true);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_rog_cut_to_the_chase_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_rog_cut_to_the_chase_AuraScript();
}
};
// 2818 - Deadly Poison
class spell_rog_deadly_poison : public SpellScriptLoader
{
@@ -650,6 +680,7 @@ void AddSC_rogue_spell_scripts()
{
new spell_rog_blade_flurry();
new spell_rog_cheat_death();
new spell_rog_cut_to_the_chase();
new spell_rog_deadly_poison();
new spell_rog_nerves_of_steel();
new spell_rog_preparation();