Rename and clean up MapleEvent
This commit is contained in:
@@ -26,7 +26,7 @@ package client.command.commands.gm0;
|
||||
import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import server.events.gm.MapleEvent;
|
||||
import server.events.gm.Event;
|
||||
import server.maps.FieldLimit;
|
||||
|
||||
public class JoinEventCommand extends Command {
|
||||
@@ -38,7 +38,7 @@ public class JoinEventCommand extends Command {
|
||||
public void execute(Client c, String[] params) {
|
||||
Character player = c.getPlayer();
|
||||
if(!FieldLimit.CANNOTMIGRATE.check(player.getMap().getFieldLimit())) {
|
||||
MapleEvent event = c.getChannelServer().getEvent();
|
||||
Event event = c.getChannelServer().getEvent();
|
||||
if(event != null) {
|
||||
if(event.getMapId() != player.getMapId()) {
|
||||
if(event.getLimit() > 0) {
|
||||
|
||||
@@ -27,7 +27,7 @@ import client.Character;
|
||||
import client.Client;
|
||||
import client.command.Command;
|
||||
import net.server.Server;
|
||||
import server.events.gm.MapleEvent;
|
||||
import server.events.gm.Event;
|
||||
import tools.PacketCreator;
|
||||
|
||||
public class StartEventCommand extends Command {
|
||||
@@ -41,7 +41,7 @@ public class StartEventCommand extends Command {
|
||||
int players = 50;
|
||||
if (params.length > 1)
|
||||
players = Integer.parseInt(params[0]);
|
||||
c.getChannelServer().setEvent(new MapleEvent(player.getMapId(), players));
|
||||
c.getChannelServer().setEvent(new Event(player.getMapId(), players));
|
||||
Server.getInstance().broadcastMessage(c.getWorld(), PacketCreator.earnTitleMessage(
|
||||
"[Event] An event has started on "
|
||||
+ player.getMap().getMapName()
|
||||
|
||||
@@ -43,7 +43,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import scripting.event.EventScriptManager;
|
||||
import server.TimerManager;
|
||||
import server.events.gm.MapleEvent;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.maps.*;
|
||||
@@ -77,7 +77,7 @@ public final class Channel {
|
||||
private Map<Integer, MapleMiniDungeon> dungeons = new HashMap<>();
|
||||
private List<MapleExpeditionType> expedType = new ArrayList<>();
|
||||
private Set<MapleMap> ownedMaps = Collections.synchronizedSet(Collections.newSetFromMap(new WeakHashMap<>()));
|
||||
private MapleEvent event;
|
||||
private Event event;
|
||||
private boolean finishedShutdown = false;
|
||||
private Set<Integer> usedMC = new HashSet<>();
|
||||
|
||||
@@ -297,11 +297,11 @@ public final class Channel {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public MapleEvent getEvent() {
|
||||
public Event getEvent() {
|
||||
return event;
|
||||
}
|
||||
|
||||
public void setEvent(MapleEvent event) {
|
||||
public void setEvent(Event event) {
|
||||
this.event = event;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import provider.wz.WZFiles;
|
||||
import scripting.AbstractPlayerInteraction;
|
||||
import server.*;
|
||||
import server.MapleSkillbookInformationProvider.SkillBookEntry;
|
||||
import server.events.gm.MapleEvent;
|
||||
import server.events.gm.Event;
|
||||
import server.expeditions.MapleExpedition;
|
||||
import server.expeditions.MapleExpeditionType;
|
||||
import server.gachapon.MapleGachapon;
|
||||
@@ -476,7 +476,7 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
return inMap;
|
||||
}
|
||||
|
||||
public MapleEvent getEvent() {
|
||||
public Event getEvent() {
|
||||
return c.getChannelServer().getEvent();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.List;
|
||||
* @author kevintjuh93
|
||||
*/
|
||||
//Make them better :)
|
||||
public class Coconut extends MapleEvent {
|
||||
public class Coconut extends Event {
|
||||
private MapleMap map = null;
|
||||
private int MapleScore = 0;
|
||||
private int StoryScore = 0;
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
package server.events.gm;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevintjuh93
|
||||
*/
|
||||
public class MapleEvent {
|
||||
private int mapid;
|
||||
public class Event {
|
||||
private final int mapid;
|
||||
private int limit;
|
||||
|
||||
public MapleEvent(int mapid, int limit) {
|
||||
public Event(int mapid, int limit) {
|
||||
this.mapid = mapid;
|
||||
this.limit = limit;
|
||||
}
|
||||
Reference in New Issue
Block a user