Clear house item cache before recaching
This commit is contained in:
@@ -761,6 +761,8 @@ function cacheAllHouseItems() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function cacheHouseItems(houseId) {
|
function cacheHouseItems(houseId) {
|
||||||
|
getHouseData(houseId).itemCache = [];
|
||||||
|
|
||||||
for(let i in getServerData().items) {
|
for(let i in getServerData().items) {
|
||||||
if(getItemData(i).ownerType == AG_ITEM_OWNER_HOUSE && getItemData(i).ownerId == getHouseData(houseId).databaseId) {
|
if(getItemData(i).ownerType == AG_ITEM_OWNER_HOUSE && getItemData(i).ownerId == getHouseData(houseId).databaseId) {
|
||||||
getHouseData(houseId).itemCache.push(i);
|
getHouseData(houseId).itemCache.push(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user