Clear house item cache before recaching

This commit is contained in:
Vortrex
2021-04-20 21:32:46 -05:00
parent 090bd8d0b3
commit d96f0d2298

View File

@@ -761,6 +761,8 @@ function cacheAllHouseItems() {
// ===========================================================================
function cacheHouseItems(houseId) {
getHouseData(houseId).itemCache = [];
for(let i in getServerData().items) {
if(getItemData(i).ownerType == AG_ITEM_OWNER_HOUSE && getItemData(i).ownerId == getHouseData(houseId).databaseId) {
getHouseData(houseId).itemCache.push(i);