• 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!

[XML > SQL Rewriter] Problem.

MappingFOR

Web Developer
Joined
Jul 12, 2010
Messages
35
Reaction score
0
Im writing XML > SQL Rewriter.. buy i have one question.
Where i must write addons information?
That's storagevalue information?
 
yes, addons and outfits are stored in reserved storages (atleast in TFS and OTServ)
Code:
void Player::generateReservedStorage()
{
	uint32_t baseKey = PSTRG_OUTFITSID_RANGE_START + 1;
	const OutfitMap& defaultOutfits = Outfits::getInstance()->getOutfits(sex);
	for(OutfitMap::const_iterator it = outfits.begin(); it != outfits.end(); ++it)
	{
		OutfitMap::const_iterator dit = defaultOutfits.find(it->first);
		if(dit == defaultOutfits.end() || (dit->second.isDefault && (dit->second.addons
			& it->second.addons) == it->second.addons))
			continue;

		std::stringstream ss;
		ss << ((it->first << 16) | (it->second.addons & 0xFF));
		storageMap[baseKey] = ss.str();

		baseKey++;
		if(baseKey <= PSTRG_OUTFITSID_RANGE_START + PSTRG_OUTFITSID_RANGE_SIZE)
			continue;

		std::cout << "[Warning - Player::genReservedStorageRange] Player " << getName() << " with more than 500 outfits!" << std::endl;
		break;
	}
}
 
Last edited:
Back
Top