- Code: Select all
protected void EventHandler(DOLEvent e, object sender, EventArgs args)
{
Cancel(false);
}
new code
- Code: Select all
protected void EventHandler(DOLEvent e, object sender, EventArgs args)
{
GamePlayer player = (GamePlayer)sender;
AttackFinishedEventArgs attacker = args as AttackFinishedEventArgs;
AttackData ad = null;
SelectiveBlindnessEffect select = (SelectiveBlindnessEffect)attacker.AttackData.Target.EffectList.GetOfType(typeof(SelectiveBlindnessEffect));
if (ad.AttackType == AttackData.eAttackType.Spell && attacker.AttackData.SpellHandler.Spell.Target == "Enemy")
{
if (attacker.AttackData.SpellHandler.Spell.Radius > 0)
{
foreach (GamePlayer t in player.GetPlayersInRadius((ushort)attacker.AttackData.SpellHandler.Spell.Radius))
{
select = (SelectiveBlindnessEffect)t.EffectList.GetOfType(typeof(SelectiveBlindnessEffect));
if (select != null && select.EffectSource == player)
select.Cancel(false);
}
}
else if (select != null)
select.Cancel(false);
}
else if (ad.IsMeleeAttack && select != null && select.EffectSource == player)
select.Cancel(false);
}
If im not mistaken this new code should make mentalist's RR5 livelike, where as long as they don't cause a threat to the target under there rr5's effect, it won't cancel (A.k there allowed to heal, HoT, anything none-aggressive on that target)
any thoughts?