Example #1
0
        private void EGMI_ACK_MOVE_IMMUNE(MsgHead head, MemoryStream stream)
        {
            AFMsg.ReqAckPlayerMove xData = ReceiveMsg(stream, ReqAckPlayerMove.Parser) as ReqAckPlayerMove;

            if (xData.TargetPos.Count <= 0)
            {
                return;
            }

            //其实就是jump
            float fSpeed = AFCKernel.Instance.QueryPropertyInt(PBToAF(xData.Mover), "MOVE_SPEED") / 10000.0f;

            fSpeed *= 1.5f;

            AFCDataList varList = new AFCDataList();

            varList.AddObject(PBToAF(xData.Mover));
            varList.AddFloat(xData.TargetPos[0].X);
            varList.AddFloat(xData.TargetPos[0].Y);
            varList.AddFloat(xData.TargetPos[0].Z);
            varList.AddFloat(fSpeed);

            AFCLogicEvent.Instance.DoEvent((int)ClientEventDefine.EVENTDEFINE_MOVE_IMMUNE, varList);

            //AFCRenderInterface.Instance.MoveImmuneBySpeed(PBToAF(xData.mover), new Vector3(xData.target_pos[0].x, xData.target_pos[0].y, xData.target_pos[0].z), fSpeed, true);
        }
Example #2
0
        public void RequireMoveImmune(AFCoreEx.AFIDENTID objectID, float fX, float fZ)
        {
            AFMsg.ReqAckPlayerMove xData = new AFMsg.ReqAckPlayerMove();
            xData.Mover    = AFToPB(objectID);
            xData.MoveType = 0;
            AFMsg.Position xTargetPos = new AFMsg.Position();
            xTargetPos.X = fX;
            xTargetPos.Z = fZ;
            xData.TargetPos.Add(xTargetPos);

            SendMsg(objectID, AFMsg.EGameMsgID.EgmiReqMoveImmune, xData);
        }
Example #3
0
        private void EGMI_ACK_MOVE(MsgHead head, MemoryStream stream)
        {
            AFMsg.ReqAckPlayerMove xData = new AFMsg.ReqAckPlayerMove();
            xData = AFMsg.ReqAckPlayerMove.Parser.ParseFrom(stream);
            //ReceiveMsg(stream, ref xData);
            if (xData.TargetPos.Count <= 0)
            {
                return;
            }
            float fSpeed = AFCKernel.Instance.QueryPropertyInt(PBToAF(xData.Mover), "MOVE_SPEED") / 10000.0f;

            AFCDataList varList = new AFCDataList();

            varList.AddObject(PBToAF(xData.Mover));
            varList.AddFloat(xData.TargetPos[0].X);
            varList.AddFloat(xData.TargetPos[0].Y);
            varList.AddFloat(xData.TargetPos[0].Z);
            varList.AddFloat(fSpeed);

            AFCLogicEvent.Instance.DoEvent((int)ClientEventDefine.EventDefine_MoveTo, varList);

            //AFCRenderInterface.Instance.MoveTo(PBToAF(xData.mover), new Vector3(xData.target_pos[0].x, xData.target_pos[0].y, xData.target_pos[0].z), fSpeed, true);
        }