PlusEMU wont start

Wolverine

Member
Aug 1, 2014
90
3
I'm having issues with my plusemu, I'm confused why it wont start



Here's my CatalogDeal.cs
C#:
using Plus.Database.Interfaces;
using Plus.HabboHotel.Items;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;

namespace Plus.HabboHotel.Catalog
{
    public class CatalogDeal
    {
        public int Id
        {
            get;
            set;
        }

        public int PageId
        {
            get;
            set;
        }

        public List<CatalogItem> ItemDataList
        {
            get;
            private set;
        }

        public string DisplayName
        {
            get;
            set;
        }

        public int CostCredits
        {
            get;
            set;
        }

        public int CostPixels
        {
            get;
            set;
        }

        public int CostDiamonds
        {
            get;
            set;
        }

        public int RoomId
        {
            get;
            set;
        }

        public string BadgeId
        {
            get;
            set;
        }

        public int PetId
        {
            get;
            set;
        }

        public int clubLevel
        {
            get;
            set;
        }

        public CatalogDeal(int Id, int PageId, string Items, string DisplayName, int Credits, int Pixels, int Diamonds, ItemDataManager ItemDataManager, int RoomId, string BadgeId, int PetId, int clubLevel)
        {
            this.Id = Id;
            this.PageId = PageId;
            this.DisplayName = DisplayName;
            this.ItemDataList = new List<CatalogItem>();
            bool flag = RoomId != 0;
            string[] array2;
            checked
            {
                if (flag)
                {
                    Dictionary<int, int> dictionary = new Dictionary<int, int>();
                    using (IQueryAdapter queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                    {
                        queryReactor.SetQuery("SELECT `items`.base_item, COALESCE(`items_groups`.`group_id`, 0) AS `group_id` FROM `items` LEFT OUTER JOIN `items_groups` ON `items`.`id` = `items_groups`.`id` WHERE `items`.`room_id` = @rid;");
                        queryReactor.AddParameter("rid", RoomId);
                        DataTable table = queryReactor.getTable();
                        bool flag2 = table != null;
                        if (flag2)
                        {
                            foreach (DataRow dataRow in table.Rows)
                            {
                                int num = Convert.ToInt32(dataRow["base_item"]);
                                bool flag3 = dictionary.ContainsKey(num);
                                if (flag3)
                                {
                                    Dictionary<int, int> arg_CB_0 = dictionary;
                                    int key = num;
                                    int num2 = arg_CB_0[key];
                                    arg_CB_0[key] = num2 + 1;
                                }
                                else
                                {
                                    dictionary.Add(num, 1);
                                }
                            }
                        }
                    }
                    foreach (KeyValuePair<int, int> current in dictionary)
                    {
                        Items = string.Concat(new object[]
                        {
                            Items,
                            current.Key,
                            "*",
                            current.Value,
                            ";"
                        });
                    }
                    bool flag4 = dictionary.ToList<KeyValuePair<int, int>>().Count > 0;
                    if (flag4)
                    {
                        Items = Items.Remove(Items.Length - 1);
                    }
                }
                string[] array = Items.Split(new char[]
                {
                    ';'
                });
                array2 = array;
            }
            for (int i = 0; i < array2.Length; i++)
            {
                string text = array2[i];
                string[] array3 = text.Split(new char[]
                {
                    '*'
                });
                int num3 = 0;
                int amount = 0;
                bool flag5 = !int.TryParse(array3[0], out num3) || !int.TryParse(array3[1], out amount);
                if (!flag5)
                {
                    ItemData data = null;
                    bool flag6 = !ItemDataManager.GetItem(num3, out data);
                    if (!flag6)
                    {
                        this.ItemDataList.Add(new CatalogItem(0, num3, data, string.Empty, PageId, 0, 0, 0, amount, 0, 0, false, "", "", 0, 0));
                    }
                }
            }
            this.CostCredits = Credits;
            this.CostPixels = Pixels;
            this.CostDiamonds = Diamonds;
            this.RoomId = RoomId;
            this.BadgeId = BadgeId;
            this.PetId = PetId;
            this.clubLevel = clubLevel;
        }
    }
}
 
Last edited:

Wolverine

Member
Aug 1, 2014
90
3
Please send what you have in table catalog_deals
Code:
DROP TABLE IF EXISTS `catalog_deals`;
CREATE TABLE `catalog_deals` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `page_id` int(11) NOT NULL DEFAULT '0',
  `items` text,
  `name` varchar(35) NOT NULL,
  `cost_credits` int(11) NOT NULL DEFAULT '0',
  `cost_pixels` int(11) NOT NULL DEFAULT '0',
  `cost_diamonds` int(11) NOT NULL DEFAULT '0',
  `room_id` int(11) NOT NULL DEFAULT '0',
  `badge_id` varchar(20) NOT NULL DEFAULT '',
  `pet_id` int(11) NOT NULL DEFAULT '0',
  `club_level` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
I'm having issues with my plusemu, I'm confused why it wont start



Here's my CatalogDeal.cs
C#:
using Plus.Database.Interfaces;
using Plus.HabboHotel.Items;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;

namespace Plus.HabboHotel.Catalog
{
    public class CatalogDeal
    {
        public int Id
        {
            get;
            set;
        }

        public int PageId
        {
            get;
            set;
        }

        public List<CatalogItem> ItemDataList
        {
            get;
            private set;
        }

        public string DisplayName
        {
            get;
            set;
        }

        public int CostCredits
        {
            get;
            set;
        }

        public int CostPixels
        {
            get;
            set;
        }

        public int CostDiamonds
        {
            get;
            set;
        }

        public int RoomId
        {
            get;
            set;
        }

        public string BadgeId
        {
            get;
            set;
        }

        public int PetId
        {
            get;
            set;
        }

        public int clubLevel
        {
            get;
            set;
        }

        public CatalogDeal(int Id, int PageId, string Items, string DisplayName, int Credits, int Pixels, int Diamonds, ItemDataManager ItemDataManager, int RoomId, string BadgeId, int PetId, int clubLevel)
        {
            this.Id = Id;
            this.PageId = PageId;
            this.DisplayName = DisplayName;
            this.ItemDataList = new List<CatalogItem>();
            bool flag = RoomId != 0;
            string[] array2;
            checked
            {
                if (flag)
                {
                    Dictionary<int, int> dictionary = new Dictionary<int, int>();
                    using (IQueryAdapter queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
                    {
                        queryReactor.SetQuery("SELECT `items`.base_item, COALESCE(`items_groups`.`group_id`, 0) AS `group_id` FROM `items` LEFT OUTER JOIN `items_groups` ON `items`.`id` = `items_groups`.`id` WHERE `items`.`room_id` = @rid;");
                        queryReactor.AddParameter("rid", RoomId);
                        DataTable table = queryReactor.getTable();
                        bool flag2 = table != null;
                        if (flag2)
                        {
                            foreach (DataRow dataRow in table.Rows)
                            {
                                int num = Convert.ToInt32(dataRow["base_item"]);
                                bool flag3 = dictionary.ContainsKey(num);
                                if (flag3)
                                {
                                    Dictionary<int, int> arg_CB_0 = dictionary;
                                    int key = num;
                                    int num2 = arg_CB_0[key];
                                    arg_CB_0[key] = num2 + 1;
                                }
                                else
                                {
                                    dictionary.Add(num, 1);
                                }
                            }
                        }
                    }
                    foreach (KeyValuePair<int, int> current in dictionary)
                    {
                        Items = string.Concat(new object[]
                        {
                            Items,
                            current.Key,
                            "*",
                            current.Value,
                            ";"
                        });
                    }
                    bool flag4 = dictionary.ToList<KeyValuePair<int, int>>().Count > 0;
                    if (flag4)
                    {
                        Items = Items.Remove(Items.Length - 1);
                    }
                }
                string[] array = Items.Split(new char[]
                {
                    ';'
                });
                array2 = array;
            }
            for (int i = 0; i < array2.Length; i++)
            {
                string text = array2[i];
                string[] array3 = text.Split(new char[]
                {
                    '*'
                });
                int num3 = 0;
                int amount = 0;
                bool flag5 = !int.TryParse(array3[0], out num3) || !int.TryParse(array3[1], out amount);
                if (!flag5)
                {
                    ItemData data = null;
                    bool flag6 = !ItemDataManager.GetItem(num3, out data);
                    if (!flag6)
                    {
                        this.ItemDataList.Add(new CatalogItem(0, num3, data, string.Empty, PageId, 0, 0, 0, amount, 0, 0, false, "", "", 0, 0));
                    }
                }
            }
            this.CostCredits = Credits;
            this.CostPixels = Pixels;
            this.CostDiamonds = Diamonds;
            this.RoomId = RoomId;
            this.BadgeId = BadgeId;
            this.PetId = PetId;
            this.clubLevel = clubLevel;
        }
    }
}
Did you edit something in your emulator? Open it in visual studio, it’ll show you the errors.
 

Users who are viewing this thread

Top