Browse Source

audit respawn timers

master
FatBoy-DOTC 1 year ago
parent
commit
9f90159ca2
  1. 3
      src/engine/ai/MobileFSM.java

3
src/engine/ai/MobileFSM.java

@ -509,6 +509,7 @@ public class MobileFSM {
if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_WITH_LOOT) { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_WITH_LOOT) {
aiAgent.despawn(); aiAgent.despawn();
aiAgent.deathTime = System.currentTimeMillis(); aiAgent.deathTime = System.currentTimeMillis();
return;
} }
//No items in inventory. //No items in inventory.
} else { } else {
@ -517,12 +518,14 @@ public class MobileFSM {
if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) {
aiAgent.despawn(); aiAgent.despawn();
aiAgent.deathTime = System.currentTimeMillis(); aiAgent.deathTime = System.currentTimeMillis();
return;
} }
//Mob never had Loot. //Mob never had Loot.
} else { } else {
if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER) { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER) {
aiAgent.despawn(); aiAgent.despawn();
aiAgent.deathTime = System.currentTimeMillis(); aiAgent.deathTime = System.currentTimeMillis();
return;
} }
} }
} }

Loading…
Cancel
Save