Beispiel #1
0
 public void MergeFrom(ChannelState other)
 {
     if (other == null)
     {
         return;
     }
     if (other.entityId_ != null)
     {
         if (entityId_ == null)
         {
             entityId_ = new Bgs.Protocol.EntityId();
         }
         EntityId.MergeFrom(other.EntityId);
     }
     fieldOperation_.Add(other.fieldOperation_);
     if (other.Healing != false)
     {
         Healing = other.Healing;
     }
     if (other.presence_ != null)
     {
         if (presence_ == null)
         {
             presence_ = new Bgs.Protocol.Presence.V1.ChannelState();
         }
         Presence.MergeFrom(other.Presence);
     }
 }
Beispiel #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (entityId_ == null)
                    {
                        entityId_ = new Bgs.Protocol.EntityId();
                    }
                    input.ReadMessage(entityId_);
                    break;
                }

                case 18: {
                    fieldOperation_.AddEntriesFrom(input, _repeated_fieldOperation_codec);
                    break;
                }

                case 24: {
                    Healing = input.ReadBool();
                    break;
                }

                case 810: {
                    if (presence_ == null)
                    {
                        presence_ = new Bgs.Protocol.Presence.V1.ChannelState();
                    }
                    input.ReadMessage(presence_);
                    break;
                }
                }
            }
        }