Closed CrossUCI closed 5 years ago
Maybe this can help you
// -87168 - Long Arm of the Law class spell_pal_long_arm_of_the_law : public AuraScript { PrepareAuraScript(spell_pal_long_arm_of_the_law);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PALADIN_LONG_ARM_OF_THE_LAW });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
if (roll_chance_i(GetEffect(EFFECT_0)->GetAmount()))
if (Spell const* spell = eventInfo.GetProcSpell())
if (Unit* target = spell->m_targets.GetUnitTarget())
return (eventInfo.GetActor()->GetDistance2d(target) > 15.0f);
return false;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_LONG_ARM_OF_THE_LAW, true, nullptr, aurEff);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_pal_long_arm_of_the_law::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_pal_long_arm_of_the_law::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
it does not work, i will keep looking
This is the other way that i mention frank
// Judgement - 54158 class spell_pal_judgement : public SpellScriptLoader { public: spell_pal_judgement() : SpellScriptLoader("spell_pal_judgement") { }
class spell_pal_judgement_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pal_judgement_SpellScript);
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Player* caster = GetCaster()->ToPlayer();
int32 spellPower = caster->SpellBaseDamageBonusDone(GetSpellInfo()->GetSchoolMask());
int32 attackPower = caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 basepoints0 = 0;
Unit::AuraApplicationMap & sealAuras = caster->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator iter = sealAuras.begin(); iter != sealAuras.end(); iter++)
{
Aura* aura = iter->second->GetBase();
if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_SEAL)
{
switch (aura->GetSpellInfo()->Id)
{
case 20165: // Seal of Insight
basepoints0 = 0.25f * spellPower + 0.16f * attackPower;
break;
case 20154: // Seal of Righteousness
basepoints0 = 0.32f * spellPower + 0.2f * attackPower;
break;
case 20164: // Seal of Justice
basepoints0 = 0.25f * spellPower + 0.16f * attackPower;
break;
case 31801: // Seal of Truth
{
basepoints0 = 0.223f * spellPower + 0.142f * attackPower;
// Damage is increased by 20% per stack
if (Aura* censure = GetHitUnit()->GetAura(31803, caster->GetGUID()))
AddPct(basepoints0, censure->GetStackAmount() * 20);
break;
}
}
break;
}
}
caster->CastCustomSpell(GetHitUnit(), 54158, &basepoints0, NULL, NULL, true);
// Long arm of the law
if (AuraEffect* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PALADIN, 3013, EFFECT_0))
if (roll_chance_i(aurEff->GetAmount()))
if (caster->GetDistance(GetHitUnit()) > 15.0f)
caster->CastSpell(caster, 87173, true);
// Communion
if (AuraEffect* communion = caster->GetAuraEffect(31876, EFFECT_1, caster->GetGUID()))
caster->CastSpell(caster, 57669, true);
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_pal_judgement_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const
{
return new spell_pal_judgement_SpellScript();
}
};
have you tested the spell 54158 Judgement ??
and what is with the first spell 87168 - Long Arm of the Law ( obsolete or needed to ?? )
yes i tested but i dont know that is missing an spell_proc in database or something, i just know that dont work the problem is that Long Arm of the Law have like 2 spells as i see
87168 [Rank 1] Your Judgement has a 50% chance to increase your movement speed by 45% for 4sec when used on targets at or further than 15 yards from you.
87172 [Rank 2] Your Judgement has a 100% chance to increase your movement speed by 45% for 4sec when used on targets at or further than 15 yards from you.
in our db the spell 87168 is included as -87168 and that (-) means it a ranked spell.. so the spell 87172 is called with same script -87168.. the different of the ranked spells are basepoints (value of 50 or 100).. and this is calculated on all spells.. so if i compare script/spellwork then it should work for 87168 and 87172..
the result of the computed basepoints is send as custom spell 54158 to target.. maybe here is a problem.. we have a script for spell 54158 to.. and this script uses PreventDefaultAction.. so all other prepared values (from spell 87168 or 87172) are cleared..
Class: Paladin Spec: Retribution What should do : Your Judgement has a [50%/100%] chance to increase your movement speed by 45% for 4 sec when used on targets at or further than 15 yards from you What does : Nothing