예제 #1
0
 public static void HandleHousingRandomCommunityList(WorldSession session, ClientHousingRandomCommunityList housingRandomCommunityList)
 {
     session.EnqueueMessageEncrypted(new ServerHousingRandomCommunityList
     {
         Communities =
         {
             new ServerHousingRandomCommunityList.Community
             {
                 RealmId        = WorldServer.RealmId,
                 NeighborhoodId = 123,
                 Name           = "Blame Maxtor for working on WoW instead",
                 Owner          = "Not Yet Implemented!"
             }
         }
     });
 }
예제 #2
0
        public static void HandleHousingRandomCommunityList(WorldSession session, ClientHousingRandomCommunityList _)
        {
            var serverHousingRandomCommunityList = new ServerHousingRandomCommunityList();

            foreach (PublicCommunity community in GlobalResidenceManager.Instance.GetRandomVisitableCommunities())
            {
                serverHousingRandomCommunityList.Communities.Add(new ServerHousingRandomCommunityList.Community
                {
                    RealmId        = WorldServer.RealmId,
                    NeighborhoodId = community.NeighbourhoodId,
                    Owner          = community.Owner,
                    Name           = community.Name
                });
            }

            session.EnqueueMessageEncrypted(serverHousingRandomCommunityList);
        }