diff --git a/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib b/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib index 4e654c5a2..f858a8083 100644 --- a/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib +++ b/sku.0/sys.server/compiled/game/script/library/player_structure.scriptlib @@ -3010,7 +3010,15 @@ void finalizePackUp(obj_id player, obj_id structure) blog("player_structure.finalizePackUp isAbandoned: "+isAbandoned); obj_id structure_owner = getOwner(structure); - + location where = getLocation(structure); + string structName = getStructureName(structure); + + // Get the structure name + if (structName == null || structName.length() < 1) + { + structName = "Building"; + } + if(structure_owner != player && isAbandoned) { CustomerServiceLog("housepackup", "Structure (" + structure + ") was abandoned and was not being packed by Owner (" @@ -3050,7 +3058,106 @@ void finalizePackUp(obj_id player, obj_id structure) ); return; } + + if (isBuilding(structure)) + { + // eject all players from house + obj_id[] players = getPlayersInBuilding(structure); + if (players != null) + { + for (int i = 0; i < players.length; i++) + { + expelFromBuilding(players[i]); + } + } + + // Destroy vendors inside this structure. + string[] cells = getCellNames(structure); + if( cells != null) + { + for(int i = 0; i < cells.length; i++) + { + obj_id cellid = getCellId(structure, cells[i]); + obj_id contents[] = getContents(cellid); + if(contents != null) + { + for(int j=0; j