Пример #1
0
 public ObjectInfo(ObjectBase ObjectBase, LookTypeFlags LookType, ServerString Message, ServerString Inscription)
 {
     objectBase  = ObjectBase;
     lookType    = LookType;
     message     = Message;
     inscription = Inscription;
 }
Пример #2
0
 public ObjectInfo(ObjectBase ObjectBase, LookTypeFlags LookType, ChatMessage Message, ChatMessage Inscription)
 {
     objectBase  = ObjectBase;
     lookType    = LookType;
     message     = Message;
     inscription = Inscription;
 }
Пример #3
0
 public void UpdateFromModel(ObjectInfo Model, bool RaiseChangedEvent)
 {
     if (RaiseChangedEvent)
     {
         ObjectBase  = Model.ObjectBase;
         LookType    = Model.LookType;
         Message     = Model.Message;
         Inscription = Model.Inscription;
         // don't isvisible
     }
     else
     {
         objectBase  = Model.ObjectBase;
         lookType    = Model.LookType;
         message     = Model.Message;
         inscription = Model.Inscription;
         // don't isvisible
     }
 }
Пример #4
0
 public void Clear(bool RaiseChangedEvent)
 {
     if (RaiseChangedEvent)
     {
         ObjectBase  = new ObjectBase();
         LookType    = new LookTypeFlags();
         Message     = new ServerString();
         Inscription = null;
         IsVisible   = false;
     }
     else
     {
         objectBase  = new ObjectBase();
         lookType    = new LookTypeFlags();
         message     = new ServerString();
         inscription = null;
         isVisible   = false;
     }
 }
Пример #5
0
        public int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            objectBase = new ObjectBase(true, Buffer, cursor);
            cursor    += objectBase.ByteLength;

            lookType = new LookTypeFlags(Buffer[cursor]);
            cursor++;

            message = new ServerString(ChatMessageType.ObjectChatMessage, stringResources, Buffer, cursor);
            cursor += Message.ByteLength;

            // if there is an inscription, additionally read it
            if (LookType.IsEditable || LookType.IsInscribed)
            {
                inscription = new ServerString(ChatMessageType.ObjectChatMessage, stringResources, Buffer, cursor);
                cursor     += Inscription.ByteLength;
            }

            return(cursor - StartIndex);
        }