revert last change (better fix)

This commit is contained in:
niczkx 2012-08-19 17:27:48 +00:00
parent a9fad4751f
commit 6d039ade67
1 changed files with 4 additions and 3 deletions

View File

@ -53,10 +53,11 @@ void ItemType::unserialize(const BinaryTreePtr& node)
if(serverId > 20000 && serverId < 20100) { if(serverId > 20000 && serverId < 20100) {
serverId -= 20000; serverId -= 20000;
} else if(lastId > 99 && lastId != serverId - 1) { } else if(lastId > 99 && lastId != serverId - 1) {
static ItemType nullType;
while(lastId != serverId - 1) { while(lastId != serverId - 1) {
nullType.setServerId(lastId++); ItemTypePtr tmp(new ItemType);
g_things.addItemType(ItemTypePtr(&nullType)); tmp->setServerId(lastId++);
g_things.addItemType(tmp);
} }
} }
setServerId(serverId); setServerId(serverId);