Exemplo n.º 1
0
 public void parse(GameClient Session, ClientMessage Event)
 {
     try
     {
         Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
         if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
         {
             ServerMessage Message = new ServerMessage(365u);
             Message.AppendInt32(@class.MoodlightData.Presets.Count);
             Message.AppendInt32(@class.MoodlightData.CurrentPreset);
             int num = 0;
             foreach (MoodlightPreset current in @class.MoodlightData.Presets)
             {
                 num++;
                 Message.AppendInt32(num);
                 Message.AppendInt32(int.Parse(PhoenixEnvironment.BoolToEnum(current.BackgroundOnly)) + 1);
                 Message.AppendStringWithBreak(current.ColorCode);
                 Message.AppendInt32(current.ColorIntensity);
             }
             Session.SendMessage(Message);
         }
     }
     catch
     {
     }
 }
Exemplo n.º 2
0
        public void method_2(int int_1, string string_0, int int_2, bool bool_1)
        {
            string text = null;

            if (this.method_5(string_0) && this.method_6(int_2))
            {
                switch (int_1)
                {
                case 1:
                {
                    text = "one";
                    goto IL_44;
                }

                case 2:
                {
                    text = "two";
                    goto IL_44;
                }

                case 3:
                {
                    text = "three";
                    goto IL_44;
                }
                }
                /*goto IL_2E;*/
IL_44:
                using (DatabaseClient @class = PhoenixEnvironment.GetDatabase().GetClient())
                {
                    @class.AddParamWithValue("color", string_0);
                    @class.ExecuteQuery(string.Concat(new object[]
                    {
                        "UPDATE room_items_moodlight SET preset_",
                        text,
                        " = '@color,",
                        int_2,
                        ",",
                        PhoenixEnvironment.BoolToEnum(bool_1),
                        "' WHERE item_id = '",
                        this.ItemId,
                        "' LIMIT 1"
                    }));
                }
                this.method_4(int_1).ColorCode      = string_0;
                this.method_4(int_1).ColorIntensity = int_2;
                this.method_4(int_1).BackgroundOnly = bool_1;
            }
        }