当前位置: 首页>>代码示例>>C#>>正文


C# GameClient.SendMessage方法代码示例

本文整理汇总了C#中GoldTree.HabboHotel.GameClients.GameClient.SendMessage方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendMessage方法的具体用法?C# GameClient.SendMessage怎么用?C# GameClient.SendMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GoldTree.HabboHotel.GameClients.GameClient的用法示例。


在下文中一共展示了GameClient.SendMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && [email protected]_3)
     {
         RoomUser class2 = @class.method_48(num);
         if (class2 == null || class2.PetData == null)
         {
             DataRow dataRow = null;
             using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient())
             {
                 class3.AddParamWithValue("petid", num);
                 dataRow = class3.ReadDataRow("SELECT Id, user_id, room_id, name, type, race, color, expirience, energy, nutrition, respect, createstamp, x, y, z FROM user_pets WHERE Id = @petid LIMIT 1");
             }
             if (dataRow != null)
             {
                 Session.SendMessage(GoldTree.GetGame().GetCatalog().method_12(dataRow).SerializeInfo());
             }
         }
         else
         {
             Session.SendMessage(class2.PetData.SerializeInfo());
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:26,代码来源:GetPetInfoMessageEvent.cs

示例2: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
     if (@class == null || Session.GetHabbo().list_1.Count >= 30 || Session.GetHabbo().list_1.Contains(num) || @class.Type == "public")
     {
         ServerMessage Message = new ServerMessage(33u);
         Message.AppendInt32(-9001);
         Session.SendMessage(Message);
     }
     else
     {
         ServerMessage Message2 = new ServerMessage(459u);
         Message2.AppendUInt(num);
         Message2.AppendBoolean(true);
         Session.SendMessage(Message2);
         Session.GetHabbo().list_1.Add(num);
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.ExecuteQuery(string.Concat(new object[]
             {
                 "INSERT INTO user_favorites (user_id,room_id) VALUES ('",
                 Session.GetHabbo().Id,
                 "','",
                 num,
                 "')"
             }));
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:30,代码来源:AddFavouriteRoomMessageEvent.cs

示例3: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     Event.PopFixedString();
     Event.PopWiredInt32();
     RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num);
     if (@class != null)
     {
         if (@class.Type == "private")
         {
             ServerMessage Message = new ServerMessage(286u);
             Message.AppendBoolean(@class.IsPublicRoom);
             Message.AppendUInt(num);
             Session.SendMessage(Message);
         }
         else
         {
             ServerMessage Message2 = new ServerMessage(453u);
             Message2.AppendUInt(@class.Id);
             Message2.AppendStringWithBreak(@class.CCTs);
             Message2.AppendUInt(@class.Id);
             Session.SendMessage(Message2);
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:GetPublicSpaceCastLibsMessageEvent.cs

示例4: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Dictionary<Room, int> dictionary = GoldTree.GetGame().GetRoomManager().method_21();
     Room @class = null;
     IEnumerable<Room> arg_35_0 = dictionary.Keys;
     if (FindNewFriendsMessageEvent.func_0 == null)
     {
         FindNewFriendsMessageEvent.func_0 = new Func<Room, int>(FindNewFriendsMessageEvent.smethod_0);
     }
     IOrderedEnumerable<Room> orderedEnumerable = arg_35_0.OrderByDescending(FindNewFriendsMessageEvent.func_0);
     int num = 0;
     foreach (Room current in orderedEnumerable)
     {
         num++;
         string a = GoldTree.smethod_5(1, 5).ToString();
         if (a == "2")
         {
             goto IL_83;
         }
         if (num == orderedEnumerable.Count<Room>())
         {
             goto IL_83;
         }
         bool arg_A2_0 = true;
         IL_A2:
         if (arg_A2_0)
         {
             continue;
         }
         @class = current;
         break;
         IL_83:
         arg_A2_0 = (Session == null ||Session.GetHabbo() == null || Session.GetHabbo().CurrentRoom == null || Session.GetHabbo().CurrentRoom == current);
         goto IL_A2;
     }
     if (@class == null)
     {
         ServerMessage Message = new ServerMessage(831u);
         Message.AppendBoolean(false);
         Session.SendMessage(Message);
     }
     else
     {
         ServerMessage Message2 = new ServerMessage(286u);
         Message2.AppendBoolean(@class.Boolean_3);
         Message2.AppendUInt(@class.Id);
         Session.SendMessage(Message2);
         ServerMessage Message3 = new ServerMessage(831u);
         Message3.AppendBoolean(true);
         Session.SendMessage(Message3);
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:52,代码来源:FindNewFriendsMessageEvent.cs

示例5: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session.GetHabbo().method_23() != null)
     {
         Session.SendMessage(Session.GetHabbo().method_23().method_15());
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:7,代码来源:GetPetInventoryEvent.cs

示例6: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(308u);
     Message.AppendInt32(Session.GetHabbo().Volume);
     Message.AppendBoolean(false);
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:7,代码来源:GetSoundSettingsEvent.cs

示例7: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && @class.CheckRights(Session, true))
     {
         ServerMessage Message = new ServerMessage(465u);
         Message.AppendUInt(@class.Id);
         Message.AppendStringWithBreak(@class.Name);
         Message.AppendStringWithBreak(@class.Description);
         Message.AppendInt32(@class.State);
         Message.AppendInt32(@class.Category);
         Message.AppendInt32(@class.UsersMax);
         Message.AppendInt32(100);
         Message.AppendInt32(@class.Tags.Count);
         foreach (string current in @class.Tags)
         {
             Message.AppendStringWithBreak(current);
         }
         Message.AppendInt32(@class.UsersWithRights.Count);
         foreach (uint current2 in @class.UsersWithRights)
         {
             Message.AppendUInt(current2);
             Message.AppendStringWithBreak(GoldTree.GetGame().GetClientManager().GetNameById(current2));
         }
         Message.AppendInt32(@class.UsersWithRights.Count);
         Message.AppendBoolean(@class.AllowPet);
         Message.AppendBoolean(@class.AllowPetsEating);
         Message.AppendBoolean(@class.AllowWalkthrough);
         Message.AppendBoolean(@class.Hidewall);
         Message.AppendInt32(@class.Wallthick);
         Message.AppendInt32(@class.Floorthick);
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:34,代码来源:GetRoomSettingsMessageEvent.cs

示例8: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null)
     {
         Session.SendMessage(GoldTree.GetGame().GetNavigator().method_12(Session, -3));
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:MyRoomsSearchMessageEvent.cs

示例9: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null)
         {
             RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
             if (class2 != null && !class2.IsBot && class2.GetClient() != null)
             {
                 ServerMessage Message = new ServerMessage(228u);
                 Message.AppendUInt(class2.GetClient().GetHabbo().Id);
                 Message.AppendInt32(class2.GetClient().GetHabbo().method_22().Int32_1);
                 using (TimedLock.Lock(class2.GetClient().GetHabbo().method_22().List_0))
                 {
                     foreach (Badge current in class2.GetClient().GetHabbo().method_22().List_0)
                     {
                         if (current.Slot > 0)
                         {
                             Message.AppendInt32(current.Slot);
                             Message.AppendStringWithBreak(current.Code);
                         }
                     }
                 }
                 Session.SendMessage(Message);
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:29,代码来源:GetSelectedBadgesMessageEvent.cs

示例10: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
     {
         Session.SendMessage(Session.GetHabbo().GetMessenger().SerializeUpdates());
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:FriendListUpdateEvent.cs

示例11: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            int num = Event.PopWiredInt32();
            ServerMessage Message = new ServerMessage(300u);
            Message.AppendInt32(num);
            if (num > 0)
            {
                for (int i = 0; i < num; i++)
                {
                    int num2 = Event.PopWiredInt32();
                    if (num2 > 0)
                    {
                        /*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2);
                        Message.AppendInt32(@class.Id);
                        Message.AppendStringWithBreak(@class.Name);
                        Message.AppendStringWithBreak(@class.Track);
                        Message.AppendInt32(@class.Length);
                        Message.AppendStringWithBreak(@class.Author);*/

                        Message.AppendInt32(SongManager.GetSong(num2).Id);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Name);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Track);
                        Message.AppendInt32(SongManager.GetSong(num2).Length);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Author);
                    }
                }
            }
            Session.SendMessage(Message);
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:29,代码来源:GetSongInfoMessageEvent.cs

示例12: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     if (bool_0)
     {
         ServerMessage Message = new ServerMessage(650u);
         Message.AppendInt32(0);
         Message.AppendInt32(5);
         Message.AppendInt32(0);
         Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite);
         Message.AppendUInt(RoomItem_0.uint_0);
         Message.AppendStringWithBreak("");
         Message.AppendString("I");
         if (RoomItem_0.string_3.Length > 0)
         {
             Message.AppendString(RoomItem_0.string_3);
         }
         else
         {
             Message.AppendString("RB");
         }
         Message.AppendStringWithBreak("HRAH");
         Session.SendMessage(Message);
         RoomItem_0.ReqUpdate(1);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:InteractorWiredTriggerTimer.cs

示例13: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(611u);
     Message.AppendBoolean(true);
     Message.AppendInt32(2);
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:7,代码来源:GetMarketplaceCanMakeOfferEvent.cs

示例14: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     ServerMessage Message = new ServerMessage(620u);
     Message.AppendInt32(1);
     Message.AppendInt32(1);
     Message.AppendInt32(10);
     for (int i = 187; i < 191; i++)
     {
         Message.AppendInt32(i);
     }
     Message.AppendInt32(7);
     Message.AppendInt32(0);
     Message.AppendInt32(1);
     Message.AppendInt32(2);
     Message.AppendInt32(3);
     Message.AppendInt32(4);
     Message.AppendInt32(5);
     Message.AppendInt32(6);
     Message.AppendInt32(11);
     Message.AppendInt32(0);
     Message.AppendInt32(1);
     Message.AppendInt32(2);
     Message.AppendInt32(3);
     Message.AppendInt32(4);
     Message.AppendInt32(5);
     Message.AppendInt32(6);
     Message.AppendInt32(7);
     Message.AppendInt32(8);
     Message.AppendInt32(9);
     Message.AppendInt32(10);
     Message.AppendInt32(1);
     Session.SendMessage(Message);
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:33,代码来源:GetGiftWrappingConfigurationEvent.cs

示例15: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (((Session != null) && (Session.GetHabbo() != null)) && (Session.GetHabbo().CurrentRoom != null))
     {
         Room currentRoom = Session.GetHabbo().CurrentRoom;
         if (currentRoom.CheckRights(Session, true))
         {
             RoomMusicController roomMusicController = currentRoom.GetRoomMusicController();
             if (roomMusicController.PlaylistSize < roomMusicController.PlaylistCapacity)
             {
                 int num = Event.PopWiredInt32();
                 UserItem item = Session.GetHabbo().method_23().method_10((uint)num);
                 if ((item != null) && (item.method_1().InteractionType == "musicdisc"))
                 {
                     SongItem diskItem = new SongItem(item);
                     if (roomMusicController.AddDisk(diskItem) >= 0)
                     {
                         //diskItem.SaveToDatabase((int)currentRoom.Id); // <-- old
                         diskItem.SaveToDatabase((int)roomMusicController.LinkedItemId); // <-- new
                         Session.GetHabbo().method_23().method_12((uint)num, 0u, true);
                         Session.GetHabbo().method_23().method_9(true);
                         Session.SendMessage(JukeboxDiscksComposer.Compose(roomMusicController.PlaylistCapacity, roomMusicController.Playlist.Values.ToList<SongInstance>()));
                     }
                 }
             }
         }
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:28,代码来源:AddNewJukeboxCD.cs


注:本文中的GoldTree.HabboHotel.GameClients.GameClient.SendMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。