コード例 #1
0
    public static NetworkRequest Prepare(short action, short type)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SPECIES_ACTION);
        request.AddShort16(action);
        request.AddShort16(type);

        return request;
    }
コード例 #2
0
    public static NetworkRequest Prepare(short action, short type)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SPECIES_ACTION);

        request.AddShort16(action);
        request.AddShort16(type);

        return(request);
    }
コード例 #3
0
    public static NetworkRequest Prepare(short type, Dictionary<int, int> cartList)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SHOP_ACTION);
        request.AddShort16(type);
        request.AddShort16((short) cartList.Count);

        foreach (KeyValuePair<int, int> entry in cartList) {
            request.AddInt32(entry.Key);
            request.AddInt32(entry.Value);
        }

        return request;
    }
コード例 #4
0
    public static NetworkRequest Prepare(short action, Dictionary<int, int> speciesList)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SPECIES_ACTION);
        request.AddShort16(action);
        request.AddShort16((short) speciesList.Count);

        foreach (KeyValuePair<int, int> entry in speciesList) {
            request.AddInt32(entry.Key);
            request.AddInt32(entry.Value);
        }

        return request;
    }
コード例 #5
0
    public static NetworkRequest Prepare(short type, Dictionary <int, int> cartList)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SHOP_ACTION);

        request.AddShort16(type);
        request.AddShort16((short)cartList.Count);

        foreach (KeyValuePair <int, int> entry in cartList)
        {
            request.AddInt32(entry.Key);
            request.AddInt32(entry.Value);
        }

        return(request);
    }
コード例 #6
0
    public static NetworkRequest Prepare(short action, Dictionary <int, int> speciesList)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SPECIES_ACTION);

        request.AddShort16(action);
        request.AddShort16((short)speciesList.Count);

        foreach (KeyValuePair <int, int> entry in speciesList)
        {
            request.AddInt32(entry.Key);
            request.AddInt32(entry.Value);
        }

        return(request);
    }
コード例 #7
0
    public static NetworkRequest Prepare(short type)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.CHART);
        request.AddShort16(type);

        return request;
    }
コード例 #8
0
    public static NetworkRequest Prepare(short game_id)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.PLAY_GAME);
        request.AddShort16(game_id);

        return request;
    }
コード例 #9
0
    public static NetworkRequest Prepare(short type)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.CHART);

        request.AddShort16(type);

        return(request);
    }
コード例 #10
0
    public static NetworkRequest Prepare(short game_id)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.PLAY_GAME);

        request.AddShort16(game_id);

        return(request);
    }
コード例 #11
0
    public static NetworkRequest Prepare(short type)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.SHOP);

//		request.addShort16(0);
        request.AddShort16(type);

        return(request);
    }
コード例 #12
0
    public static NetworkRequest Prepare(short betEntered, int improveValue)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.MC_BET_UPDATE);

        request.AddShort16(betEntered);
        request.AddInt32(improveValue);

        return(request);
    }
コード例 #13
0
    public static NetworkRequest Prepare(short type, string message)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.MESSAGE);

        request.AddShort16(type);
        request.AddString(message);

        return(request);
    }
コード例 #14
0
    /*
     * types:
     * 0 - regular message
     * 1 - server message (?)
     * 2 - private message
     *
     * status:
     * 0 - OK
     * 1 - whipser failed
     */
    public static NetworkRequest Prepare(short type, string message, string recipient)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.MESSAGE);
        request.AddShort16(type);
        request.AddString(message);
        request.AddString(recipient);

        return request;
    }
コード例 #15
0
    public static NetworkRequest Prepare(int playerID, int roomID, short host, string userName)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.MC_MATCH_INIT);

        request.AddInt32(playerID);
        request.AddInt32(roomID);
        request.AddShort16(host);
        request.AddString(userName);

        return(request);
    }
コード例 #16
0
    public static NetworkRequest Prepare(short game_id, int credits)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.END_GAME);
        request.AddShort16(game_id);

        if (game_id == 1) {
            request.AddInt32(credits);
        }

        return request;
    }
コード例 #17
0
    public static NetworkRequest Prepare(short game_id, int credits)
    {
        NetworkRequest request = new NetworkRequest(NetworkCode.END_GAME);

        request.AddShort16(game_id);

        if (game_id == 1)
        {
            request.AddInt32(credits);
        }

        return(request);
    }