Massive refactor of several different components including networking fixes
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package rs09.game.ai.lumbridge;
|
||||
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.game.world.World;
|
||||
import core.tools.RandomFunction;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -13,7 +13,7 @@ public class LumbridgeBotHandler {
|
||||
public static void immersiveLumbridge()
|
||||
{
|
||||
//Generate a few random bots here and there
|
||||
System.out.println("[" + GameWorld.getSettings().getName() + "]: LumbridgeBotHandler: Initialized dead idlers.");
|
||||
System.out.println("[" + World.getSettings().getName() + "]: LumbridgeBotHandler: Initialized dead idlers.");
|
||||
generateDeadIdlers();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import core.game.node.entity.player.Player;
|
||||
import rs09.game.ai.AIPlayer;
|
||||
import core.game.node.item.Item;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.game.world.World;
|
||||
import core.game.world.map.path.Pathfinder;
|
||||
import core.game.world.update.flag.context.ChatMessage;
|
||||
import core.game.world.update.flag.player.ChatFlag;
|
||||
@@ -56,7 +56,7 @@ public class PVPAIPActions {
|
||||
};
|
||||
bot.getProperties().setRetaliating(true);
|
||||
bot.setAttribute("dead", false);
|
||||
GameWorld.getPulser().submit(new Pulse(1, bot) {
|
||||
World.getPulser().submit(new Pulse(1, bot) {
|
||||
int ticks;
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
@@ -131,7 +131,7 @@ public class PVPAIPActions {
|
||||
bot.sendChat("Ahh!");
|
||||
bot.sendChat("GTFO M8");
|
||||
bot.sendChat("Someone spec him!");
|
||||
GameWorld.getPulser().submit(new Pulse(1, bot) {
|
||||
World.getPulser().submit(new Pulse(1, bot) {
|
||||
int ticks;
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import core.game.node.entity.skill.gather.SkillingResource;
|
||||
import core.game.node.entity.player.Player;
|
||||
import rs09.game.ai.AIPlayer;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.game.world.World;
|
||||
import rs09.game.world.repository.Repository;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,7 +21,7 @@ public class ResourceAIPActions {
|
||||
}
|
||||
for (int aip_index = 0; aip_index < resource_players.size(); aip_index++) {
|
||||
final AIPlayer bot = resource_players.get(aip_index);
|
||||
GameWorld.getPulser().submit(new Pulse(1, bot) {
|
||||
World.getPulser().submit(new Pulse(1, bot) {
|
||||
int ticks;
|
||||
int ov;
|
||||
@Override
|
||||
|
||||
@@ -4,7 +4,7 @@ import core.game.node.entity.player.Player;
|
||||
import rs09.game.ai.resource.task.ResourceTask;
|
||||
import rs09.game.ai.resource.task.ResourceTasks;
|
||||
import core.game.system.task.Pulse;
|
||||
import rs09.game.world.GameWorld;
|
||||
import rs09.game.world.World;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
@@ -58,7 +58,7 @@ public class ResourceAIPManager {
|
||||
|
||||
public ResourceAIPManager load(Player player) {
|
||||
try {
|
||||
Statement statement = GameWorld.getDatabaseManager().connections().get("global").createStatement();
|
||||
Statement statement = World.getDatabaseManager().connections().get("global").createStatement();
|
||||
|
||||
ResultSet result = statement.executeQuery("SELECT * FROM `members` WHERE username='" + player.getUsername() + "'");
|
||||
// Results result = new Results(GameWorld.getDatabaseManager().query("global", "SELECT * FROM `members` WHERE username='" + player.getUsername() + "'"));
|
||||
@@ -87,14 +87,14 @@ public class ResourceAIPManager {
|
||||
StringBuilder query = new StringBuilder();
|
||||
query.append("UPDATE `members` SET `taskName`='" + entry.getKey().getTaskName() + "',`taskTime`='" + entry.getValue() + "' WHERE `username`='" + player.getUsername() + "'");
|
||||
System.out.println("ResourceAIPManager: " + query.toString());
|
||||
GameWorld.getDatabaseManager().update("global", query.toString());
|
||||
World.getDatabaseManager().update("global", query.toString());
|
||||
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public void pulse(Player player) {
|
||||
GameWorld.getPulser().submit(new Pulse(1) {
|
||||
World.getPulser().submit(new Pulse(1) {
|
||||
@Override
|
||||
public boolean pulse() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user