Core/Spells: Convert/Update priest Vampiric Touch for 4.3.4

This commit is contained in:
Vincent-Michael
2013-07-21 16:41:13 +02:00
parent e5cba4b071
commit 2d53863396
5 changed files with 21 additions and 20 deletions
+1 -1
View File
@@ -62,4 +62,4 @@ endif()
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
# 'function' : member function does not override any base class virtual member function
# 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4263 /we4264 /W4")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4263 /we4264")
@@ -0,0 +1 @@
UPDATE `spell_script_names` SET `spell_id`=34914 WHERE `ScriptName`='spell_pri_vampiric_touch';
-17
View File
@@ -5538,23 +5538,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
}
case SPELLFAMILY_PRIEST:
{
// Vampiric Touch
if (dummySpell->SpellFamilyFlags[1] & 0x00000400)
{
if (!victim || !victim->IsAlive())
return false;
if (effIndex != 0)
return false;
// victim is caster of aura
if (triggeredByAura->GetCasterGUID() != victim->GetGUID())
return false;
// Energize 1% of max. mana
victim->CastSpell(victim, 57669, true, castItem, triggeredByAura);
return true; // no hidden cooldown
}
// Body and Soul
if (dummySpell->SpellIconID == 2218)
{
@@ -1182,7 +1182,6 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
break;
case FORM_SHADOW:
spellId = 49868;
spellId2 = 71167;
break;
case FORM_GHOSTWOLF:
spellId = 67116;
+19 -1
View File
@@ -66,6 +66,11 @@ enum PriestSpellIcons
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874,
};
enum MiscSpells
{
SPELL_GEN_REPLENISHMENT = 57669
};
// 527 - Dispel magic
class spell_pri_dispel_magic : public SpellScriptLoader
{
@@ -979,7 +984,8 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL))
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL) ||
!sSpellMgr->GetSpellInfo(SPELL_GEN_REPLENISHMENT))
return false;
return true;
}
@@ -996,9 +1002,21 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
}
}
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetProcTarget() == GetCaster();
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
eventInfo.GetProcTarget()->CastSpell((Unit*)NULL, SPELL_GEN_REPLENISHMENT, true, NULL, aurEff);
}
void Register() OVERRIDE
{
AfterDispel += AuraDispelFn(spell_pri_vampiric_touch_AuraScript::HandleDispel);
DoCheckProc += AuraCheckProcFn(spell_pri_vampiric_touch_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_pri_vampiric_touch_AuraScript::HandleEffectProc, EFFECT_2, SPELL_AURA_DUMMY);
}
};