• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Id 30000 c++

Fortera Global

Intermediate OT User
Joined
Nov 20, 2015
Messages
1,180
Solutions
2
Reaction score
117
for what is this, to limit something? in items.cpp

C++:
switch (attrib) {
                case ITEM_ATTR_SERVERID: {
                    if (datalen != sizeof(uint16_t)) {
                        return ERROR_INVALID_FORMAT;
                    }

                    if (!stream.read<uint16_t>(serverId)) {
                        return ERROR_INVALID_FORMAT;
                    }

                    if (serverId > 30000 && serverId < 30100) {
                        serverId -= 30000;
                    }
                    break;
                }

C++:
void Items::buildInventoryList()
{
     inventory.reserve(30000);
     for(const auto &type: items) {
         if(type.weaponType != WEAPON_NONE || type.ammoType != AMMO_NONE ||
             type.attack != 0 || type.defense != 0 ||
             type.extraDefense != 0 || type.armor != 0 ||
             (type.slotPosition & SLOTP_NECKLACE) == SLOTP_NECKLACE ||
             (type.slotPosition & SLOTP_RING) == SLOTP_RING ||
             (type.slotPosition & SLOTP_AMMO) == SLOTP_AMMO ||
             (type.slotPosition & SLOTP_FEET) == SLOTP_FEET ||
             (type.slotPosition & SLOTP_HEAD) == SLOTP_HEAD ||
             (type.slotPosition & SLOTP_ARMOR) == SLOTP_ARMOR ||
             (type.slotPosition & SLOTP_LEGS) == SLOTP_LEGS)
         {
             inventory.push_back(type.clientId);
         }
     }
     inventory.shrink_to_fit();
     std::sort(inventory.begin(), inventory.end());
}

C++:
void Items::parseItemNode(const pugi::xml_node& itemNode, uint16_t id)
{
    if (id > 30000 && id < 30100) {
        id -= 30000;

tfs 1.2
 
Back
Top