forked from MagicBane/Server
admins dont appear on track
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package engine.mobileAI.MobHandlers;
|
||||
|
||||
import engine.objects.Mob;
|
||||
|
||||
public class MobHandler {
|
||||
public static void run(Mob mob){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package engine.mobileAI.MobHandlers;
|
||||
|
||||
import engine.objects.Mob;
|
||||
|
||||
public class PetHandler {
|
||||
|
||||
public static void run(Mob pet){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package engine.mobileAI.MobHandlers;
|
||||
|
||||
import engine.objects.Mob;
|
||||
|
||||
public class PlayerGuardHandler {
|
||||
public static void run(Mob guard){
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package engine.mobileAI.MobHandlers;
|
||||
|
||||
import engine.Enum;
|
||||
import engine.objects.Mob;
|
||||
|
||||
public class SiegeHandler {
|
||||
public static void run(Mob engine){
|
||||
|
||||
if(!engine.isAlive())
|
||||
return;
|
||||
|
||||
if(engine.getOwner() == null || !engine.getOwner().isAlive())
|
||||
return;
|
||||
|
||||
if(engine.combatTarget == null || !engine.combatTarget.getObjectType().equals(Enum.GameObjectType.Building))
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package engine.mobileAI;
|
||||
|
||||
import engine.mobileAI.MobHandlers.MobHandler;
|
||||
import engine.mobileAI.MobHandlers.PetHandler;
|
||||
import engine.mobileAI.MobHandlers.PlayerGuardHandler;
|
||||
import engine.mobileAI.MobHandlers.SiegeHandler;
|
||||
import engine.objects.Mob;
|
||||
|
||||
public class SuperSimpleMobAI {
|
||||
|
||||
public static void run(Mob mob){
|
||||
if(mob.isPet() && !mob.isSiege()) {
|
||||
PetHandler.run(mob);
|
||||
return;
|
||||
}
|
||||
if (mob.isSiege()) {
|
||||
SiegeHandler.run(mob);
|
||||
return;
|
||||
}
|
||||
if(mob.isPlayerGuard()){
|
||||
PlayerGuardHandler.run(mob);
|
||||
return;
|
||||
}
|
||||
MobHandler.run(mob);
|
||||
}
|
||||
|
||||
//##generic methods for all mobs
|
||||
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class RangeBasedAwo implements Comparable<RangeBasedAwo> {
|
||||
AbstractWorldObject awo = rba.awo;
|
||||
|
||||
if (awo.getObjectType().equals(GameObjectType.PlayerCharacter))
|
||||
if (((PlayerCharacter) awo).isCSR())
|
||||
if (((PlayerCharacter) awo).getAccount().status.equals(Enum.AccountStatus.ADMIN))
|
||||
continue;
|
||||
|
||||
if (AbstractWorldObject.IsAbstractCharacter(awo) && !(pc.equals(awo))) {
|
||||
|
||||
Reference in New Issue
Block a user