Exemple #1
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("login_req");
            {
                if (writer.WriteFieldBegin("name"))
                {
                    writer.Write(this._name);
                }
                writer.WriteFieldEnd("name");
            }

            {
                if (writer.WriteFieldBegin("password"))
                {
                    writer.Write(this._password);
                }
                writer.WriteFieldEnd("password");
            }

            {
                if (writer.WriteFieldBegin("age"))
                {
                    writer.Write(this._age);
                }
                writer.WriteFieldEnd("age");
            }


            writer.WriteStructEnd("login_req");
        }
Exemple #2
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("message");
            {
                if (writer.WriteFieldBegin("mid"))
                {
                    writer.Write((int)this._mid);
                }
                else
                {
                    writer.Write(this._mid.ToString());
                }
                writer.WriteFieldEnd("mid");
            }

            {
                if (writer.WriteFieldBegin("body"))
                {
                    this._body.Write(writer, this.mid);
                }
                writer.WriteFieldEnd("body");
            }


            writer.WriteStructEnd("message");
        }
Exemple #3
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("tconnd_instance_config");
            {
                if (writer.WriteFieldBegin("level"))
                {
                    writer.Write((int)this._level);
                }
                else
                {
                    writer.Write(this._level.ToString());
                }
                writer.WriteFieldEnd("level");
            }

            {
                if (writer.WriteFieldBegin("ip"))
                {
                    writer.Write(this._ip);
                }
                writer.WriteFieldEnd("ip");
            }

            {
                if (writer.WriteFieldBegin("port"))
                {
                    writer.Write(this._port);
                }
                writer.WriteFieldEnd("port");
            }

            {
                if (writer.WriteFieldBegin("backlog"))
                {
                    writer.Write(this._backlog);
                }
                writer.WriteFieldEnd("backlog");
            }

            {
                if (writer.WriteFieldBegin("epoll_size"))
                {
                    writer.Write(this._epoll_size);
                }
                writer.WriteFieldEnd("epoll_size");
            }


            writer.WriteStructEnd("tconnd_instance_config");
        }
Exemple #4
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("tconnd_config");
            {
                if (writer.WriteFieldBegin("log_config"))
                {
                    writer.Write(this._log_config);
                }
                writer.WriteFieldEnd("log_config");
            }

            {
                writer.WriteVectorBegin();

                if (writer.WriteFieldBegin("instance_config_num"))
                {
                    this._instance_config_num = (uint)this._instance_config.Length;
                    writer.Write(this._instance_config_num);
                }
                writer.WriteFieldEnd("instance_config_num");

                for (uint i = 0; i < Constants.TONND_CONFIG_NUM; ++i)
                {
                    if (i == this._instance_config_num)
                    {
                        break;
                    }

                    if (writer.WriteVectorElementBegin("instance_config", i))
                    {
                        this._instance_config[i].Write(writer);
                    }
                    writer.WriteVectorElementEnd("instance_config", i);
                }
                writer.WriteVectorEnd();
            }


            writer.WriteStructEnd("tconnd_config");
        }
Exemple #5
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("login_rsp");
            {
                if (writer.WriteFieldBegin("result"))
                {
                    writer.Write(this._result);
                }
                writer.WriteFieldEnd("result");
            }

            if (this.result == 0)
            {
                if (writer.WriteFieldBegin("session_id"))
                {
                    writer.Write(this._session_id);
                }
                writer.WriteFieldEnd("session_id");
            }


            writer.WriteStructEnd("login_rsp");
        }
Exemple #6
0
        public void Write(TWriter writer)
        {
            writer.WriteStructBegin("item_table");
            {
                if (writer.WriteFieldBegin("ID"))
                {
                    writer.Write(this._ID);
                }
                writer.WriteFieldEnd("ID");
            }

            {
                if (writer.WriteFieldBegin("ItemName"))
                {
                    writer.Write(this._ItemName);
                }
                writer.WriteFieldEnd("ItemName");
            }

            {
                if (writer.WriteFieldBegin("Metempsychosis"))
                {
                    writer.Write(this._Metempsychosis);
                }
                writer.WriteFieldEnd("Metempsychosis");
            }

            {
                if (writer.WriteFieldBegin("UseTime"))
                {
                    writer.Write(this._UseTime);
                }
                writer.WriteFieldEnd("UseTime");
            }

            {
                if (writer.WriteFieldBegin("Bill"))
                {
                    writer.Write(this._Bill);
                }
                writer.WriteFieldEnd("Bill");
            }

            {
                if (writer.WriteFieldBegin("ReplaceItem"))
                {
                    writer.Write(this._ReplaceItem);
                }
                writer.WriteFieldEnd("ReplaceItem");
            }

            {
                if (writer.WriteFieldBegin("Medals"))
                {
                    writer.Write(this._Medals);
                }
                writer.WriteFieldEnd("Medals");
            }

            {
                if (writer.WriteFieldBegin("Value"))
                {
                    writer.Write(this._Value);
                }
                writer.WriteFieldEnd("Value");
            }

            {
                if (writer.WriteFieldBegin("ReserveMoneyFlag"))
                {
                    writer.Write(this._ReserveMoneyFlag);
                }
                writer.WriteFieldEnd("ReserveMoneyFlag");
            }

            {
                if (writer.WriteFieldBegin("Quality"))
                {
                    writer.Write(this._Quality);
                }
                writer.WriteFieldEnd("Quality");
            }

            {
                if (writer.WriteFieldBegin("ItemType"))
                {
                    writer.Write((int)this._ItemType);
                }
                else
                {
                    writer.Write(this._ItemType.ToString());
                }
                writer.WriteFieldEnd("ItemType");
            }

            {
                if (writer.WriteFieldBegin("UseSingTime"))
                {
                    writer.Write(this._UseSingTime);
                }
                writer.WriteFieldEnd("UseSingTime");
            }

            {
                if (writer.WriteFieldBegin("UserTarget"))
                {
                    writer.Write(this._UserTarget);
                }
                writer.WriteFieldEnd("UserTarget");
            }

            {
                if (writer.WriteFieldBegin("CanMoved"))
                {
                    writer.Write(this._CanMoved);
                }
                writer.WriteFieldEnd("CanMoved");
            }

            {
                if (writer.WriteFieldBegin("CanDeleted"))
                {
                    writer.Write(this._CanDeleted);
                }
                writer.WriteFieldEnd("CanDeleted");
            }

            {
                if (writer.WriteFieldBegin("CanTrade"))
                {
                    writer.Write(this._CanTrade);
                }
                writer.WriteFieldEnd("CanTrade");
            }

            {
                if (writer.WriteFieldBegin("CanSold"))
                {
                    writer.Write(this._CanSold);
                }
                writer.WriteFieldEnd("CanSold");
            }

            {
                if (writer.WriteFieldBegin("CanStored"))
                {
                    writer.Write(this._CanStored);
                }
                writer.WriteFieldEnd("CanStored");
            }

            {
                if (writer.WriteFieldBegin("CanLocked"))
                {
                    writer.Write(this._CanLocked);
                }
                writer.WriteFieldEnd("CanLocked");
            }

            {
                if (writer.WriteFieldBegin("CanBound"))
                {
                    writer.Write(this._CanBound);
                }
                writer.WriteFieldEnd("CanBound");
            }

            {
                if (writer.WriteFieldBegin("IsExclusive"))
                {
                    writer.Write(this._IsExclusive);
                }
                writer.WriteFieldEnd("IsExclusive");
            }

            {
                if (writer.WriteFieldBegin("IsExpendable"))
                {
                    writer.Write(this._IsExpendable);
                }
                writer.WriteFieldEnd("IsExpendable");
            }

            {
                if (writer.WriteFieldBegin("ColdDownType"))
                {
                    writer.Write(this._ColdDownType);
                }
                writer.WriteFieldEnd("ColdDownType");
            }

            {
                if (writer.WriteFieldBegin("ColdDownTime"))
                {
                    writer.Write(this._ColdDownTime);
                }
                writer.WriteFieldEnd("ColdDownTime");
            }

            {
                if (writer.WriteFieldBegin("CanDrop"))
                {
                    writer.Write(this._CanDrop);
                }
                writer.WriteFieldEnd("CanDrop");
            }

            {
                if (writer.WriteFieldBegin("DecomposePackID"))
                {
                    writer.Write(this._DecomposePackID);
                }
                writer.WriteFieldEnd("DecomposePackID");
            }

            {
                if (writer.WriteFieldBegin("IsMerge"))
                {
                    writer.Write(this._IsMerge);
                }
                writer.WriteFieldEnd("IsMerge");
            }

            {
                writer.WriteVectorBegin();

                if (writer.WriteFieldBegin("vec_num"))
                {
                    this._vec_num = (uint)this._vec.Length;
                    writer.Write(this._vec_num);
                }
                writer.WriteFieldEnd("vec_num");

                for (uint i = 0; i < Constants.ITEM_VEC_NUM; ++i)
                {
                    if (i == this._vec_num)
                    {
                        break;
                    }

                    if (writer.WriteVectorElementBegin("vec", i))
                    {
                        writer.Write(this._vec[i]);
                    }
                    writer.WriteVectorElementEnd("vec", i);
                }
                writer.WriteVectorEnd();
            }


            writer.WriteStructEnd("item_table");
        }