Ejemplo n.º 1
0
        // 获取某场的详细战绩
        public WarStatisticInfo GetSingleWarInfo(long nWarID, EGetSingleWarType eWndType)
        {
            m_getSingleWarType = eWndType;

            WarStatisticInfo info = null;

            if (warStatistic.TryGetValue(nWarID, out info))
            {
                return(info);
            }
            else
            {
                info                 = new WarStatisticInfo();
                info.mainInfo        = new cmd_entity_update_warstatistic_war();
                info.actorInfo       = new List <cmd_entity_update_warstatistic_war_actorinfo>();
                warStatistic[nWarID] = info;
            }

            RequestWarStatistic(nWarID, eWndType);
            return(info);
        }
Ejemplo n.º 2
0
        // 收到服务器返回的某场战绩详情
        public void RecvWarStatistic(IntPtr ptrParam, int nPtrLen)
        {
            IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);

            cmd_entity_update_warstatistic_war mainInfo = helper.get <cmd_entity_update_warstatistic_war>();
            WarStatisticInfo info = null;

            if (warStatistic.TryGetValue(mainInfo.nWarID, out info) == false)
            {
                return;
            }
            info.mainInfo = mainInfo;

            info.actorInfo.Clear();
            for (int i = 0; i < info.mainInfo.nActorCount; ++i)
            {
                cmd_entity_update_warstatistic_war_actorinfo data = helper.get <cmd_entity_update_warstatistic_war_actorinfo>();
                // 假人数据
                if (LogicDataCenter.playerSystemDataManager.bFake)
                {
                    //替换下名字
                    if (LogicDataCenter.playerSystemDataManager.nRequestPDBID == data.nActorID)
                    {
                        data.szActorName = LogicDataCenter.playerSystemDataManager.strCurFakeName;
                    }
                }

                info.actorInfo.Add(data);
            }

            if (m_getSingleWarType == EGetSingleWarType.EGSWT_PlayerRecord)
            {
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_PLAYERWARSTATISTIC_UPDATEWAR, null);
            }
            else if (m_getSingleWarType == EGetSingleWarType.EGSWT_KinRecord)
            {
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_WARRECORD_SINGLE, null);
            }
        }