|
|
@ -851,7 +851,7 @@ public class MobAI { |
|
|
|
if (!aiAgent.despawned) { |
|
|
|
if (!aiAgent.despawned) { |
|
|
|
|
|
|
|
|
|
|
|
if (aiAgent.getCharItemManager().getInventoryCount() > 0) { |
|
|
|
if (aiAgent.getCharItemManager().getInventoryCount() > 0) { |
|
|
|
if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_WITH_LOOT) { |
|
|
|
if (System.currentTimeMillis() > (aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_WITH_LOOT) * 0.5f) { |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -860,21 +860,21 @@ public class MobAI { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//Mob's Loot has been looted.
|
|
|
|
//Mob's Loot has been looted.
|
|
|
|
if (aiAgent.isHasLoot()) { |
|
|
|
if (aiAgent.isHasLoot()) { |
|
|
|
if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) { |
|
|
|
if (System.currentTimeMillis() > (aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) * 0.5f) { |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
return; |
|
|
|
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) * 0.5f) { |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.despawn(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
aiAgent.deathTime = System.currentTimeMillis(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000))) { |
|
|
|
} else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000) * 0.5f)) { |
|
|
|
|
|
|
|
|
|
|
|
if (Zone.respawnQue.contains(aiAgent) == false) { |
|
|
|
if (Zone.respawnQue.contains(aiAgent) == false) { |
|
|
|
Zone.respawnQue.add(aiAgent); |
|
|
|
Zone.respawnQue.add(aiAgent); |
|
|
|