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