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

Conflicts:
	src/server/game/Spells/Auras/SpellAuras.cpp
	src/server/scripts/Spells/spell_dk.cpp
	src/server/scripts/Spells/spell_paladin.cpp
This commit is contained in:
Vincent-Michael committed 2013-07-28 18:41:57 +02:00
commit 0710f480b7
15 files changed
+401 -40

No files matched your search

+287 -19
View File
@@ -29,12 +29,14 @@
enum PaladinSpells
{
SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364,
SPELL_PALADIN_BEACON_OF_LIGHT_MARKER = 53563,
SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_DRUID = 37878,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PALADIN = 37879,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_PRIEST = 37880,
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_SHAMAN = 37881,
SPELL_PALADIN_CONCENTRACTION_AURA = 19746,
SPELL_PALADIN_DIVINE_PURPOSE_PROC = 90174,
SPELL_PALADIN_DIVINE_SACRIFICE = 64205,
SPELL_PALADIN_DIVINE_STORM = 53385,
@@ -50,9 +52,14 @@ enum PaladinSpells
SPELL_PALADIN_HOLY_SHOCK_R1_DAMAGE = 25912,
SPELL_PALADIN_HOLY_SHOCK_R1_HEALING = 25914,
SPELL_PALADIN_IMMUNE_SHIELD_MARKER = 61988,
SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA = 63510,
SPELL_PALADIN_IMPROVED_DEVOTION_AURA = 63514,
SPELL_PALADIN_ITEM_HEALING_TRANCE = 37706,
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531,
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 = 31869,
SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742,
SPELL_PALADIN_SWIFT_RETRIBUTION_R1 = 53379
};
enum MiscSpells
@@ -60,6 +67,12 @@ enum MiscSpells
SPELL_GENERIC_ARENA_DAMPENING = 74410,
SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411
};
enum PaladinSpellIcons
{
PALADIN_ICON_ID_RETRIBUTION_AURA = 555
};
/*
// 31850 - Ardent Defender
class spell_pal_ardent_defender : public SpellScriptLoader
@@ -137,6 +150,81 @@ class spell_pal_ardent_defender : public SpellScriptLoader
}
};
*/
// 31821 - Aura Mastery
class spell_pal_aura_mastery : public SpellScriptLoader
{
public:
spell_pal_aura_mastery() : SpellScriptLoader("spell_pal_aura_mastery") { }
class spell_pal_aura_mastery_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_aura_mastery_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_AURA_MASTERY_IMMUNE))
return false;
return true;
}
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_AURA_MASTERY_IMMUNE, true);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveOwnedAura(SPELL_PALADIN_AURA_MASTERY_IMMUNE, GetCasterGUID());
}
void Register() OVERRIDE
{
AfterEffectApply += AuraEffectApplyFn(spell_pal_aura_mastery_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_pal_aura_mastery_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_aura_mastery_AuraScript();
}
};
// 64364 - Aura Mastery Immune
class spell_pal_aura_mastery_immune : public SpellScriptLoader
{
public:
spell_pal_aura_mastery_immune() : SpellScriptLoader("spell_pal_aura_mastery_immune") { }
class spell_pal_aura_mastery_immune_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_aura_mastery_immune_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_CONCENTRACTION_AURA))
return false;
return true;
}
bool CheckAreaTarget(Unit* target)
{
return target->HasAura(SPELL_PALADIN_CONCENTRACTION_AURA, GetCasterGUID());
}
void Register() OVERRIDE
{
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_pal_aura_mastery_immune_AuraScript::CheckAreaTarget);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_aura_mastery_immune_AuraScript();
}
};
// 37877 - Blessing of Faith
class spell_pal_blessing_of_faith : public SpellScriptLoader
{
@@ -515,38 +603,36 @@ class spell_pal_hand_of_sacrifice : public SpellScriptLoader
}
};
// 37705 - Healing Discount
class spell_pal_item_healing_discount : public SpellScriptLoader
// 1038 - Hand of Salvation
class spell_pal_hand_of_salvation : public SpellScriptLoader
{
public:
spell_pal_item_healing_discount() : SpellScriptLoader("spell_pal_item_healing_discount") { }
spell_pal_hand_of_salvation() : SpellScriptLoader("spell_pal_hand_of_salvation") { }
class spell_pal_item_healing_discount_AuraScript : public AuraScript
class spell_pal_hand_of_salvation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_item_healing_discount_AuraScript);
PrepareAuraScript(spell_pal_hand_of_salvation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_ITEM_HEALING_TRANCE))
return false;
return true;
}
void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff);
if (Unit* caster = GetCaster())
{
// Glyph of Salvation
if (caster->GetGUID() == GetUnitOwner()->GetGUID())
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_PALADIN_GLYPH_OF_SALVATION, EFFECT_0))
amount -= aurEff->GetAmount();
}
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pal_item_healing_discount_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_pal_hand_of_salvation_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_item_healing_discount_AuraScript();
return new spell_pal_hand_of_salvation_AuraScript();
}
};
@@ -622,6 +708,177 @@ class spell_pal_holy_shock : public SpellScriptLoader
}
};
// Maybe this is incorrect
// These spells should always be cast on login, regardless of whether the player has the talent or not
// -20254 - Improved Concentration Aura
// -20138 - Improved Devotion Aura
// 31869 - Sanctified Retribution
// -53379 - Swift Retribution
class spell_pal_improved_aura : public SpellScriptLoader
{
public:
spell_pal_improved_aura(char const* name, uint32 spellId) : SpellScriptLoader(name), _spellId(spellId) { }
class spell_pal_improved_aura_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_improved_aura_AuraScript);
public:
spell_pal_improved_aura_AuraScript(uint32 spellId) : AuraScript(), _spellId(spellId) { }
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(_spellId)
|| !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1)
|| !sSpellMgr->GetSpellInfo(SPELL_PALADIN_SWIFT_RETRIBUTION_R1))
return false;
return true;
}
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
Unit* target = GetTarget();
if (!target->GetOwnedAura(_spellId))
target->CastSpell(target, _spellId, true);
}
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
uint32 spellId = GetSpellInfo()->GetFirstRankSpell()->Id;
if ((spellId == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SWIFT_RETRIBUTION_R1))
|| (spellId == SPELL_PALADIN_SWIFT_RETRIBUTION_R1 && GetTarget()->GetAuraOfRankedSpell(SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1)))
return;
GetTarget()->RemoveOwnedAura(_spellId, GetCasterGUID());
}
void Register() OVERRIDE
{
AfterEffectApply += AuraEffectApplyFn(spell_pal_improved_aura_AuraScript::HandleEffectApply, EFFECT_FIRST_FOUND, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_pal_improved_aura_AuraScript::HandleEffectRemove, EFFECT_FIRST_FOUND, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
}
private:
uint32 _spellId;
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_improved_aura_AuraScript(_spellId);
}
private:
uint32 _spellId;
};
// 63510 - Improved Concentraction Aura (Area Aura)
// 63514 - Improved Devotion Aura (Area Aura)
// 63531 - Sanctified Retribution (Area Aura)
class spell_pal_improved_aura_effect : public SpellScriptLoader
{
public:
spell_pal_improved_aura_effect(char const* name) : SpellScriptLoader(name) { }
class spell_pal_improved_aura_effect_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_improved_aura_effect_AuraScript);
bool CheckAreaTarget(Unit* target)
{
Unit::AuraApplicationMap& appliedAuras = target->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator itr = appliedAuras.begin(); itr != appliedAuras.end(); ++itr)
{
Aura const* aura = itr->second->GetBase();
if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA && aura->GetCasterGUID() == GetCasterGUID())
{
// Not allow for Retribution Aura (prevent stacking) - Retribution Aura Overflow and Retribution Aura has same spell effects
if (GetSpellInfo()->Id == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA && aura->GetSpellInfo()->SpellIconID == PALADIN_ICON_ID_RETRIBUTION_AURA)
return false;
return true;
}
}
return false;
}
void Register() OVERRIDE
{
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_pal_improved_aura_effect_AuraScript::CheckAreaTarget);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_improved_aura_effect_AuraScript();
}
};
// 37705 - Healing Discount
class spell_pal_item_healing_discount : public SpellScriptLoader
{
public:
spell_pal_item_healing_discount() : SpellScriptLoader("spell_pal_item_healing_discount") { }
class spell_pal_item_healing_discount_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pal_item_healing_discount_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_ITEM_HEALING_TRANCE))
return false;
return true;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff);
}
void Register() OVERRIDE
{
OnEffectProc += AuraEffectProcFn(spell_pal_item_healing_discount_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pal_item_healing_discount_AuraScript();
}
};
// 20425 - Judgement of Command
class spell_pal_judgement_of_command : public SpellScriptLoader
{
public:
spell_pal_judgement_of_command() : SpellScriptLoader("spell_pal_judgement_of_command") { }
class spell_pal_judgement_of_command_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pal_judgement_of_command_SpellScript);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Unit* unitTarget = GetHitUnit())
if (SpellInfo const* spell_proto = sSpellMgr->GetSpellInfo(GetEffectValue()))
GetCaster()->CastSpell(unitTarget, spell_proto, true, NULL);
}
void Register() OVERRIDE
{
OnEffectHitTarget += SpellEffectFn(spell_pal_judgement_of_command_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const OVERRIDE
{
return new spell_pal_judgement_of_command_SpellScript();
}
};
// 633 - Lay on Hands
class spell_pal_lay_on_hands : public SpellScriptLoader
{
@@ -893,6 +1150,8 @@ class spell_pal_seal_of_righteousness : public SpellScriptLoader
void AddSC_paladin_spell_scripts()
{
//new spell_pal_ardent_defender();
new spell_pal_aura_mastery();
new spell_pal_aura_mastery_immune();
new spell_pal_beacon_of_light();
new spell_pal_blessing_of_faith();
new spell_pal_divine_sacrifice();
@@ -901,8 +1160,17 @@ void AddSC_paladin_spell_scripts()
new spell_pal_exorcism_and_holy_wrath_damage();
new spell_pal_eye_for_an_eye();
new spell_pal_hand_of_sacrifice();
new spell_pal_item_healing_discount();
new spell_pal_hand_of_salvation();
new spell_pal_holy_shock();
new spell_pal_improved_aura("spell_pal_improved_concentraction_aura", SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA);
new spell_pal_improved_aura("spell_pal_improved_devotion_aura", SPELL_PALADIN_IMPROVED_DEVOTION_AURA);
new spell_pal_improved_aura("spell_pal_sanctified_retribution", SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA);
new spell_pal_improved_aura("spell_pal_swift_retribution", SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA);
new spell_pal_improved_aura_effect("spell_pal_improved_concentraction_aura_effect");
new spell_pal_improved_aura_effect("spell_pal_improved_devotion_aura_effect");
new spell_pal_improved_aura_effect("spell_pal_sanctified_retribution_effect");
new spell_pal_item_healing_discount();
new spell_pal_judgement_of_command();
new spell_pal_lay_on_hands();
new spell_pal_righteous_defense();
new spell_pal_sacred_shield();