예제 #1
0
		public static void WhoListRequest(IRealmClient client, RealmPacketIn packet)
		{
			var search = new WhoSearch {
				MaxResultCount = WhoList.MaxResultCount,
				Faction = client.ActiveCharacter.Faction.Group,
				MinLevel = (byte)packet.ReadUInt32(),
				MaxLevel = (byte)packet.ReadUInt32(),
				Name = packet.ReadCString(),
				GuildName = packet.ReadCString(),
				RaceMask = (RaceMask2)packet.ReadUInt32(),
				ClassMask = (ClassMask2)packet.ReadUInt32()
			};

			uint zoneCount = packet.ReadUInt32();
			if (zoneCount > 0 && zoneCount <= 10)
			{
				for (int i = 0; i < zoneCount; i++)
					search.Zones.Add((ZoneId)packet.ReadUInt32());
			}

			uint nameCount = packet.ReadUInt32();
			if (nameCount > 0 && nameCount <= 10)
			{
				for (int i = 0; i < nameCount; i++)
					search.Names.Add(packet.ReadCString().ToLower());
			}

			//Performs the search and retrieves matching characters
			var characters = search.RetrieveMatchedCharacters();

			//Send the character list to the client
			SendWhoList(client, characters);
		}
예제 #2
0
        public static void WhoListRequest(RealmClient client, RealmPacketIn packet)
        {
            WhoSearch search = new WhoSearch();

            search.MaxResultCount = MAX_RESULT_COUNT;
            search.Faction = client.ActiveCharacter.Faction.Group;
            search.MinLevel = (byte)packet.ReadUInt32();
            search.MaxLevel = (byte)packet.ReadUInt32();
            search.Name = packet.ReadString();

            byte unkown1 = packet.ReadByte();
            uint unkown2 = packet.ReadUInt32();
            uint unkown3 = packet.ReadUInt32();

            uint zoneCount = packet.ReadUInt32();
            if (zoneCount > 0 && zoneCount <= 10)
            {
                for (int i = 0; i < zoneCount; i++)
                    search.Zones.Add((ZoneId)packet.ReadUInt32());
            }

            uint nameCount = packet.ReadUInt32();
            if (nameCount > 0 && nameCount <= 10)
            {
                for (int i = 0; i < nameCount; i++)
                    search.Names.Add(packet.ReadString().ToLower());
            }

            uint totalMatches;
            //Performs the search and retrieves matching characters
            List<Character> characters = search.RetrieveMatchedCharacters(out totalMatches);

            //Send the character list to the client
            SendWhoList(client, characters, totalMatches);
        }
예제 #3
0
        public static void WhoListRequest(RealmClient client, RealmPacketIn packet)
        {
            WhoSearch search = new WhoSearch();

            search.MaxResultCount = MAX_RESULT_COUNT;
            search.Faction        = client.ActiveCharacter.Faction.Group;
            search.MinLevel       = (byte)packet.ReadUInt32();
            search.MaxLevel       = (byte)packet.ReadUInt32();
            search.Name           = packet.ReadString();

            byte unkown1 = packet.ReadByte();
            uint unkown2 = packet.ReadUInt32();
            uint unkown3 = packet.ReadUInt32();

            uint zoneCount = packet.ReadUInt32();

            if (zoneCount > 0 && zoneCount <= 10)
            {
                for (int i = 0; i < zoneCount; i++)
                {
                    search.Zones.Add((ZoneId)packet.ReadUInt32());
                }
            }

            uint nameCount = packet.ReadUInt32();

            if (nameCount > 0 && nameCount <= 10)
            {
                for (int i = 0; i < nameCount; i++)
                {
                    search.Names.Add(packet.ReadString().ToLower());
                }
            }

            uint totalMatches;
            //Performs the search and retrieves matching characters
            List <Character> characters = search.RetrieveMatchedCharacters(out totalMatches);

            //Send the character list to the client
            SendWhoList(client, characters, totalMatches);
        }