private void HandleOption(HumanOption option) { if (option is HumanOptionEmote) { var emote = (HumanOptionEmote)option; Emote = emote.emoteId > 0 ? ObjectDataManager.Instance.Get <Emoticon>(emote.emoteId) : null; EmoteStartTime = emote.emoteStartTime > 0 ? new DateTime?(emote.emoteStartTime.UnixTimestampToDateTime()) : null; } else if (option is HumanOptionFollowers) { m_followingCharactersLook = new ObservableCollectionMT <IndexedEntityLook>(((HumanOptionFollowers)option).followingCharactersLook); } else if (option is HumanOptionGuild) { // todo : guild } else if (option is HumanOptionOrnament) { // todo } else if (option is HumanOptionTitle) { // todo } else { throw new Exception(string.Format("Unattempt HumanOption type {0}", option.GetType())); } }
public virtual void Deserialize(BigEndianReader reader) { Restrictions = new ActorRestrictionsInformations(); Restrictions.Deserialize(reader); Sex = reader.ReadBoolean(); var limit = reader.ReadUShort(); Options = new HumanOption[limit]; for (int i = 0; i < limit; i++) { Options[i] = Types.ProtocolTypeManager.GetInstance<HumanOption>(reader.ReadShort()); Options[i].Deserialize(reader); } }
public HumanInformations(ActorRestrictionsInformations restrictions, bool sex, HumanOption[] options) { Restrictions = restrictions; Sex = sex; Options = options; }