//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFGUID objectID, string strKillID, Int32 index, List <NFGUID> nTargetIDList) { NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.User = mHelpModule.NFToPB(objectID); xData.SkillId = ByteString.CopyFromUtf8(strKillID); xData.UseIndex = index; if (nTargetIDList != null) { foreach (NFGUID id in nTargetIDList) { NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.EffectIdent = (mHelpModule.NFToPB(id)); xEffData.EffectValue = 0; xEffData.EffectRlt = 0; xData.EffectData.Add(xEffData); } } mxBody.SetLength(0); xData.WriteTo(mxBody); SendMsg((int)NFMsg.EGameMsgID.ReqSkillObjectx, mxBody); }
//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFrame.NFGUID objectID, string strKillID, NFrame.NFGUID nTargetID, float fNowX, float fNowZ, float fTarX, float fTarZ) { NFMsg.Position xNowPos = new NFMsg.Position(); NFMsg.Position xTarPos = new NFMsg.Position(); xNowPos.x = fNowX; xNowPos.y = 0.0f; xNowPos.z = fNowZ; xTarPos.x = fTarX; xTarPos.y = 0.0f; xTarPos.z = fTarZ; NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.user = NFToPB(objectID); xData.skill_id = System.Text.Encoding.Default.GetBytes(strKillID); xData.tar_pos = xTarPos; xData.now_pos = xNowPos; NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.effect_ident = (NFToPB(nTargetID)); xEffData.effect_value = 0; xEffData.effect_rlt = 0; xData.effect_data.Add(xEffData); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ReqAckUseSkill>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SKILL_OBJECTX, stream); }
//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFrame.NFGUID objectID, string strKillID, Int32 index, List <NFrame.NFGUID> nTargetIDList) { NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.user = NFNetController.NFToPB(objectID); xData.skill_id = System.Text.Encoding.Default.GetBytes(strKillID); xData.use_index = index; if (nTargetIDList != null) { foreach (NFGUID id in nTargetIDList) { NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.effect_ident = (NFNetController.NFToPB(id)); xEffData.effect_value = 0; xEffData.effect_rlt = 0; xData.effect_data.Add(xEffData); } } mxBody.SetLength(0); mxSerializer.Serialize(mxBody, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SKILL_OBJECTX, mxBody); }
//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFCoreEx.NFIDENTID objectID, string strKillID, NFCoreEx.NFIDENTID nTargetID, float fNowX, float fNowZ, float fTarX, float fTarZ) { NFMsg.Position xNowPos = new NFMsg.Position(); NFMsg.Position xTarPos = new NFMsg.Position(); xNowPos.x = fNowX; xNowPos.y = 0.0f; xNowPos.z = fNowZ; xTarPos.x = fTarX; xTarPos.y = 0.0f; xTarPos.z = fTarZ; NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.user = NFToPB(objectID); xData.skill_id = System.Text.Encoding.Default.GetBytes(strKillID); xData.tar_pos = xTarPos; xData.now_pos = xNowPos; NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.effect_ident = (NFToPB(nTargetID)); xEffData.effect_value = 0; xEffData.effect_rlt = 0; xData.effect_data.Add(xEffData); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ReqAckUseSkill>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SKILL_OBJECTX, stream); ///////////////////////////////////////////// if (NFStart.Instance.bDebugMode) { NFMsg.MsgBase xAckData = new NFMsg.MsgBase(); xAckData.player_id = NFToPB(objectID); xAckData.msg_data = stream.ToArray(); MemoryStream xAckBody = new MemoryStream(); Serializer.Serialize <NFMsg.MsgBase>(xAckBody, xAckData); MsgHead head = new MsgHead(); head.unMsgID = (UInt16)NFMsg.EGameMsgID.EGMI_ACK_SKILL_OBJECTX; head.unDataLen = (UInt32)xAckBody.Length + (UInt32)ConstDefine.NF_PACKET_HEAD_SIZE; xNet.mxBinMsgEvent.OnMessageEvent(head, xAckBody.ToArray()); } }
//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFCoreEx.NFIDENTID objectID, string strKillID, NFCoreEx.NFIDENTID nTargetID, float fNowX, float fNowZ, float fTarX, float fTarZ) { NFMsg.Position xNowPos = new NFMsg.Position(); NFMsg.Position xTarPos = new NFMsg.Position(); xNowPos.x = fNowX; xNowPos.y = 0.0f; xNowPos.z = fNowZ; xTarPos.x = fTarX; xTarPos.y = 0.0f; xTarPos.z = fTarZ; NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.user = NFToPB(objectID); xData.skill_id = System.Text.Encoding.Default.GetBytes(strKillID); xData.tar_pos = xTarPos; xData.now_pos = xNowPos; NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.effect_ident = (NFToPB(nTargetID)); xEffData.effect_value = 0; xEffData.effect_rlt = 0; xData.effect_data.Add(xEffData); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ReqAckUseSkill>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SKILL_OBJECTX, stream); ///////////////////////////////////////////// if (NFStart.Instance.bDebugMode) { NFMsg.MsgBase xAckData = new NFMsg.MsgBase(); xAckData.player_id = NFToPB(objectID); xAckData.msg_data = stream.ToArray(); MemoryStream xAckBody = new MemoryStream(); Serializer.Serialize<NFMsg.MsgBase>(xAckBody, xAckData); MsgHead head = new MsgHead(); head.unMsgID = (UInt16)NFMsg.EGameMsgID.EGMI_ACK_SKILL_OBJECTX; head.unDataLen = (UInt32)xAckBody.Length + (UInt32)ConstDefine.NF_PACKET_HEAD_SIZE; xNet.mxBinMsgEvent.OnMessageEvent(head, xAckBody.ToArray()); } }
//有可能是他副本的NPC移动,因此增加64对象ID public void RequireUseSkill(NFCoreEx.NFIDENTID objectID, string strKillID, NFCoreEx.NFIDENTID nTargetID, float fNowX, float fNowZ, float fTarX, float fTarZ) { NFMsg.Position xNowPos = new NFMsg.Position(); NFMsg.Position xTarPos = new NFMsg.Position(); xNowPos.x = fNowX; xNowPos.y = 0.0f; xNowPos.z = fNowZ; xTarPos.x = fTarX; xTarPos.y = 0.0f; xTarPos.z = fTarZ; NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill(); xData.user = NFToPB(objectID); xData.skill_id = System.Text.Encoding.Default.GetBytes(strKillID); xData.tar_pos = xTarPos; xData.now_pos = xNowPos; NFMsg.EffectData xEffData = new NFMsg.EffectData(); xEffData.effect_ident = (NFToPB(nTargetID)); xEffData.effect_value = 0; xEffData.effect_rlt = 0; xData.effect_data.Add(xEffData); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ReqAckUseSkill>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_SKILL_OBJECTX, stream); }