Пример #1
0
        private void OnRoleClick(int nIndex)
        {
            ArrayList roleList = mRoleList;

            NFMsg.RoleLiteInfo info = (NFMsg.RoleLiteInfo)roleList[nIndex];

            mRoleID   = mHelpModule.PBToNF(info.Id);
            mRoleName = info.NoobName.ToStringUtf8();

            mNetModule.RequireEnterGameServer();
        }
Пример #2
0
        private void EGMI_ACK_OBJECT_ENTRY(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.AckPlayerEntryList xData = NFMsg.AckPlayerEntryList.Parser.ParseFrom(xMsg.MsgData);

            for (int i = 0; i < xData.ObjectList.Count; ++i)
            {
                NFMsg.PlayerEntryInfo xInfo = xData.ObjectList[i];

                NFVector3 vPos = new NFVector3(xInfo.X, xInfo.Y, xInfo.Z);

                NFDataList var = new NFDataList();
                var.AddString(NFrame.NPC.Position);
                var.AddVector3(vPos);

                NFGUID xObjectID    = mHelpModule.PBToNF(xInfo.ObjectGuid);
                string strClassName = xInfo.ClassId.ToStringUtf8();
                string strConfigID  = xInfo.ConfigId.ToStringUtf8();

                Debug.Log("new Object enter: " + strClassName + xObjectID.ToString() + " " + xInfo.X + " " + xInfo.Y + " " + xInfo.Z);

                ObjectDataBuff xDataBuff = new ObjectDataBuff();
                mxObjectDataBuff.Add(xObjectID, xDataBuff);

                /*
                 * NFIObject xGO = mKernelModule.CreateObject(xObjectID, xInfo.scene_id, 0, strClassName, strConfigID, var);
                 * if (null == xGO)
                 * {
                 *  Debug.LogError("ID conflict: " + xObjectID.ToString() + "  ConfigID: " + strClassName);
                 *  continue;
                 * }
                 */
            }
        }