for (DropCategory cat : template.getDropData())
{
IntIntHolder holder = null;
if (cat.isSweep())
{
if (getSpoilState().isSpoiled())
{
for (DropData drop : cat.getAllDrops())
{
holder = calculateRewardItem(drop, levelModifier, true);
if (holder == null)
continue;
getSpoilState().add(holder);
}
}
}
else
{
if (getSeedState().isSeeded())
{
final DropData drop = cat.dropSeedAllowedDropsOnly();
if (drop == null)
continue;
holder = calculateRewardItem(drop, levelModifier, false);
}
else
holder = calculateCategorizedRewardItem(cat, levelModifier);
if (holder == null)
continue;
dropOrAutoLootItem(player, holder, true);
}