fix set outfit functionality

This commit is contained in:
ErikasKontenis
2019-11-11 20:21:51 +02:00
parent 5535e50562
commit 527debe319
5 changed files with 24 additions and 77 deletions

View File

@@ -509,6 +509,20 @@ uint16_t Player::getLookCorpse() const
void Player::addStorageValue(const uint32_t key, const int32_t value)
{
if (IS_IN_KEYRANGE(key, RESERVED_RANGE)) {
if (IS_IN_KEYRANGE(key, OUTFITS_RANGE)) {
outfits.emplace_back(
value >> 16,
value & 0xFF
);
return;
}
else {
std::cout << "Warning: unknown reserved key: " << key << " player: " << getName() << std::endl;
return;
}
}
if (value != -1) {
storageMap[key] = value;
} else {