public void RequireMoveImmune(NFCoreEx.NFIDENTID objectID, float fX, float fZ) { NFMsg.ReqAckPlayerMove xData = new NFMsg.ReqAckPlayerMove(); xData.mover = NFToPB(objectID); xData.moveType = 0; NFMsg.Position xTargetPos = new NFMsg.Position(); xTargetPos.x = fX; xTargetPos.z = fZ; xData.target_pos.Add(xTargetPos); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ReqAckPlayerMove>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_MOVE_IMMUNE, stream); if (NFStart.Instance.bDebugMode) { NFMsg.MsgBase xAckData = new NFMsg.MsgBase(); xAckData.player_id = xData.mover; 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_MOVE_IMMUNE; head.unDataLen = (UInt32)xAckBody.Length + (UInt32)ConstDefine.NF_PACKET_HEAD_SIZE; xNet.mxBinMsgEvent.OnMessageEvent(head, xAckBody.ToArray()); } }
//有可能是他副本的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(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()); } }
public void RequireMoveImmune(NFrame.NFGUID objectID, float fX, float fZ) { NFMsg.ReqAckPlayerMove xData = new NFMsg.ReqAckPlayerMove(); xData.mover = NFToPB(objectID); xData.moveType = 0; NFMsg.Position xTargetPos = new NFMsg.Position(); xTargetPos.x = fX; xTargetPos.z = fZ; xData.target_pos.Add(xTargetPos); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ReqAckPlayerMove>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_MOVE_IMMUNE, stream); }
public void RequireMove(UnityEngine.Vector3 pos) { NFMsg.ReqAckPlayerMove xData = new NFMsg.ReqAckPlayerMove(); xData.mover = NFToPB(mRoleID); xData.moveType = 0; NFMsg.Position xTargetPos = new NFMsg.Position(); xTargetPos.x = pos.x; xTargetPos.y = pos.z; xTargetPos.z = pos.y; xData.target_pos.Add(xTargetPos); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ReqAckPlayerMove>(stream, xData); NFCNetLogic.Instance().SendToServerByPB(NFMsg.EGameMsgID.EGMI_REQ_MOVE, stream); }
public void RequireMoveImmune(NFCoreEx.NFIDENTID objectID, float fX, float fZ) { NFMsg.ReqAckPlayerMove xData = new NFMsg.ReqAckPlayerMove(); xData.mover = NFToPB(objectID); xData.moveType = 0; NFMsg.Position xTargetPos = new NFMsg.Position(); xTargetPos.x = fX; xTargetPos.z = fZ; xData.target_pos.Add(xTargetPos); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ReqAckPlayerMove>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_MOVE_IMMUNE, stream); }
//有可能是他副本的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()); } }
public void RequireMoveImmune(NFCoreEx.NFIDENTID objectID, float fX, float fZ) { NFMsg.ReqAckPlayerMove xData = new NFMsg.ReqAckPlayerMove(); xData.mover = NFToPB(objectID); xData.moveType = 0; NFMsg.Position xTargetPos = new NFMsg.Position(); xTargetPos.x = fX; xTargetPos.z = fZ; xData.target_pos.Add(xTargetPos); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ReqAckPlayerMove>(stream, xData); SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_MOVE_IMMUNE, stream); if (NFStart.Instance.bDebugMode) { NFMsg.MsgBase xAckData = new NFMsg.MsgBase(); xAckData.player_id = xData.mover; 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_MOVE_IMMUNE; 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); }