Example #1
0
        /// <summary>
        /// 服务器返回:官职升级 msgId:8688;
        /// </summary>
        /// <param name="ge"></param>
        /// <param name="parameter"></param>
        void OnGuanZhiLevelUp(GameEvent ge, EventParameter parameter)
        {
            MsgData_sGuanZhiLevelUp resp = parameter.msgParameter as MsgData_sGuanZhiLevelUp;

            //   Debug.LogError("上报升级处理结果 " + resp.result + "   上报功勋值  " + resp.val);
            if (resp.result == 0)
            {
                if (SendType == 1)  //上传功勋成功,改变info的 已上传值
                {
                    curContValue  -= (resp.val - info.val);
                    SendStartVital = info.val;
                    info.val       = resp.val;
                    SendEndVital   = info.val;
                }
                else if (SendType == 2) //爵位进阶成功,info 改变
                {
                    curContValue -= resp.val;
                    LuaTable l;
                    int      nextId = 0;
                    if (CacheTitleConfig.TryGetValue(info.id, out l))
                    {
                        nextId = l.Get <int>("next_id");
                    }
                    SendStartVital = 0;
                    SendEndVital   = 0;
                    info           = new MsgData_sGuanZhiInfo();
                    info.id        = nextId;
                    info.val       = 0;
                }
            }
            SendMsg(TitleEnum.levelUp, resp);
        }
Example #2
0
 /// <summary>
 /// 服务器返回:官职信息 msgId:8689;
 /// </summary>
 /// <param name="ge"></param>
 /// <param name="parameter"></param>
 void OnGuanZhiInfo(GameEvent ge, EventParameter parameter)
 {
     info = parameter.msgParameter as MsgData_sGuanZhiInfo;
     //       Debug.LogError("官职id    " +info.id);
     //       Debug.LogError("已上报功勋     " +info.val);
     SendMsg(TitleEnum.info, info);
 }