Example #1
0
 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()));
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 public HumanInformations(ActorRestrictionsInformations restrictions, bool sex, HumanOption[] options)
 {
     Restrictions = restrictions;
     Sex = sex;
     Options = options;
 }