mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/Spells/spell_paladin.cpp
This commit is contained in:
@@ -1181,7 +1181,7 @@ class spell_dru_wild_growth : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) OVERRIDE
|
||||
{
|
||||
if (spellInfo->Effects[EFFECT_2].IsEffect() || !spellInfo->Effects[EFFECT_2].CalcValue())
|
||||
if (spellInfo->Effects[EFFECT_2].IsEffect() || spellInfo->Effects[EFFECT_2].CalcValue() <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -1190,9 +1190,9 @@ class spell_dru_wild_growth : public SpellScriptLoader
|
||||
{
|
||||
targets.remove_if(RaidCheck(GetCaster()));
|
||||
|
||||
int32 const maxTargets = GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster());
|
||||
uint32 const maxTargets = uint32(GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()));
|
||||
|
||||
if (targets.size() > uint32(maxTargets))
|
||||
if (targets.size() > maxTargets)
|
||||
{
|
||||
targets.sort(Trinity::HealthPctOrderPred());
|
||||
targets.resize(maxTargets);
|
||||
|
||||
@@ -290,7 +290,7 @@ enum PilgrimsBountyBuffFood
|
||||
class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
|
||||
{
|
||||
private:
|
||||
uint32 _triggeredSpellId;
|
||||
uint32 const _triggeredSpellId;
|
||||
public:
|
||||
spell_pilgrims_bounty_buff_food(const char* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
|
||||
|
||||
@@ -298,7 +298,7 @@ class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pilgrims_bounty_buff_food_AuraScript)
|
||||
private:
|
||||
uint32 _triggeredSpellId;
|
||||
uint32 const _triggeredSpellId;
|
||||
|
||||
public:
|
||||
spell_pilgrims_bounty_buff_food_AuraScript(uint32 triggeredSpellId) : AuraScript(), _triggeredSpellId(triggeredSpellId) { }
|
||||
@@ -311,6 +311,7 @@ class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
|
||||
|
||||
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (_handled)
|
||||
return;
|
||||
|
||||
|
||||
@@ -56,6 +56,10 @@ enum PaladinSpells
|
||||
SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA = 63510,
|
||||
SPELL_PALADIN_IMPROVED_DEVOTION_AURA = 63514,
|
||||
SPELL_PALADIN_ITEM_HEALING_TRANCE = 37706,
|
||||
SPELL_PALADIN_JUDGEMENT_DAMAGE = 54158,
|
||||
SPELL_PALADIN_JUDGEMENT_OF_JUSTICE = 20184,
|
||||
SPELL_PALADIN_JUDGEMENT_OF_LIGHT = 20185,
|
||||
SPELL_PALADIN_JUDGEMENT_OF_WISDOM = 20186,
|
||||
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
|
||||
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531,
|
||||
SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 = 31869,
|
||||
@@ -826,6 +830,96 @@ class spell_pal_item_healing_discount : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 53407 - Judgement of Justice
|
||||
// 20271 - Judgement of Light
|
||||
// 53408 - Judgement of Wisdom
|
||||
class spell_pal_judgement : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pal_judgement(char const* scriptName, uint32 spellId) : SpellScriptLoader(scriptName), _spellId(spellId) { }
|
||||
|
||||
class spell_pal_judgement_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pal_judgement_SpellScript);
|
||||
|
||||
public:
|
||||
spell_pal_judgement_SpellScript(uint32 spellId) : SpellScript(), _spellId(spellId) { }
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_JUDGEMENT_DAMAGE)
|
||||
|| !sSpellMgr->GetSpellInfo(_spellId))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
uint32 spellId2 = SPELL_PALADIN_JUDGEMENT_DAMAGE;
|
||||
|
||||
// some seals have SPELL_AURA_DUMMY in EFFECT_2
|
||||
Unit::AuraEffectList const& auras = GetCaster()->GetAuraEffectsByType(SPELL_AURA_DUMMY);
|
||||
for (Unit::AuraEffectList::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL && (*i)->GetEffIndex() == EFFECT_2)
|
||||
if (sSpellMgr->GetSpellInfo((*i)->GetAmount()))
|
||||
{
|
||||
spellId2 = (*i)->GetAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GetCaster()->CastSpell(GetHitUnit(), _spellId, true);
|
||||
GetCaster()->CastSpell(GetHitUnit(), spellId2, true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pal_judgement_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 const _spellId;
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_pal_judgement_SpellScript(_spellId);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 const _spellId;
|
||||
};
|
||||
|
||||
// 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
|
||||
{
|
||||
@@ -1114,6 +1208,10 @@ void AddSC_paladin_spell_scripts()
|
||||
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("spell_pal_judgement_of_justice", SPELL_PALADIN_JUDGEMENT_OF_JUSTICE);
|
||||
new spell_pal_judgement("spell_pal_judgement_of_light", SPELL_PALADIN_JUDGEMENT_OF_LIGHT);
|
||||
new spell_pal_judgement("spell_pal_judgement_of_wisdom", SPELL_PALADIN_JUDGEMENT_OF_WISDOM);
|
||||
new spell_pal_judgement_of_command();
|
||||
new spell_pal_lay_on_hands();
|
||||
new spell_pal_righteous_defense();
|
||||
new spell_pal_sacred_shield();
|
||||
|
||||
@@ -79,7 +79,7 @@ enum MiscSpells
|
||||
class PowerCheck
|
||||
{
|
||||
public:
|
||||
explicit PowerCheck(Powers power) : _power(power) { }
|
||||
explicit PowerCheck(Powers const power) : _power(power) { }
|
||||
|
||||
bool operator()(WorldObject* obj) const
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class PowerCheck
|
||||
}
|
||||
|
||||
private:
|
||||
Powers _power;
|
||||
Powers const _power;
|
||||
};
|
||||
|
||||
class RaidCheck
|
||||
|
||||
Reference in New Issue
Block a user