Exemplo n.º 1
0
        public static void HandleRaidTargetUpdate(Packet packet)
        {
            if (packet.Direction == Direction.ClientToServer)
            {
                var icon = packet.ReadSByteE<TargetIcon>("Icon Id");
                if (icon != TargetIcon.None)
                    packet.ReadGuid("Target GUID");

                return;
            }

            var test = packet.ReadBool("List target"); // false == Set Target
            if (!test)
                packet.ReadGuid("Owner GUID");

            for (int i = 0; packet.CanRead(); ++i)
            {
                packet.ReadByteE<TargetIcon>("Icon Id", i);
                packet.ReadGuid("Target Guid", i);
            }
        }