示例#1
0
        public override void OnAfterDelete()
        {
            if (!_Processing)
            {
                AllHeads.Remove(this);
            }

            base.OnAfterDelete();
        }
示例#2
0
        public void Expire()
        {
            if (_ExpireProcessed)
            {
                return;
            }

            _ExpireProcessed = true;

            AllHeads.Remove(this);

            Hue = 568;
            InvalidateName();
        }
示例#3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.GetVersion();

            switch (version)
            {
            case 6:
                IsTown = reader.ReadBool();
                goto case 5;

            case 5:
                _Owner = reader.ReadMobile <PlayerMobile>();
                goto case 4;

            case 4:
                _ExpireDate = reader.ReadDateTime();
                goto case 3;

            case 3:
            {
                _ExpireProcessed = reader.ReadBool();
                _Player          = reader.ReadMobile <PlayerMobile>();
                _HeadName        = reader.ReadString();
                _TypeOf          = (HeadType)reader.ReadEncodedInt();
            }
                goto case 2;

            case 2:
            case 1:
            case 0:
                break;
            }

            if (_Player != null && TypeOf == HeadType.Regular && !Expired)
            {
                AllHeads.Add(this);
            }
        }
示例#4
0
 public static List <HeadType> AllHeadsForCrownAndGender(CrownType crown, Gender gender)
 {
     return(AllHeads.Where(x => x.Gender == gender && x.CrownType == crown).ToList());
 }
示例#5
0
 public static List <HeadType> AllHeadsForCrown(CrownType crown)
 {
     return(AllHeads.Where(x => x.CrownType == crown).ToList());
 }