Error while compiling PerfectRepair: 'PlayerInventory' does not contain a definition for 'AllItems' and no accessible extension method 'AllItems' accepting a first argument of type 'PlayerInventory' could be found (are you missing a using directive or an assembly reference?) | Line: 86, Pos: 59
Plugin is broken. since the UpdateFixed
yeah, its not functional since the update.
Replace (starting at line 86)
foreach (var item in player.inventory.AllItems())
{
if (item.hasCondition)
{
item._maxCondition = item.info.condition.max;
item.MarkDirty();
}
}
With
// Main inventory container
foreach (var containerItem in player.inventory.containerMain?.itemList ?? new List<Item>())
{
if (containerItem.hasCondition)
{
containerItem._maxCondition = containerItem.info.condition.max;
containerItem.MarkDirty();
}
}
// Belt container
foreach (var beltItem in player.inventory.containerBelt?.itemList ?? new List<Item>())
{
if (beltItem.hasCondition)
{
beltItem._maxCondition = beltItem.info.condition.max;
beltItem.MarkDirty();
}
}
// Wear container
foreach (var wearItem in player.inventory.containerWear?.itemList ?? new List<Item>())
{
if (wearItem.hasCondition)
{
wearItem._maxCondition = wearItem.info.condition.max;
wearItem.MarkDirty();
}
}
can some one just update the plugin?
shadow5443
can some one just update the plugin?
Maybe. But until then just use the code above?
JackReigns
Maybe. But until then just use the code above?
done and plugin back to work thx for share
Locked automatically