Selective Blindness Effect (Ment's rr5)

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Selective Blindness Effect (Ment's rr5)

Postby Yemla » Sat Sep 04, 2010 4:30 pm

old code
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?
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California

Re: Selective Blindness Effect (Ment's rr5)

Postby Graveen » Sat Sep 04, 2010 4:33 pm

Hi mate,

did you test it ? it is working ? :)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Selective Blindness Effect (Ment's rr5)

Postby Yemla » Sat Sep 04, 2010 5:09 pm

Im going to after DAoC redownloads, just put it out there for anyone else to test in the meen time, if anyone can that is...otherwise by tonight ill know xP
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest