Browse Source

MobLoot usage

master
FatBoy-DOTC 2 years ago
parent
commit
460a2152c8
  1. 2
      src/engine/ai/MobileFSM.java
  2. 4
      src/engine/loot/LootManager.java

2
src/engine/ai/MobileFSM.java

@ -61,6 +61,8 @@ public class MobileFSM {
if (mob == null) { if (mob == null) {
return; return;
} }
if (mob.isGuard())
awakeNPCguard(mob);
STATE state = mob.state; STATE state = mob.state;
switch (state) { switch (state) {
case Idle: case Idle:

4
src/engine/loot/LootManager.java

@ -90,12 +90,12 @@ public class LootManager {
break; break;
} }
//iterate the booty tables and add items to mob inventory //iterate the booty tables and add items to mob inventory
Item toAdd = getGenTableItem(bse.lootTable, mob); MobLoot toAdd = getGenTableItem(bse.lootTable, mob);
if (toAdd != null) { if (toAdd != null) {
mob.getCharItemManager().addItemToInventory(toAdd); mob.getCharItemManager().addItemToInventory(toAdd);
} }
if (inHotzone) { if (inHotzone) {
Item toAddHZ = getGenTableItem(bse.lootTable + 1, mob); MobLoot toAddHZ = getGenTableItem(bse.lootTable + 1, mob);
if (toAddHZ != null) if (toAddHZ != null)
mob.getCharItemManager().addItemToInventory(toAddHZ); mob.getCharItemManager().addItemToInventory(toAddHZ);

Loading…
Cancel
Save