Postby Tolakram » Sun Aug 26, 2007 3:57 pm
Unfortunately PackSize is not handled by the loot generator.
Ah, I found two problems:
in GameNPC.DropLoot
if (((GameInventoryItem)loot).Item.Id_nb == "aurulite")
{
((GameInventoryItem)loot).Item.Count = ((GameInventoryItem)loot).Item.PackSize;
}
So for whatever reason someone decided only aurulite can recognize packsize.
The second problem is that I can set Count to be what I want to drop when the item is an inventory item, but the loot generator uses itemtemplate not inventory item, so the Count is lost.
So the only way to set how many you want to drop is via packsize. Can someone remove the aurulite restriction to packsize? I'm going ahead and removing it locally, but I question why the restriction is there in the first place. Null or 0 packsize should equal 1, anything else should be used when dropping the loot.
if (((GameInventoryItem)loot).Item.PackSize > 1)
((GameInventoryItem)loot).Item.Count = ((GameInventoryItem)loot).Item.PackSize;