public StartedInventoryItemsParser()
        {
            bool flag = this._holder == null;

            if (flag)
            {
                this._holder = StartedInventoryItemsHolder.getInstance();
            }
            string text  = "Data//StartedInventoryItems.xml";
            bool   flag2 = File.Exists(text);

            if (flag2)
            {
                this.parse(text);
            }
            else
            {
                CLogger.getInstance().warning("|[SIP]| No Have File: " + text);
            }
            bool flag3 = this._holder != null;

            if (flag3)
            {
                this._holder.log();
            }
        }
Пример #2
0
 public static void Load()
 {
     LoginClientManager.getInstance();
     PlayerTemplateParser.getInstance();
     GameServerInfoParser.getInstance();
     StartedInventoryItemsParser.getInstance();
     RankExpInfoParser.getInstance();
     StartedInventoryItemsHolder.getInstance();
     TutorialParser.Load();
     PlayerTemplateHolder.getInstance();
     GameServerInfoHolder.getInstance();
     RankExpInfoHolder.getInstance();
 }
Пример #3
0
        public void CheckCorrectInventory(int player_id)
        {
            if (!this.CheckEQInventory())
            {
                return;
            }
            List <PlayerTemplateInventory> playerInventoryStatic = StartedInventoryItemsHolder.getInstance().getPlayerInventoryStatic();

            for (int index = 0; index < playerInventoryStatic.Count; ++index)
            {
                if (!this.isItemInventoryExist(player_id, playerInventoryStatic[index].id))
                {
                    ItemsModel itemsModel = new ItemsModel(playerInventoryStatic[index].id, playerInventoryStatic[index].slot, playerInventoryStatic[index].name, playerInventoryStatic[index].onEquip, playerInventoryStatic[index].count, playerInventoryStatic[index].equip_type);
                    this._inventory.Add(itemsModel);
                    if (playerInventoryStatic[index].onEquip == 1)
                    {
                        this.setEquipItemFromSlot(playerInventoryStatic[index].id, playerInventoryStatic[index].slot);
                    }
                    AccountManager.getInstance().AddInitialItems(player_id, itemsModel, playerInventoryStatic[index].name, playerInventoryStatic[index].onEquip);
                }
            }
        }
Пример #4
0
        public StartedInventoryItemsParser()
        {
            if (this._holder == null)
            {
                this._holder = StartedInventoryItemsHolder.getInstance();
            }
            string path = "data//StartedInventoryItems.xml";

            if (File.Exists(path))
            {
                this.parse(path);
            }
            else
            {
                CLogger.getInstance().warning("|[SIP]| No Have File: " + path);
            }
            if (this._holder == null)
            {
                return;
            }
            this._holder.log();
        }
Пример #5
0
        public void CheckCorrectInventory(int player_id)
        {
            bool flag = this.CheckEQInventory();

            if (flag)
            {
                List <PlayerTemplateInventory> playerInventoryStatic = StartedInventoryItemsHolder.getInstance().getPlayerInventoryStatic();
                for (int i = 0; i < playerInventoryStatic.Count; i++)
                {
                    bool flag2 = !this.isItemInventoryExist(player_id, playerInventoryStatic[i].id);
                    if (flag2)
                    {
                        ItemsModel item = new ItemsModel(playerInventoryStatic[i].id, playerInventoryStatic[i].slot, playerInventoryStatic[i].name, playerInventoryStatic[i].onEquip, playerInventoryStatic[i].count, playerInventoryStatic[i].equip_type, 1);
                        this._inventory.Add(item);
                        bool flag3 = playerInventoryStatic[i].onEquip == 1;
                        if (flag3)
                        {
                            this.setEquipItemFromSlot(playerInventoryStatic[i].id, playerInventoryStatic[i].slot);
                        }
                        AccountManager.getInstance().AddInitialItems(player_id, item, playerInventoryStatic[i].name, playerInventoryStatic[i].onEquip);
                    }
                }
            }
        }