Inheritance: global::ProtoBuf.IExtensible
Esempio n. 1
0
        //有可能是他副本的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);
    }
Esempio n. 3
0
        //有可能是他副本的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);
        }
Esempio n. 4
0
        private void EGMI_ACK_SKILL_OBJECTX(NFMsg.MsgBase xMsg)
        {
            NFMsg.ReqAckUseSkill xData = new NFMsg.ReqAckUseSkill();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ReqAckUseSkill)) as NFMsg.ReqAckUseSkill;

            NFGUID     xUser       = NFNetController.PBToNF(xData.user);
            GameObject xGameObject = NFRender.Instance.GetObject(xUser);

            if (xGameObject)
            {
            }
        }
Esempio n. 5
0
    //有可能是他副本的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());
        }
    }
        private void EGMI_ACK_SKILL_OBJECTX(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

            NFGUID     xUser       = mHelpModule.PBToNF(xData.User);
            GameObject xGameObject = mSceneModule.GetObject(xUser);

            if (xGameObject)
            {
                NFHeroSync xHeroSync = xGameObject.GetComponent <NFHeroSync>();
                if (!xHeroSync)
                {
                    Debug.LogError("xHeroSync " + Time.time);
                    return;
                }

                //xHeroSync.Clear();

                //NFHeroSkill xHeroSkill = xGameObject.GetComponent<NFHeroSkill>();
                //xHeroSkill.AckSkill(xUser, xData.UseIndex, xData.SkillId.ToStringUtf8(), xData.EffectData.ToList<NFMsg.EffectData>());
            }
        }
Esempio n. 7
0
    //有可能是他副本的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);
    }