invertika_game.Game.ItemManager.readEquipSlotsFile C# (CSharp) Method

readEquipSlotsFile() private method

private readEquipSlotsFile ( ) : void
return void
        void readEquipSlotsFile()
        {
            //XML::Document doc(mEquipSlotsFile);
            //xmlNodePtr rootNode = doc.rootNode();

            //if (!rootNode || !xmlStrEqual(rootNode.name, BAD_CAST "equip-slots"))
            //{
            //    LOG_ERROR("Item Manager: Error while parsing equip slots database ("
            //              << mEquipSlotsFile << ")!");
            //    return;
            //}

            //LOG_INFO("Loading equip slots: " << mEquipSlotsFile);

            //unsigned totalCapacity = 0;
            //unsigned slotCount = 0;
            //mVisibleEquipSlotCount = 0;

            //for_each_xml_child_node(node, rootNode)
            //{
            //    if (xmlStrEqual(node.name, BAD_CAST "slot"))
            //    {
            //        const int slotId = XML::getProperty(node, "id", 0);
            //        const std::string name = XML::getProperty(node, "name",
            //                                                  std::string());
            //        const int capacity = XML::getProperty(node, "capacity", 0);

            //        if (slotId <= 0 || name.empty() || capacity <= 0)
            //        {
            //            LOG_WARN("Item Manager: equip slot " << slotId
            //                << ": (" << name << ") has no name or zero count. "
            //                "The slot has been ignored.");
            //            continue;
            //        }

            //        if (slotId > 255)
            //        {
            //            LOG_WARN("Item Manager: equip slot " << slotId
            //                << ": (" << name << ") is superior to 255 "
            //                "and has been ignored.");
            //            continue;
            //        }

            //        bool visible = XML::getBoolProperty(node, "visible", false);
            //        if (visible)
            //            ++mVisibleEquipSlotCount;

            //        EquipSlotsInfo::iterator i = mEquipSlotsInfo.find(slotId);

            //        if (i != mEquipSlotsInfo.end())
            //        {
            //            LOG_WARN("Item Manager: Ignoring duplicate definition "
            //                     "of equip slot '" << slotId << "'!");
            //            continue;
            //        }

            //        LOG_DEBUG("Adding equip slot, id: " << slotId << ", name: " << name
            //            << ", capacity: " << capacity << ", visible? " << visible);
            //        EquipSlotInfo *equipSlotInfo =
            //            new EquipSlotInfo(slotId, name, capacity, visible);
            //        mEquipSlotsInfo.insert(
            //            std::make_pair<unsigned int, EquipSlotInfo*>(slotId, equipSlotInfo));
            //        mNamedEquipSlotsInfo.insert(name, equipSlotInfo);

            //        totalCapacity += capacity;
            //        ++slotCount;
            //    }
            //}

            //LOG_INFO("Loaded '" << slotCount << "' slot types with '"
            //         << totalCapacity << "' slots.");
        }