public static int GetTotalValueOfKit(CLRScriptBase script, uint Character)
{
int lootValue = 0;
foreach (uint item in script.GetItemsInInventory(Character))
{
lootValue += script.GetGoldPieceValue(item);
}
lootValue += script.GetGold(Character);
for (int slot = 0; slot < 14; slot++)
{
uint equip = script.GetItemInSlot(slot, Character);
if (script.GetIsObjectValid(equip) == CLRScriptBase.TRUE)
{
lootValue += script.GetGoldPieceValue(equip);
}
}
if (pChestAccess.ContainsKey(Character))
{
foreach (string chest in pChestAccess[Character])
{
lootValue += pChestValues[chest];
}
}
return lootValue;
}