Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4

Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Spells/Spell.cpp
	src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
	src/server/scripts/Spells/spell_paladin.cpp
	src/server/scripts/Spells/spell_priest.cpp
	src/server/scripts/Spells/spell_shaman.cpp
	src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
Vincent_Michael committed 2014-01-26 18:22:06 +01:00
commit 7cc4828554
38 files changed
+651 -272

No files matched your search

+52 -18
View File
@@ -524,6 +524,42 @@ class spell_pal_exorcism_and_holy_wrath_damage : public SpellScriptLoader
}
};
// -9799 - Eye for an Eye
class spell_pal_eye_for_an_eye : public SpellScriptLoader
{
public:
spell_pal_eye_for_an_eye() : SpellScriptLoader("spell_pal_eye_for_an_eye") { }
class spell_pal_eye_for_an_eye_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_eye_for_an_eye_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE))
return false;
return true;
}
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pal_eye_for_an_eye_AuraScript::HandleEffectProc, EFFECT_0, m_scriptSpellId == SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 ? SPELL_AURA_DUMMY : SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_eye_for_an_eye_AuraScript();
}
};
// -75806 - Grand Crusader
class spell_pal_grand_crusader : public SpellScriptLoader
{
@@ -564,39 +600,36 @@ class spell_pal_grand_crusader : public SpellScriptLoader
}
};
// -9799 - Eye for an Eye
class spell_pal_eye_for_an_eye : public SpellScriptLoader
// 54968 - Glyph of Holy Light
class spell_pal_glyph_of_holy_light : public SpellScriptLoader
{
public:
spell_pal_eye_for_an_eye() : SpellScriptLoader("spell_pal_eye_for_an_eye") { }
spell_pal_glyph_of_holy_light() : SpellScriptLoader("spell_pal_glyph_of_holy_light") { }
class spell_pal_eye_for_an_eye_AuraScript : public AuraScript
class spell_pal_glyph_of_holy_light_SpellScript : public SpellScript
{
PrepareAuraScript(spell_pal_eye_for_an_eye_AuraScript);
PrepareSpellScript(spell_pal_glyph_of_holy_light_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
void FilterTargets(std::list<WorldObject*>& targets)
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE))
return false;
return true;
}
uint32 const maxTargets = GetSpellInfo()->MaxAffectedTargets;
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetProcTarget(), true, NULL, aurEff);
if (targets.size() > maxTargets)
{
targets.sort(Trinity::HealthPctOrderPred());
targets.resize(maxTargets);
}
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pal_eye_for_an_eye_AuraScript::HandleEffectProc, EFFECT_0, m_scriptSpellId == SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 ? SPELL_AURA_DUMMY : SPELL_AURA_PROC_TRIGGER_SPELL);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pal_glyph_of_holy_light_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ALLY);
}
};
AuraScript* GetAuraScript() const OVERRIDE
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pal_eye_for_an_eye_AuraScript();
return new spell_pal_glyph_of_holy_light_SpellScript();
}
};
@@ -1073,6 +1106,7 @@ void AddSC_paladin_spell_scripts()
new spell_pal_divine_storm_dummy();
new spell_pal_exorcism_and_holy_wrath_damage();
new spell_pal_eye_for_an_eye();
new spell_pal_glyph_of_holy_light();
new spell_pal_grand_crusader();
new spell_pal_hand_of_sacrifice();
new spell_pal_holy_shock();