Use LocalPlayer's updateInventory() every cell change, not every frame

This commit is contained in:
David Cernat 2016-11-17 15:32:04 +02:00
parent 19240b825d
commit faea5221d3

View file

@ -62,7 +62,6 @@ void LocalPlayer::update()
updateAttackState(); updateAttackState();
updateDeadState(); updateDeadState();
updateEquipped(); updateEquipped();
updateInventory();
updateDynamicStats(); updateDynamicStats();
updateAttributes(); updateAttributes();
updateSkills(); updateSkills();
@ -349,8 +348,11 @@ void LocalPlayer::updateCell(bool forceUpdate)
getNetworking()->getPlayerPacket((RakNet::MessageID) ID_GAME_CELL)->Packet(&bs, this, true); getNetworking()->getPlayerPacket((RakNet::MessageID) ID_GAME_CELL)->Packet(&bs, this, true);
getNetworking()->sendData(&bs); getNetworking()->sendData(&bs);
// Also update skill progress // Also force an update to skills (to send all progress to skill increases)
updateSkills(true); updateSkills(true);
// Also check if the inventory needs to be updated
updateInventory();
} }
} }