Exemplo n.º 1
0
 public IOClient(Connection s)
 {
     this.connection    = s;
     this.connectedAt   = Server.CurrentTimeMillis();
     this.mm_stream     = new PacketWriter(255);
     this.castHandler   = new CastHandler(this, handler);
     this.combatHandler = new CombatHandler2(this, handler);
     //    IOHostList.add(connectedFrom);
 }
Exemplo n.º 2
0
        public bool IsValidTarget(FightActor actor)
        {
            if (actor.GetBuffs(x => x is SpellImmunityBuff && CastHandler.IsCastedBySpell(((SpellImmunityBuff)x).SpellImmune)).Any())
            {
                return(false);
            }

            var lookup = Targets.ToLookup(x => x.GetType());

            return(lookup.All(x => x.First().IsDisjonction ?
                              x.Any(y => y.IsTargetValid(actor, this)) : x.All(y => y.IsTargetValid(actor, this))));
        }