Browse Source

simplified mob aI

lakebane
FatBoy-DOTC 4 weeks ago
parent
commit
f9f4665e52
  1. 11
      src/engine/mobileAI/Behaviours/StandardMob.java

11
src/engine/mobileAI/Behaviours/StandardMob.java

@ -106,8 +106,8 @@ public class StandardMob { @@ -106,8 +106,8 @@ public class StandardMob {
if(Mob.discDroppers.contains(mob))
return;
float baseRespawnTimer = mob.spawnTime;
float reduction = ((100-mob.level) * 0.01f);
float reducedRespawnTime = baseRespawnTimer * reduction;
float reduction = (100-mob.level) * 0.01f;
float reducedRespawnTime = baseRespawnTimer * (1.0f - reduction);
float respawnTimer = reducedRespawnTime * 1000f;
if (System.currentTimeMillis() > (mob.deathTime + respawnTimer)) {
Zone.respawnQue.add(mob);
@ -219,9 +219,6 @@ public class StandardMob { @@ -219,9 +219,6 @@ public class StandardMob {
if(mob.getLastAttackTime() > System.currentTimeMillis())
return;
mob.updateLocation();
InterestManager.forceLoad(mob);
if (mob.BehaviourType.callsForHelp)
MobCallForHelp(mob);
@ -231,6 +228,10 @@ public class StandardMob { @@ -231,6 +228,10 @@ public class StandardMob {
if(!CombatUtilities.inRange2D(mob,mob.combatTarget,mob.getRange()))
return;
mob.updateLocation();
//InterestManager.forceLoad(mob);
InterestManager.setObjectDirty(mob);
if (mainHand == null && offHand == null) {
CombatUtilities.combatCycle(mob, mob.combatTarget, true, null);
int delay = 3000;

Loading…
Cancel
Save