Rename and clean up MapleReactorFactory
This commit is contained in:
@@ -352,7 +352,7 @@ public class MapFactory {
|
||||
}
|
||||
|
||||
private static Reactor loadReactor(Data reactor, String id, final byte FacingDirection) {
|
||||
Reactor myReactor = new Reactor(MapleReactorFactory.getReactor(Integer.parseInt(id)), Integer.parseInt(id));
|
||||
Reactor myReactor = new Reactor(ReactorFactory.getReactor(Integer.parseInt(id)), Integer.parseInt(id));
|
||||
int x = DataTool.getInt(reactor.getChildByPath("x"));
|
||||
int y = DataTool.getInt(reactor.getChildByPath("y"));
|
||||
myReactor.setFacingDirection(FacingDirection);
|
||||
|
||||
@@ -4299,7 +4299,7 @@ public class MapleMap {
|
||||
return -1;
|
||||
}
|
||||
int reactorID = 9980000 + team;
|
||||
Reactor reactor = new Reactor(MapleReactorFactory.getReactorS(reactorID), reactorID);
|
||||
Reactor reactor = new Reactor(ReactorFactory.getReactorS(reactorID), reactorID);
|
||||
pt.setTaken(true);
|
||||
reactor.setPosition(pt.getPosition());
|
||||
reactor.setName(team + "" + num); //lol
|
||||
|
||||
@@ -35,11 +35,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MapleReactorFactory {
|
||||
private static DataProvider data = DataProviderFactory.getDataProvider(WZFiles.REACTOR);
|
||||
private static Map<Integer, MapleReactorStats> reactorStats = new HashMap<>();
|
||||
public class ReactorFactory {
|
||||
private static final DataProvider data = DataProviderFactory.getDataProvider(WZFiles.REACTOR);
|
||||
private static final Map<Integer, MapleReactorStats> reactorStats = new HashMap<>();
|
||||
|
||||
|
||||
public static final MapleReactorStats getReactorS(int rid) {
|
||||
MapleReactorStats stats = reactorStats.get(rid);
|
||||
if (stats == null) {
|
||||
@@ -93,7 +92,7 @@ public class MapleReactorFactory {
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
|
||||
public static MapleReactorStats getReactor(int rid) {
|
||||
MapleReactorStats stats = reactorStats.get(rid);
|
||||
if (stats == null) {
|
||||
@@ -121,7 +120,7 @@ public class MapleReactorFactory {
|
||||
Data eventData = reactorInfoData.getChildByPath("event");
|
||||
if (eventData != null) {
|
||||
int timeOut = -1;
|
||||
|
||||
|
||||
for (Data fknexon : eventData.getChildren()) {
|
||||
if (fknexon.getName().equalsIgnoreCase("timeOut")) {
|
||||
timeOut = DataTool.getInt(fknexon);
|
||||
Reference in New Issue
Block a user