Rename and clean up MaplePlayerNPCFactory
This commit is contained in:
@@ -60,7 +60,7 @@ import server.MapleSkillbookInformationProvider;
|
|||||||
import server.ThreadManager;
|
import server.ThreadManager;
|
||||||
import server.TimerManager;
|
import server.TimerManager;
|
||||||
import server.expeditions.ExpeditionBossLog;
|
import server.expeditions.ExpeditionBossLog;
|
||||||
import server.life.MaplePlayerNPCFactory;
|
import server.life.PlayerNPCFactory;
|
||||||
import server.quest.MapleQuest;
|
import server.quest.MapleQuest;
|
||||||
import tools.DatabaseConnection;
|
import tools.DatabaseConnection;
|
||||||
import tools.FilePrinter;
|
import tools.FilePrinter;
|
||||||
@@ -841,7 +841,7 @@ public class Server {
|
|||||||
futures.add(initExecutor.submit(() -> CashItemFactory.loadAllCashItems()));
|
futures.add(initExecutor.submit(() -> CashItemFactory.loadAllCashItems()));
|
||||||
futures.add(initExecutor.submit(() -> MapleQuest.loadAllQuests()));
|
futures.add(initExecutor.submit(() -> MapleQuest.loadAllQuests()));
|
||||||
futures.add(initExecutor.submit(() -> MapleSkillbookInformationProvider.loadAllSkillbookInformation()));
|
futures.add(initExecutor.submit(() -> MapleSkillbookInformationProvider.loadAllSkillbookInformation()));
|
||||||
futures.add(initExecutor.submit(() -> MaplePlayerNPCFactory.loadFactoryMetadata()));
|
futures.add(initExecutor.submit(() -> PlayerNPCFactory.loadFactoryMetadata()));
|
||||||
|
|
||||||
TimeZone.setDefault(TimeZone.getTimeZone(YamlConfig.config.server.TIMEZONE));
|
TimeZone.setDefault(TimeZone.getTimeZone(YamlConfig.config.server.TIMEZONE));
|
||||||
|
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ public class PlayerNPC extends AbstractMapleMapObject {
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
for (int i = branchSid; i < nextBranchSid; i++) {
|
for (int i = branchSid; i < nextBranchSid; i++) {
|
||||||
if (!usedScriptIds.contains(i)) {
|
if (!usedScriptIds.contains(i)) {
|
||||||
if (MaplePlayerNPCFactory.isExistentScriptid(i)) { // thanks Ark, Zein, geno, Ariel, JrCl0wn for noticing client crashes due to use of missing scriptids
|
if (PlayerNPCFactory.isExistentScriptid(i)) { // thanks Ark, Zein, geno, Ariel, JrCl0wn for noticing client crashes due to use of missing scriptids
|
||||||
availables.add(i);
|
availables.add(i);
|
||||||
j++;
|
j++;
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,10 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author RonanLana
|
* @author RonanLana
|
||||||
*/
|
*/
|
||||||
public class MaplePlayerNPCFactory {
|
public class PlayerNPCFactory {
|
||||||
|
private static final DataProvider npcData = DataProviderFactory.getDataProvider(WZFiles.NPC);
|
||||||
private static DataProvider npcData = DataProviderFactory.getDataProvider(WZFiles.NPC);
|
|
||||||
|
|
||||||
private static final Map<Integer, List<PlayerNPC>> dnpcMaps = new HashMap<>();
|
private static final Map<Integer, List<PlayerNPC>> dnpcMaps = new HashMap<>();
|
||||||
private static Integer runningDeveloperOid = 2147483000; // 647 slots, long enough
|
private static Integer runningDeveloperOid = 2147483000; // 647 slots, long enough
|
||||||
@@ -249,7 +249,7 @@ public class MapleMapFactory {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PlayerNPC> dnpcs = MaplePlayerNPCFactory.getDeveloperNpcsFromMapid(mapid);
|
List<PlayerNPC> dnpcs = PlayerNPCFactory.getDeveloperNpcsFromMapid(mapid);
|
||||||
if (dnpcs != null) {
|
if (dnpcs != null) {
|
||||||
for (PlayerNPC dnpc : dnpcs) {
|
for (PlayerNPC dnpc : dnpcs) {
|
||||||
map.addPlayerNPCMapObject(dnpc);
|
map.addPlayerNPCMapObject(dnpc);
|
||||||
|
|||||||
Reference in New Issue
Block a user