public override void OnAfterDelete() { if (!_Processing) { AllHeads.Remove(this); } base.OnAfterDelete(); }
public void Expire() { if (_ExpireProcessed) { return; } _ExpireProcessed = true; AllHeads.Remove(this); Hue = 568; InvalidateName(); }
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); } }
public static List <HeadType> AllHeadsForCrownAndGender(CrownType crown, Gender gender) { return(AllHeads.Where(x => x.Gender == gender && x.CrownType == crown).ToList()); }
public static List <HeadType> AllHeadsForCrown(CrownType crown) { return(AllHeads.Where(x => x.CrownType == crown).ToList()); }