Пример #1
0
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);

            var ability = EntityManager9.BaseAbilities.FirstOrDefault(
                x => x.Id == (this.Id == AbilityId.shredder_chakram
                                  ? AbilityId.shredder_return_chakram
                                  : AbilityId.shredder_return_chakram_2) && x.Owner?.Handle == owner.Handle);

            if (ability == null)
            {
                throw new ArgumentNullException(nameof(this.ReturnChakram));
            }

            this.ReturnChakram = (ReturnChakram)EntityManager9.AddAbility(ability);
        }
Пример #2
0
        // Token: 0x06000C0D RID: 3085 RVA: 0x00025454 File Offset: 0x00023654
        internal override void SetOwner(Unit9 owner)
        {
            base.SetOwner(owner);
            Ability ability = EntityManager9.BaseAbilities.FirstOrDefault(delegate(Ability x)
            {
                if (x.Id == ((this.Id == AbilityId.shredder_chakram) ? AbilityId.shredder_return_chakram : AbilityId.shredder_return_chakram_2))
                {
                    Entity owner2             = x.Owner;
                    EntityHandle?entityHandle = (owner2 != null) ? new EntityHandle?(owner2.Handle) : null;
                    return(((entityHandle != null) ? new uint?(entityHandle.GetValueOrDefault()) : null) == owner.Handle);
                }
                return(false);
            });

            if (ability == null)
            {
                throw new ArgumentNullException("ReturnChakram");
            }
            this.ReturnChakram = (ReturnChakram)EntityManager9.AddAbility(ability);
        }