• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GameClients.GameClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



GameClient类属于GoldTree.HabboHotel.GameClients命名空间,在下文中一共展示了GameClient类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room class14_ = Session.GetHabbo().CurrentRoom;
     if (class14_ != null)
     {
         Event.PopWiredUInt();
         string string_ = Event.PopFixedString();
         RoomUser @class = class14_.method_56(string_);
         if (@class != null)
         {
             uint uint_ = @class.GetClient().GetHabbo().Id;
             if (Session.GetHabbo().list_2.Contains(uint_))
             {
                 Session.GetHabbo().list_2.Remove(uint_);
                 using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
                 {
                     class2.ExecuteQuery(string.Concat(new object[]
                     {
                         "DELETE FROM user_ignores WHERE user_id = ",
                         Session.GetHabbo().Id,
                         " AND ignore_id = ",
                         uint_,
                         " LIMIT 1;"
                     }));
                 }
                 ServerMessage Message = new ServerMessage(419u);
                 Message.AppendInt32(3);
                 Session.SendMessage(Message);
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:32,代码来源:UnignoreUserMessageEvent.cs


示例2: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (room != null)
     {
         RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
         if (roomUserByHabbo != null)
         {
             roomUserByHabbo.Unidle();
             int num = Event.PopWiredInt32();
             if (num < 0 || num > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && num > 1))
             {
                 num = 0;
             }
             if (num > 0 && roomUserByHabbo.CarryItemID > 0)
             {
                 roomUserByHabbo.CarryItem(0);
             }
             roomUserByHabbo.DanceId = num;
             ServerMessage serverMessage = new ServerMessage(480u);
             serverMessage.AppendInt32(roomUserByHabbo.VirtualId);
             serverMessage.AppendInt32(num);
             room.SendMessage(serverMessage, null);
             if (Session.GetHabbo().CurrentQuestId > 0 && GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "DANCE")
             {
                 GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
             }
         }
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:30,代码来源:DanceMessageEvent.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)
 {
     try
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true) && @class.class67_0 != null)
         {
             ServerMessage Message = new ServerMessage(365u);
             Message.AppendInt32(@class.class67_0.Presets.Count);
             Message.AppendInt32(@class.class67_0.CurrentPreset);
             int num = 0;
             foreach (MoodlightPreset current in @class.class67_0.Presets)
             {
                 num++;
                 Message.AppendInt32(num);
                 Message.AppendInt32(int.Parse(GoldTree.smethod_4(current.BackgroundOnly)) + 1);
                 Message.AppendStringWithBreak(current.ColorCode);
                 Message.AppendInt32(current.ColorIntensity);
             }
             Session.SendMessage(Message);
         }
     }
     catch
     {
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:26,代码来源:RoomDimmerGetPresetsMessageEvent.cs


示例5: 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


示例6: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Event.PopWiredInt32();
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true))
         {
             RoomItem class2 = @class.method_28(Event.PopWiredUInt());
             if (class2 != null)
             {
                 string text = class2.GetBaseItem().InteractionType.ToLower();
                 if (text == null || !(text == "postit"))
                 {
                     @class.method_29(Session, class2.uint_0, false, true);
                     Session.GetHabbo().method_23().method_11(class2.uint_0, class2.uint_2, class2.ExtraData, false);
                     Session.GetHabbo().method_23().method_9(true);
                     if (Session.GetHabbo().CurrentQuestId > 0 && GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "PICKUPITEM")
                     {
                         GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session);
                     }
                 }
             }
         }
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:26,代码来源:PickupObjectMessageEvent.cs


示例7: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && (@class.AllowPet || @class.CheckRights(Session, true)))
     {
         uint uint_ = Event.PopWiredUInt();
         Pet class2 = Session.GetHabbo().method_23().method_4(uint_);
         if (class2 != null && !class2.PlacedInRoom)
         {
             int num = Event.PopWiredInt32();
             int num2 = Event.PopWiredInt32();
             if (@class.method_30(num, num2, 0.0, true, false))
             {
                 if (@class.Int32_2 >= LicenseTools.int_2)
                 {
                     Session.SendNotif(GoldTreeEnvironment.smethod_1("error_maxpets") + LicenseTools.int_2);
                 }
                 else
                 {
                     class2.PlacedInRoom = true;
                     class2.RoomId = @class.Id;
                     List<RandomSpeech> list = new List<RandomSpeech>();
                     List<BotResponse> list2 = new List<BotResponse>();
                     @class.method_4(new RoomBot(class2.PetId, class2.RoomId, AIType.const_0, "freeroam", class2.Name, "", class2.Look, num, num2, 0, 0, 0, 0, 0, 0, ref list, ref list2, 0), class2);
                     if (@class.CheckRights(Session, true))
                     {
                         Session.GetHabbo().method_23().method_6(class2.PetId, @class.Id);
                     }
                 }
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:33,代码来源:PlacePetMessageEvent.cs


示例8: Handle

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


示例9: OnTrigger

 public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0)
 {
     RoomUser @class = RoomItem_0.method_8().GetRoomUserByHabbo(Session.GetHabbo().Id);
     if (@class != null && (RoomItem_0.GStruct1_2.x < RoomItem_0.method_8().Class28_0.int_4 && RoomItem_0.GStruct1_2.y < RoomItem_0.method_8().Class28_0.int_5))
     {
         if (ThreeDCoord.smethod_1(@class.GStruct1_0, RoomItem_0.GStruct1_1) && @class.bool_0)
         {
             @class.method_4(RoomItem_0.GStruct1_1);
         }
         else
         {
             if (RoomItem_0.method_8().method_30(RoomItem_0.GStruct1_2.x, RoomItem_0.GStruct1_2.y, RoomItem_0.Double_0, true, false) && RoomItem_0.uint_3 == 0u)
             {
                 RoomItem_0.uint_3 = @class.uint_0;
                 @class.bool_0 = false;
                 if (@class.bool_6 && (@class.int_10 != RoomItem_0.GStruct1_1.x || @class.int_11 != RoomItem_0.GStruct1_1.y))
                 {
                     @class.method_3(true);
                 }
                 @class.bool_1 = true;
                 @class.method_4(RoomItem_0.GStruct1_0);
                 RoomItem_0.ReqUpdate(3);
             }
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:26,代码来源:InteractorOneWayGate.cs


示例10: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true) && @class.class67_0 != null)
         {
             RoomItem class2 = null;
             foreach (RoomItem class3 in @class.Hashtable_1.Values)
             {
                 if (class3.GetBaseItem().InteractionType.ToLower() == "dimmer")
                 {
                     class2 = class3;
                     break;
                 }
             }
             if (class2 != null)
             {
                 if (@class.class67_0.Enabled)
                 {
                     @class.class67_0.method_1();
                 }
                 else
                 {
                     @class.class67_0.method_0();
                 }
                 class2.ExtraData = @class.class67_0.method_7();
                 class2.method_4();
             }
         }
     }
     catch
     {
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:35,代码来源:RoomDimmerChangeStateMessageEvent.cs


示例11: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     DataTable dataTable_ = Session.GetHabbo().dataTable_0;
     if (dataTable_ != null)
     {
         ServerMessage Message = new ServerMessage(915u);
         Message.AppendInt32(dataTable_.Rows.Count);
         foreach (DataRow dataRow in dataTable_.Rows)
         {
             GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]);
             Message.AppendInt32(@class.int_0);
             Message.AppendStringWithBreak(@class.string_0);
             Message.AppendStringWithBreak(@class.string_2);
             if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group?
             {
                 Message.AppendBoolean(true);
             }
             else
             {
                 Message.AppendBoolean(false);
             }
         }
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:25,代码来源:LoadUserGroupsEvent.cs


示例12: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     string text = GoldTree.FilterString(Event.PopFixedString());
     if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().GetMessenger() != null)
     {
         if (num == 0u && Session.GetHabbo().HasFuse("cmd_sa"))
         {
             ServerMessage Message = new ServerMessage(134u);
             Message.AppendUInt(0u);
             Message.AppendString(Session.GetHabbo().Username + ": " + text);
             GoldTree.GetGame().GetClientManager().method_17(Session, Message);
         }
         else
         {
             if (num == 0u)
             {
                 ServerMessage Message2 = new ServerMessage(261u);
                 Message2.AppendInt32(4);
                 Message2.AppendUInt(0u);
                 Session.SendMessage(Message2);
             }
             else
             {
                 if (Session != null && Session.GetHabbo() != null)
                 {
                     Session.GetHabbo().GetMessenger().method_18(num, text);
                 }
             }
         }
     }
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:32,代码来源:SendMsgMessageEvent.cs


示例13: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (@class != null && !Session.GetHabbo().list_4.Contains(@class.Id) && [email protected](Session, true))
     {
         switch (Event.PopWiredInt32())
         {
         case -1:
             @class.Score--;
             break;
         case 0:
             return;
         case 1:
             @class.Score++;
             break;
         default:
             return;
         }
         using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient())
         {
             class2.ExecuteQuery(string.Concat(new object[]
             {
                 "UPDATE rooms SET score = '",
                 @class.Score,
                 "' WHERE Id = '",
                 @class.Id,
                 "' LIMIT 1"
             }));
         }
         Session.GetHabbo().list_4.Add(@class.Id);
         ServerMessage Message = new ServerMessage(345u);
         Message.AppendInt32(@class.Score);
         Session.SendMessage(Message);
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:35,代码来源:RateFlatMessageEvent.cs


示例14: Handle

        public void Handle(GameClient Session, ClientMessage Event)
        {
            if (Session.GetHabbo() == null)
            {
                Session.method_6(Event.PopFixedString());
                if (Session.GetHabbo() != null && Session.GetHabbo().list_2 != null && Session.GetHabbo().list_2.Count > 0)
                {
                    using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
                    {
                        try
                        {
                            ServerMessage Message = new ServerMessage(420u);
                            Message.AppendInt32(Session.GetHabbo().list_2.Count);
                            foreach (uint current in Session.GetHabbo().list_2)
                            {
                                string string_ = @class.ReadString("SELECT username FROM users WHERE Id = " + current + " LIMIT 1;");
                                Message.AppendStringWithBreak(string_);
                            }
                            Session.SendMessage(Message);
                        }
                        catch
                        {
                            Console.ForegroundColor = ConsoleColor.Red;
                            Logging.WriteLine("Login error: User is ignoring a user that no longer exists");
                            Console.ForegroundColor = ConsoleColor.Gray;
                        }

                    }
                }
            }
        }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:31,代码来源:SSOTicketMessageEvent.cs


示例15: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     int PollId = Event.PopWiredInt32();
     int QuestionId = Event.PopWiredInt32();
     int AnswerCount = Event.PopWiredInt32();
     string AnswerText = "";
     if (AnswerCount > 1)
     {
         for (int i = 1; i <= AnswerCount; i++)
         {
             if (AnswerText == "")
             {
                 AnswerText = Event.PopFixedString();
             }
             else
             {
                 AnswerText = AnswerText + "," + Event.PopFixedString();
             }
         }
     }
     else
     {
         AnswerText = Event.PopFixedString();
     }
     using (DatabaseClient dbClient = GoldTree.GetDatabase().GetClient())
     {
         dbClient.ExecuteQuery("INSERT INTO `room_poll_results` (`poll_id`, `question_id`, `answer_text`, `user_id`) VALUES ('" + PollId +"', '" + QuestionId + "', '" + AnswerText + "', '" + Session.GetHabbo().Id + "')");
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:29,代码来源:GetRoomPollAnswers.cs


示例16: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     if (Session != null && Session.GetHabbo() != null)
     {
         Session.SendMessage(GoldTree.GetGame().GetCatalog().method_18(Session.GetHabbo().Rank));
     }
 }
开发者ID:GoldTreeTheBest,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:GetCatalogIndexEvent.cs


示例17: Handle

 public void Handle(GameClient Session, ClientMessage Event)
 {
     uint num = Event.PopWiredUInt();
     Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
     if (room != null)
     {
         RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num);
         if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num))
         {
             room.UsersWithRights.Add(num);
             using (DatabaseClient client = GoldTree.GetDatabase().GetClient())
             {
                 client.ExecuteQuery(string.Concat(new object[]
                 {
                     "INSERT INTO room_rights (room_id,user_id) VALUES (",
                     room.Id,
                     ",",
                     num,
                     ")"
                 }));
             }
             ServerMessage serverMessage = new ServerMessage(510u);
             serverMessage.AppendUInt(room.Id);
             serverMessage.AppendUInt(num);
             serverMessage.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username);
             Session.SendMessage(serverMessage);
             roomUserByHabbo.AddStatus("flatctrl", "");
             roomUserByHabbo.UpdateNeeded = true;
             roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42u));
         }
     }
 }
开发者ID:ArneVanDaele,项目名称:GoldenTreeEMU,代码行数:32,代码来源:AssignRightsMessageEvent.cs


示例18: OnPlace

 public override void OnPlace(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
     roomMusicController.Stop();
     Session.GetHabbo().CurrentRoom.LoadMusic();
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:InteractorJukebox.cs


示例19: 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


示例20: OnRemove

 public override void OnRemove(GameClient Session, RoomItem Item)
 {
     RoomMusicController roomMusicController = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();
     roomMusicController.Stop();
     roomMusicController.UnLinkRoomOutputItem();
     Item.UpdateState(true, true);
 }
开发者ID:Waguiinhocvp,项目名称:Gold-Tree-Emulator,代码行数:7,代码来源:InteractorJukebox.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Items.RoomItem类代码示例发布时间:2022-05-26
下一篇:
C# Authentication.oAuthTwitter类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap