public override bool GetUrlElement() { m_UserId = actionGetter.GetSession().UserId; m_RoomId = (actionGetter.GetSession().User as RoomSessionUser).RoomId; m_RequestPacket = ProtoBufUtils.Deserialize <CREntityPerformSkillEnd>((byte[])actionGetter.GetMessage()); return(true); }
public Action5102(ActionGetter actionGetter) : base((short)5102, actionGetter) { m_RequestPacket = null; m_ResponsePacket = null; m_UserId = 0; }
public override bool Verify(Message message) { m_Request = message.Packet as CREntityPerformSkillEnd; m_Response.SerialId = m_Request.SerialId; if (DateTime.UtcNow.Ticks - m_Room.StartTime < GameConfigs.GetInt("Room_Battle_Start_Protection_Time", 3) * TimeSpan.TicksPerSecond) { return(false); } if (m_Request.EntityId != m_Room.Players[message.Session.UserId].InBattleEntity) { return(false); } int playerId = message.Session.UserId; var originHero = m_Room.Players[playerId].Heros.Find(t => t.EntityId == m_Request.EntityId); if (originHero == null || originHero.HP <= 0) { return(false); } return(true); }