-
- class spell_pal_hand_of_reckoning_glyph : public SpellScript
- {
- PrepareSpellScript(spell_pal_hand_of_reckoning_glyph);
-
- SpellCastResult CheckCast()
- {
- Unit* caster = GetCaster();
- if (caster->HasAura(900005))
- {
- if (Unit* target = GetExplTargetUnit())
- {
- caster->CastSpell(target, 900010, false);
- }
- SetCustomCastResultMessage(SPELL_CUSTOM_ERROR_NONE);
- return SPELL_FAILED_DONT_REPORT;
- }
-
- return SPELL_CAST_OK;
- }
-
- void Register() override
- {
- OnCheckCast += SpellCheckCastFn(spell_pal_hand_of_reckoning_glyph::CheckCast);
- }
- };
-
- class spell_pal_hand_of_reckoning_glyph_dummy : public SpellScript
- {
- PrepareSpellScript(spell_pal_hand_of_reckoning_glyph_dummy);
-
- void HandleDummy(SpellEffIndex effIndex)
- {
- Unit* caster = GetCaster();
- caster->AddSpellCooldown(62124, 0, GetSpellInfo()->RecoveryTime);
- if (Player* player = GetCaster()->ToPlayer())
- {
- WorldPacket data;
- caster->BuildCooldownPacket(data, SPELL_COOLDOWN_FLAG_INCLUDE_GCD, 62124, GetSpellInfo()->RecoveryTime);
- player->SendDirectMessage(&data);
- }
-
- if (Unit* target = GetHitUnit())
- {
- if (target->GetVictim() != caster)
- {
- caster->CastSpell(target, 67485, true);
- target->CombatStart(caster);
- }
- }
- }
-
- void Register() override
- {
- OnEffectHitTarget += SpellEffectFn(spell_pal_hand_of_reckoning_glyph_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
- }
- };
复制代码
用了两个spell script搞定,900005是雕文光环,900010是假技能。改spellinfo真的有点脏 |