双端交互

双端交互协议

互动道具类型

  • 新增红包类型

    enum emPraiseType
    {
      emPraiseType_Flower = 1,
      emPraiseType_Egg = 2,
      emPraiseType_BigFlower = 3,
       emPraiseType_Times = 4,   // 使用次数
    
      //新增
      emPraiseType_RedPack = 5,  // 红包
       emPraiseType_RedPack_Cnt = 6,  // 红包数目
    
      emPraiseType_JingNiYiBei = 7,   //敬你一杯
      emPraiseType_StrawSandals = 8,  //草鞋
      emPraiseType_JinLongFuTi = 9,   //金龙附体
      emPraiseType_RayPenalty = 10,   //雷罚
    };
    

互动道具的使用 [原协议]

CLIENT_DBS_PRAISE_REQ = 21453                
CLIENT_DBS_PRAISE_REP = 21454

互动道具使用&更新通知 [修改]

SS_CLIENT_PRAISE_NTF = 21665,

struct SSClientPraiseNtf : public PacketBase
{
    unsigned int  praisetype; //emPraiseType
    unsigned int  tblid;
    //unsigned int  user_tempid1;
    //unsigned int  user_tempid2;
    union UNtfParams
    {
        struct
        {
            unsigned int param1;
            unsigned int param2;
            unsigned int param3;
            unsigned int param4;
            unsigned int param5;
            unsigned int param6;
        }common;
        struct
        {
            unsigned int  user_tempid1;
            unsigned int  user_tempid2;
            int charm; //魅力值变化,有正负
        }praise; //praisetype是交互类型
        struct
        {
            unsigned int flower_times;
            unsigned int egg_times;
            unsigned int JingNiYiBei_times; //敬你一杯
            unsigned int StrawSandals_times;//草鞋
            unsigned int JinLongFuTi_times; //金龙附体
            unsigned int RayPenalty_times;  //雷罚
        }left_times;//praisetype是emPraiseType_Times
        struct
        {
            unsigned int total_redpack;
            unsigned int user_id;
            char goods[32];
        }redpack;//praisetype是emPraiseType_RedPack

        struct
        {
            unsigned int daily_send_cnt;
            unsigned int daily_recv_cnt;
        }redpack_cnt;//praisetype是emPraiseType_RedPack_Cnt
    }uparam;
    SSClientPraiseNtf() : PacketBase(SS_CLIENT_PRAISE_NTF, sizeof(SSClientPraiseNtf))
    {
        PRO_ZERO_MEMORY(this, sizeof(SSClientPraiseNtf));
    }
};

注意

  • praisetype为emPraiseType_RedPack/emPraiseType_RedPack_Cnt时,为送花得红包的信息通知,客户端解析注意获取对应的内容

送花得红包通知 [新增]

交互协议

GS_CLIENT_REDPACK_NTF = 25275,

struct GsRedPackNtf : public PacketBase
{
    unsigned int redpack_cnt;  // 得到的红包数目
    unsigned int award_cnt;  // 暂时无用
    GsRedPackNtf() : PacketBase(GS_CLIENT_REDPACK_NTF, sizeof(GsRedPackNtf))
    {
        redpack_cnt = 0;
        award_cnt = 0;
        PRO_ZERO_MEMORY(this, sizeof(GsRedPackNtf));
    }
};

注意

  • 游戏结算时通知