Beispiel #1
0
 public Action5106(ActionGetter actionGetter)
     : base((short)5106, actionGetter)
 {
     m_RequestPacket  = null;
     m_ResponsePacket = null;
     m_UserId         = 0;
 }
        public override void Process()
        {
            RCPushEntityPerformSkillFF pushPacket = new RCPushEntityPerformSkillFF()
            {
                EntityId   = m_Request.EntityId,
                SkillId    = m_Request.SkillId,
                TargetTime = m_Request.TargetTime,
                Transform  = m_Request.Transform,
                PlayerId   = m_UserId,
            };

            byte[] bufferToOthers = CustomActionDispatcher.GeneratePackageStream((int)ActionType.RCPushEntityPerformSkillFF, ProtoBufUtils.Serialize(pushPacket));
            TraceLog.Write("{0} perform skill:{1} fastforward at {2},{3},{4}, TargetTime:{5}", m_Room.Players[m_UserId].Name, m_Request.SkillId, m_Request.Transform.PositionX, m_Request.Transform.PositionY, m_Request.Transform.Rotation, m_Request.TargetTime);
            foreach (var player in m_Room.Players)
            {
                GameSession.Get(player.Key).SendAsync(bufferToOthers, 0, bufferToOthers.Length);
            }
            m_Response.Result = true;
        }