Exemple #1
0
    internal void OnXocDia_DatLai(Message message)
    {
        string       nick  = message.reader().ReadUTF();
        sbyte        socua = message.reader().ReadByte();
        XocDiaPlayer pl    = (XocDiaPlayer)GetPlayerWithName(nick);

        for (int i = 0; i < socua; i++)
        {
            sbyte cua = message.reader().ReadByte();
            sbyte a   = message.reader().ReadByte();
            if (a == 1)
            {
                sbyte soloaichip = message.reader().ReadByte();
                for (int j = 0; j < soloaichip; j++)
                {
                    sbyte loaichip = message.reader().ReadByte();
                    int   sochip   = message.reader().ReadInt();
                    for (int k = 0; k < sochip; k++)
                    {
                        //						pl.ActionChipDatCuoc (cua, btn_cua_cuoc [cua].transform.position, obj_pre_chip);
                        pl.ActionChipDatCuoc(cua, GenPostionRandomInCua(cua), obj_pre_chip, sochip);
                    }
                }
            }
        }
    }
Exemple #2
0
    internal void OnXocDia_DatCuoc(Message message)
    {
        string nick     = message.reader().ReadUTF();
        sbyte  cua      = message.reader().ReadByte();
        long   money    = message.reader().ReadLong();
        int    typeCHIP = message.reader().ReadByte();

        XocDiaPlayer pl = (XocDiaPlayer)GetPlayerWithName(nick);

        if (pl != null)
        {
            //			pl.ActionChipDatCuoc (cua, btn_cua_cuoc [cua].transform.position, obj_pre_chip);
            pl.ActionChipDatCuoc(cua, GenPostionRandomInCua(cua), obj_pre_chip, money);
        }
        sum_money[cua]         += money;
        txt_sum_money[cua].text = MoneyHelper.FormatMoneyNormal(sum_money[cua]);
        if (nick.Equals(ClientConfig.UserInfo.UNAME))
        {
            sum_me_money[cua]     += money;
            txt_me_money[cua].text = MoneyHelper.FormatMoneyNormal(sum_me_money[cua]);
        }
    }