Browse Source

mob loot system addressed

lakebane
FatBoy-DOTC 6 days ago
parent
commit
94c9e92553
  1. 9
      src/engine/gameManager/LootManager.java
  2. 1
      src/engine/mobileAI/MobAI.java

9
src/engine/gameManager/LootManager.java

@ -76,8 +76,7 @@ public enum LootManager { @@ -76,8 +76,7 @@ public enum LootManager {
public static void GenerateMobLoot(Mob mob) {
//no loot for safezones
if(mob == null || mob.getSafeZone()){
if(mob == null){
return;
}
@ -186,14 +185,16 @@ public enum LootManager { @@ -186,14 +185,16 @@ public enum LootManager {
// Iterate all entries in this bootySet and process accordingly
Zone zone = ZoneManager.findSmallestZone(mob.loc);
for (BootySetEntry bse : entries) {
switch (bse.bootyType) {
case "GOLD":
if (zone != null && zone.getSafeZone() == (byte)1)
return; // no loot to drop in safezones
GenerateGoldDrop(mob, bse, inHotzone);
break;
case "LOOT":
if (mob.getSafeZone())
if (zone != null && zone.getSafeZone() == (byte)1)
return; // no loot to drop in safezones
dropRate = LootManager.NORMAL_DROP_RATE;

1
src/engine/mobileAI/MobAI.java

@ -884,7 +884,6 @@ public class MobAI { @@ -884,7 +884,6 @@ public class MobAI {
return;
}
}
aiAgent.despawn();
return;
}

Loading…
Cancel
Save