public void RequireCreateRole(string strRoleName, int byCareer, int bySex) { if (strRoleName.Length >= 20 || strRoleName.Length < 1) { return; } NFMsg.ReqCreateRole xData = new NFMsg.ReqCreateRole(); xData.Career = byCareer; xData.Sex = bySex; xData.NoobName = ByteString.CopyFromUtf8(strRoleName); xData.Account = ByteString.CopyFromUtf8(mAccount); xData.Race = 0; mxBody.SetLength(0); xData.WriteTo(mxBody); mNetModule.SendMsg((int)NFMsg.EGameMsgID.ReqCreateRole, mxBody); }
public void RequireCreateRole(string strRoleName, int byCareer, int bySex) { if (strRoleName.Length >= 20 || strRoleName.Length < 1) { return; } NFMsg.ReqCreateRole xData = new NFMsg.ReqCreateRole(); xData.career = byCareer; xData.sex = bySex; xData.noob_name = ByteString.CopyFromUtf8(strRoleName); xData.account = ByteString.CopyFromUtf8(mAccount); xData.race = 0; xData.game_id = mServerID; mxBody.SetLength(0); xData.WriteTo(mxBody); mNetModule.SendMsg(NFMsg.EGameMsgID.EGMI_REQ_CREATE_ROLE, mxBody); }
public void RequireCreateRole(string strRoleName, int byCareer, int bySex) { if (strRoleName.Length >= 20 || strRoleName.Length < 1) { return; } NFMsg.ReqCreateRole xData = new NFMsg.ReqCreateRole(); xData.career = byCareer; xData.sex = bySex; xData.noob_name = ByteString.CopyFromUtf8(strRoleName); xData.account = ByteString.CopyFromUtf8(mLoginModule.mAccount); xData.race = 0; xData.game_id = mLoginModule.mServerID; MemoryStream stream = new MemoryStream(); xData.WriteTo(stream); mNetModule.SendToServerByPB(NFMsg.EGameMsgID.EGMI_REQ_CREATE_ROLE, stream); }