/// <summary> /// Reads stitches from packet, starting with the bool, saying whether /// there are any. Returns false if bool is false. /// </summary> /// <param name="creature"></param> /// <param name="packet"></param> /// <param name="hits"></param> /// <returns></returns> private bool ReadHits(Creature creature, Packet packet, out List <HammerHit> hits) { hits = new List <HammerHit>(); for (int i = 0; i < 5; ++i) { var hit = new HammerHit(); hit.Performed = packet.GetBool(); hit.X = packet.GetShort(); hit.Y = packet.GetShort(); hit.Timing = packet.GetInt(); hits.Add(hit); } return(true); }
/// <summary> /// Reads stitches from packet, starting with the bool, saying whether /// there are any. Returns false if bool is false. /// </summary> /// <param name="creature"></param> /// <param name="packet"></param> /// <param name="hits"></param> /// <returns></returns> private bool ReadHits(Creature creature, Packet packet, out List<HammerHit> hits) { hits = new List<HammerHit>(); for (int i = 0; i < 5; ++i) { var hit = new HammerHit(); hit.Performed = packet.GetBool(); hit.X = packet.GetShort(); hit.Y = packet.GetShort(); hit.Timing = packet.GetInt(); hits.Add(hit); } return true; }