refactored AI variables from MBServerStatics

This commit is contained in:
2023-06-26 20:21:10 -05:00
parent 2ffd2e37e6
commit ef0e277f46
9 changed files with 58 additions and 69 deletions
+16 -15
View File
@@ -10,6 +10,7 @@
package engine.devcmd.cmds;
import engine.ai.MobileFSMManager;
import engine.devcmd.AbstractDevCmd;
import engine.gameManager.DbManager;
import engine.objects.AbstractGameObject;
@@ -48,20 +49,20 @@ public class SetAICmd extends AbstractDevCmd {
case "angle" :
float angle = Float.parseFloat(words[1]);
MBServerStatics.AI_MAX_ANGLE = angle;
MobileFSMManager.AI_MAX_ANGLE = angle;
break;
case "aggrorange":
MBServerStatics.AI_BASE_AGGRO_RANGE = amount;
MobileFSMManager.AI_BASE_AGGRO_RANGE = amount;
DbManager.MobBaseQueries.UPDATE_AI_DEFAULTS();
this.throwbackInfo(pc, "Aggro Range is now set to " + amount);
break;
case "dropaggrorange":
MBServerStatics.AI_DROP_AGGRO_RANGE = amount;
MobileFSMManager.AI_DROP_AGGRO_RANGE = amount;
DbManager.MobBaseQueries.UPDATE_AI_DEFAULTS();
this.throwbackInfo(pc, "Drop Aggro Range is now set to " + amount);
break;
case "patroldivisor":
MBServerStatics.AI_PATROL_DIVISOR = amount;
MobileFSMManager.AI_PATROL_DIVISOR = amount;
DbManager.MobBaseQueries.UPDATE_AI_DEFAULTS();
this.throwbackInfo(pc, "Patrol Chance is now set to " + amount);
break;
@@ -70,7 +71,7 @@ public class SetAICmd extends AbstractDevCmd {
this.throwbackError(pc, "pulse amount must be greather than 500 to execute.");
return;
}
MBServerStatics.AI_PULSE_MOB_THRESHOLD = amount;
MobileFSMManager.AI_PULSE_MOB_THRESHOLD = amount;
this.throwbackInfo(pc, "Pulse is now set to " + amount);
break;
case "sleepthread":
@@ -78,16 +79,16 @@ public class SetAICmd extends AbstractDevCmd {
this.throwbackError(pc, "sleep amount must be greather than 500 to execute.");
return;
}
MBServerStatics.AI_THREAD_SLEEP = amount;
MobileFSMManager.AI_THREAD_SLEEP = amount;
this.throwbackInfo(pc, "Thread Sleep is now set to " + amount);
break;
case "recallrange":
MBServerStatics.AI_RECALL_RANGE = amount;
MobileFSMManager.AI_RECALL_RANGE = amount;
DbManager.MobBaseQueries.UPDATE_AI_DEFAULTS();
this.throwbackInfo(pc, "Recall Range is now set to " + amount);
break;
case "powerdivisor":
MBServerStatics.AI_POWER_DIVISOR = amount;
MobileFSMManager.AI_POWER_DIVISOR = amount;
DbManager.MobBaseQueries.UPDATE_AI_DEFAULTS();
this.throwbackInfo(pc, "Power Divisor is now set to " + amount);
break;
@@ -105,13 +106,13 @@ public class SetAICmd extends AbstractDevCmd {
@Override
protected String _getHelpString() {
String help = "Modifies Mob AI Statics. Commands:";
help += "\n AGGRORANGE: Sets the range when a mob will aggro it's target. Aggro range is currently " + MBServerStatics.AI_BASE_AGGRO_RANGE;
help += "\n DROPAGGRORANGE: Sets the range when a mob will drop aggro from it's target. Drop aggro range is currently " + MBServerStatics.AI_DROP_AGGRO_RANGE;
help += "\n PATROLDIVISOR: Sets the Patrol Divisor for Mob AI. Setting this will give a 1/[amount] chance to parol the area. Patrol Chance is currently 1/" + MBServerStatics.AI_PATROL_DIVISOR;
help += "\n PULSE: sets how often to run mob's AI. Measured in MS. Pulse is currently " + MBServerStatics.AI_PULSE_MOB_THRESHOLD + "ms.";
help += "\n SLEEPTHREAD: Sets how long to sleep the AI for ALL mobs.Thread sleep is currently " + MBServerStatics.AI_THREAD_SLEEP + "ms.";
help += "\n RECALLRANGE: Sets the range of a mob to recall back to it's bind location. Recall range is currently " + MBServerStatics.AI_RECALL_RANGE;
help += "\n POWERDIVISOR: Sets the Power Divisor for Mob AI.Setting this will give a 1/[amount] chance to use power on a player. Power Divisor is currently " + MBServerStatics.AI_POWER_DIVISOR;
help += "\n AGGRORANGE: Sets the range when a mob will aggro it's target. Aggro range is currently " + MobileFSMManager.AI_BASE_AGGRO_RANGE;
help += "\n DROPAGGRORANGE: Sets the range when a mob will drop aggro from it's target. Drop aggro range is currently " + MobileFSMManager.AI_DROP_AGGRO_RANGE;
help += "\n PATROLDIVISOR: Sets the Patrol Divisor for Mob AI. Setting this will give a 1/[amount] chance to parol the area. Patrol Chance is currently 1/" + MobileFSMManager.AI_PATROL_DIVISOR;
help += "\n PULSE: sets how often to run mob's AI. Measured in MS. Pulse is currently " + MobileFSMManager.AI_PULSE_MOB_THRESHOLD + "ms.";
help += "\n SLEEPTHREAD: Sets how long to sleep the AI for ALL mobs.Thread sleep is currently " + MobileFSMManager.AI_THREAD_SLEEP + "ms.";
help += "\n RECALLRANGE: Sets the range of a mob to recall back to it's bind location. Recall range is currently " + MobileFSMManager.AI_RECALL_RANGE;
help += "\n POWERDIVISOR: Sets the Power Divisor for Mob AI.Setting this will give a 1/[amount] chance to use power on a player. Power Divisor is currently " + MobileFSMManager.AI_POWER_DIVISOR;
help += "\n LOSEHATE: Sets the amount per second to reduce hate amount for player while they are idle. Hate Delimiter is currently " + MBServerStatics.PLAYER_HATE_DELIMITER;
help += "\n HATEMODCOMBAT: sets the modifier for Hate value for Combat. Hate Value is `Damage *[HATEMODCOMBAT]`.Hate Mod Combat is currently " + MBServerStatics.PLAYER_COMBAT_HATE_MODIFIER;