Esempio n. 1
0
        public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
        {
            int num  = Event.PopWiredInt32();
            int num2 = Event.PopWiredInt32();
            int num3 = Event.PopWiredInt32();

            if ((num2 == 1) && (num3 == 0))
            {
                Room room = Essential.GetGame().GetRoomManager().GetRoom((uint)num);
                if ((room != null) && (room.GetRoomUserByHabbo(Session.GetHabbo().Id) == null))
                {
                }
            }
            else if ((num2 != 0) || (num3 != 0))
            {
                RoomData data = Essential.GetGame().GetRoomManager().method_12((uint)num);
                if (data != null)
                {
                    ServerMessage message = new ServerMessage(Outgoing.RoomData);
                    message.AppendBoolean(false);
                    data.Serialize(message, false, false);
                    message.AppendBoolean(true);
                    message.AppendBoolean(false);
                    message.AppendBoolean(true);
                    message.AppendBoolean(true);
                    message.AppendInt32(0);
                    message.AppendInt32(0);
                    message.AppendInt32(0);
                    message.AppendBoolean(true);
                    Session.SendMessage(message);
                    //Console.WriteLine("aa");
                }
            }
        }
        public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
        {
            int num  = Event.PopWiredInt32();
            int num1 = Event.PopWiredInt32();
            int num2 = Event.PopWiredInt32();

            using (DatabaseClient adapter = Essential.GetDatabase().GetClient())
            {
                adapter.ExecuteQuery("REPLACE INTO user_volume (userid, system_volume, furni_volume, trax_volume) VALUES (" + Session.GetHabbo().Id + "," + num + "," + num1 + ", " + num2 + " )");
            }
        }
        public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
        {
            int           guildId = Event.PopWiredInt32();
            GroupsManager guild   = Groups.GetGroupById(guildId);
            int           UserId  = Event.PopWiredInt32();

            if (UserId != Session.GetHabbo().Id&& !guild.UserWithRanks.Contains((int)Session.GetHabbo().Id))
            {
                return;
            }
            if (guild != null)
            {
                ServerMessage Message = new ServerMessage(Outgoing.ConfirmLeaveGroup);
                Message.AppendInt32(UserId);
                Message.AppendInt32(guildId);
                Session.SendMessage(Message);
            }
        }
        public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
        {
            if (!Session.GetHabbo().HasFuse("acc_supporttool"))
            {
                return;
            }
            uint   num  = Event.PopWiredUInt();
            string text = Event.PopFixedString();
            int    num2 = Event.PopWiredInt32();

            Console.WriteLine(num + "      " + text + "     " + num2);
            string string_ = string.Concat(new object[]
            {
                "User: "******", Message: ",
                text,
                ", Time: ",
                num2
            });

            Essential.GetGame().GetModerationTool().MuteUser(Session, num, text, num2);
            Essential.GetGame().GetClientManager().StoreCommand(Session, "ModTool - Mute User", string_);
        }
Esempio n. 5
0
        public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
        {
            int           guildId = Event.PopWiredInt32();
            GroupsManager guild   = Groups.GetGroupById(guildId);

            if (!guild.UserWithRanks.Contains((int)Session.GetHabbo().Id))
            {
                return;
            }
            ServerMessage message;

            if (!Session.GetHabbo().ColorsSended)
            {
                message = new ServerMessage(Outgoing.SendGuildParts);
                message.AppendInt32(10);
                message.AppendInt32((int)(Session.GetHabbo().OwnedRooms.Count - this.GetMyRoomsGuilds(Session)));
                foreach (RoomData data in Session.GetHabbo().OwnedRooms)
                {
                    if (data.GuildId == 0)
                    {
                        message.AppendInt32(data.Id);
                        message.AppendString(data.Name);
                        message.AppendBoolean(false);
                    }
                }
                message.AppendInt32(5);
                message.AppendInt32(10);
                message.AppendInt32(3);
                message.AppendInt32(4);
                message.AppendInt32(0x19);
                message.AppendInt32(0x11);
                message.AppendInt32(5);
                message.AppendInt32(0x19);
                message.AppendInt32(0x11);
                message.AppendInt32(3);
                message.AppendInt32(0x1d);
                message.AppendInt32(11);
                message.AppendInt32(4);
                message.AppendInt32(0);
                message.AppendInt32(0);
                message.AppendInt32(0);
                Session.SendMessage(message);
                Session.SendMessage(Essential.GetGame().GetCatalog().groupsDataMessage);
                Session.GetHabbo().ColorsSended = true;
            }
            message = new ServerMessage(Outgoing.SendGestionGroup);
            message.AppendInt32((int)(Session.GetHabbo().OwnedRooms.Count - this.GetMyRoomsGuilds(Session)));
            foreach (RoomData data in Session.GetHabbo().OwnedRooms)
            {
                if (data.GuildId == 0)
                {
                    message.AppendInt32(data.Id);
                    message.AppendString(data.Name);
                    message.AppendBoolean(false);
                }
            }
            message.AppendBoolean(true);
            message.AppendInt32(guild.Id);
            message.AppendString(guild.Name);
            message.AppendString(guild.Description);
            message.AppendInt32(guild.RoomId);
            message.AppendInt32(Groups.GetColorByHTMLColor(guild.ColorOne));
            message.AppendInt32(Groups.GetColorByHTMLColor(guild.ColorTwo));//int.Parse(guild.ColorTwo));
            message.AppendInt32(guild.Type);
            message.AppendInt32(guild.OnlyAdminsCanMove);
            message.AppendBoolean(false);
            message.AppendString("");
            message.AppendInt32(5);
            message.AppendInt32(guild.GuildBase);
            message.AppendInt32(guild.GuildBaseColor);
            message.AppendInt32(4);
            message.AppendInt32(guild.GuildStates[0]);
            message.AppendInt32(guild.GuildStates[1]);
            message.AppendInt32(guild.GuildStates[2]);
            message.AppendInt32(guild.GuildStates[3]);
            message.AppendInt32(guild.GuildStates[4]);
            message.AppendInt32(guild.GuildStates[5]);
            message.AppendInt32(guild.GuildStates[6]);
            message.AppendInt32(guild.GuildStates[7]);
            message.AppendInt32(guild.GuildStates[8]);
            message.AppendInt32(guild.GuildStates[9]);
            message.AppendInt32(guild.GuildStates[10]);
            message.AppendInt32(guild.GuildStates[11]);
            message.AppendString(guild.Badge);
            message.AppendInt32(guild.Members.Count);
            message.AppendInt32(guild.Petitions.Count);
            Session.SendMessage(message);
        }