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

1
src/engine/mobileAI/MobAI.java

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

Loading…
Cancel
Save