Exemple #1
0
 public Action5107(ActionGetter actionGetter)
     : base((short)5107, actionGetter)
 {
     m_RequestPacket  = null;
     m_ResponsePacket = null;
     m_UserId         = 0;
 }
Exemple #2
0
        public override void Process()
        {
            RCPushEntitySkillRushing pushPacket = new RCPushEntitySkillRushing()
            {
                EntityId  = m_Request.EntityId,
                SkillId   = m_Request.SkillId,
                Transform = m_Request.Transform,
                PlayerId  = m_UserId,
            };

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