public void addToStreamEx(Bundle stream, ROOM_PUBLIC_INFO v)
 {
     stream.writeUnicode(v.state);
     playerInfo_DataType.addToStreamEx(stream, v.playerInfo);
     stream.writeInt8(v.button);
     stream.writeInt8(v.turn);
 }
 public override void upDataClientRoomInfo(ROOM_PUBLIC_INFO arg1)
 {
     MonoBehaviour.print("upDataClientRoomInfo(ROOM_PUBLIC_INFO arg1)");
     MonoBehaviour.print(arg1.state);
     MonoBehaviour.print(arg1.playerInfo[0].holdsCount + "");
     MonoBehaviour.print(arg1.button);
     MonoBehaviour.print(arg1.turn);
 }
        public ROOM_PUBLIC_INFO createFromStreamEx(MemoryStream stream)
        {
            ROOM_PUBLIC_INFO datas = new ROOM_PUBLIC_INFO();

            datas.state      = stream.readUnicode();
            datas.playerInfo = playerInfo_DataType.createFromStreamEx(stream);
            datas.button     = stream.readInt8();
            datas.turn       = stream.readInt8();
            return(datas);
        }
 public void addToStreamEx(Bundle stream, ROOM_PUBLIC_INFO v)
 {
     stream.writeUint8(v.RoomType);
     stream.writeUint8(v.playerMaxCount);
     stream.writeUnicode(v.state);
     stream.writeInt8(v.turn);
     stream.writeUint8(v.numOfMJ);
     stream.writeInt8(v.button);
     playerInfo_DataType.addToStreamEx(stream, v.playerInfo);
     stream.writeInt8(v.chuPai);
 }
        public ROOM_PUBLIC_INFO createFromStreamEx(MemoryStream stream)
        {
            ROOM_PUBLIC_INFO datas = new ROOM_PUBLIC_INFO();

            datas.RoomType       = stream.readUint8();
            datas.playerMaxCount = stream.readUint8();
            datas.state          = stream.readUnicode();
            datas.turn           = stream.readInt8();
            datas.numOfMJ        = stream.readUint8();
            datas.button         = stream.readInt8();
            datas.playerInfo     = playerInfo_DataType.createFromStreamEx(stream);
            datas.chuPai         = stream.readInt8();
            return(datas);
        }
 public virtual void onPublic_roomInfoChanged(ROOM_PUBLIC_INFO oldValue)
 {
 }
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Byte     oldval_RoomType = RoomType;
            Property prop_RoomType   = pdatas[4];

            if (prop_RoomType.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomTypeChanged(oldval_RoomType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_RoomType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomTypeChanged(oldval_RoomType);
                    }
                }
            }

            Byte     oldval_cur_turn = cur_turn;
            Property prop_cur_turn   = pdatas[5];

            if (prop_cur_turn.isBase())
            {
                if (inited && !inWorld)
                {
                    onCur_turnChanged(oldval_cur_turn);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_cur_turn.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onCur_turnChanged(oldval_cur_turn);
                    }
                }
            }

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Byte     oldval_numOfMJ = numOfMJ;
            Property prop_numOfMJ   = pdatas[6];

            if (prop_numOfMJ.isBase())
            {
                if (inited && !inWorld)
                {
                    onNumOfMJChanged(oldval_numOfMJ);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_numOfMJ.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNumOfMJChanged(oldval_numOfMJ);
                    }
                }
            }

            Byte     oldval_playerMaxCount = playerMaxCount;
            Property prop_playerMaxCount   = pdatas[7];

            if (prop_playerMaxCount.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerMaxCountChanged(oldval_playerMaxCount);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerMaxCount.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerMaxCountChanged(oldval_playerMaxCount);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            ROOM_PUBLIC_INFO oldval_public_roomInfo = public_roomInfo;
            Property         prop_public_roomInfo   = pdatas[8];

            if (prop_public_roomInfo.isBase())
            {
                if (inited && !inWorld)
                {
                    onPublic_roomInfoChanged(oldval_public_roomInfo);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_public_roomInfo.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPublic_roomInfoChanged(oldval_public_roomInfo);
                    }
                }
            }

            UInt64   oldval_roomKey = roomKey;
            Property prop_roomKey   = pdatas[9];

            if (prop_roomKey.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomKeyChanged(oldval_roomKey);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roomKey.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomKeyChanged(oldval_roomKey);
                    }
                }
            }
        }
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 19:
                    Byte oldval_RoomType = RoomType;
                    RoomType = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoomTypeChanged(oldval_RoomType);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoomTypeChanged(oldval_RoomType);
                        }
                    }

                    break;

                case 24:
                    Byte oldval_cur_turn = cur_turn;
                    cur_turn = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onCur_turnChanged(oldval_cur_turn);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onCur_turnChanged(oldval_cur_turn);
                        }
                    }

                    break;

                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 22:
                    Byte oldval_numOfMJ = numOfMJ;
                    numOfMJ = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onNumOfMJChanged(oldval_numOfMJ);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onNumOfMJChanged(oldval_numOfMJ);
                        }
                    }

                    break;

                case 21:
                    Byte oldval_playerMaxCount = playerMaxCount;
                    playerMaxCount = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerMaxCountChanged(oldval_playerMaxCount);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerMaxCountChanged(oldval_playerMaxCount);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 23:
                    ROOM_PUBLIC_INFO oldval_public_roomInfo = public_roomInfo;
                    public_roomInfo = ((DATATYPE_ROOM_PUBLIC_INFO)EntityDef.id2datatypes[31]).createFromStreamEx(stream);

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPublic_roomInfoChanged(oldval_public_roomInfo);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPublic_roomInfoChanged(oldval_public_roomInfo);
                        }
                    }

                    break;

                case 18:
                    UInt64 oldval_roomKey = roomKey;
                    roomKey = stream.readUint64();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
 public override void onGetRoomInfo(ROOM_PUBLIC_INFO arg1)
 {
 }
Ejemplo n.º 10
0
 public abstract void upDataClientRoomInfo(ROOM_PUBLIC_INFO arg1);
Ejemplo n.º 11
0
 public abstract void onGetRoomInfo(ROOM_PUBLIC_INFO arg1);
Ejemplo n.º 12
0
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

            if (sm.useMethodDescrAlias)
            {
                componentPropertyUType = stream.readUint8();
                methodUtype            = stream.readUint8();
            }
            else
            {
                componentPropertyUType = stream.readUint16();
                methodUtype            = stream.readUint16();
            }

            Method method = null;

            if (componentPropertyUType == 0)
            {
                method = sm.idmethods[methodUtype];
            }
            else
            {
                Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
                switch (pComponentPropertyDescription.properUtype)
                {
                default:
                    break;
                }

                return;
            }

            switch (method.methodUtype)
            {
            case 20:
                Byte OnReqCreateAvatar_arg1 = stream.readUint8();
                OnReqCreateAvatar(OnReqCreateAvatar_arg1);
                break;

            case 23:
                game_begin_push();
                break;

            case 26:
                game_chupai_push();
                break;

            case 28:
                SByte game_mopai_push_arg1 = stream.readInt8();
                game_mopai_push(game_mopai_push_arg1);
                break;

            case 34:
                TING_PAI_LIST hasTing_arg1 = ((DATATYPE_TING_PAI_LIST)method.args[0]).createFromStreamEx(stream);
                hasTing(hasTing_arg1);
                break;

            case 25:
                has_action();
                break;

            case 31:
                UInt32 onGang_arg1 = stream.readUint32();
                SByte  onGang_arg2 = stream.readInt8();
                string onGang_arg3 = stream.readUnicode();
                onGang(onGang_arg1, onGang_arg2, onGang_arg3);
                break;

            case 22:
                ROOM_PUBLIC_INFO onGetRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream);
                onGetRoomInfo(onGetRoomInfo_arg1);
                break;

            case 32:
                UInt32 onHu_arg1 = stream.readUint32();
                Byte   onHu_arg2 = stream.readUint8();
                SByte  onHu_arg3 = stream.readInt8();
                onHu(onHu_arg1, onHu_arg2, onHu_arg3);
                break;

            case 27:
                UInt32 onPlayCard_arg1 = stream.readUint32();
                SByte  onPlayCard_arg2 = stream.readInt8();
                onPlayCard(onPlayCard_arg1, onPlayCard_arg2);
                break;

            case 33:
                UInt32 onPlayCardOver_arg1 = stream.readUint32();
                SByte  onPlayCardOver_arg2 = stream.readInt8();
                onPlayCardOver(onPlayCardOver_arg1, onPlayCardOver_arg2);
                break;

            case 29:
                UInt32 otherPlayerMopai_arg1 = stream.readUint32();
                otherPlayerMopai(otherPlayerMopai_arg1);
                break;

            case 30:
                UInt32 peng_notify_push_arg1 = stream.readUint32();
                SByte  peng_notify_push_arg2 = stream.readInt8();
                peng_notify_push(peng_notify_push_arg1, peng_notify_push_arg2);
                break;

            case 21:
                playerLevelRoom();
                break;

            case 24:
                ROOM_PUBLIC_INFO upDataClientRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream);
                upDataClientRoomInfo(upDataClientRoomInfo_arg1);
                break;

            default:
                break;
            }
            ;
        }
        public override void onRemoteMethodCall(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];

            UInt16 methodUtype            = 0;
            UInt16 componentPropertyUType = 0;

            if (sm.useMethodDescrAlias)
            {
                componentPropertyUType = stream.readUint8();
                methodUtype            = stream.readUint8();
            }
            else
            {
                componentPropertyUType = stream.readUint16();
                methodUtype            = stream.readUint16();
            }

            Method method = null;

            if (componentPropertyUType == 0)
            {
                method = sm.idmethods[methodUtype];
            }
            else
            {
                Property pComponentPropertyDescription = sm.idpropertys[componentPropertyUType];
                switch (pComponentPropertyDescription.properUtype)
                {
                default:
                    break;
                }

                return;
            }

            switch (method.methodUtype)
            {
            case 13:
                Byte OnReqCreateAvatar_arg1 = stream.readUint8();
                OnReqCreateAvatar(OnReqCreateAvatar_arg1);
                break;

            case 16:
                game_begin_push();
                break;

            case 15:
                ROOM_PUBLIC_INFO onGetRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream);
                onGetRoomInfo(onGetRoomInfo_arg1);
                break;

            case 14:
                playerLevelRoom();
                break;

            case 17:
                ROOM_PUBLIC_INFO upDataClientRoomInfo_arg1 = ((DATATYPE_ROOM_PUBLIC_INFO)method.args[0]).createFromStreamEx(stream);
                upDataClientRoomInfo(upDataClientRoomInfo_arg1);
                break;

            default:
                break;
            }
            ;
        }