Rename and clean up MapleCoconut
This commit is contained in:
@@ -25,7 +25,7 @@ package net.server.channel.handlers;
|
|||||||
import client.Client;
|
import client.Client;
|
||||||
import net.AbstractPacketHandler;
|
import net.AbstractPacketHandler;
|
||||||
import net.packet.InPacket;
|
import net.packet.InPacket;
|
||||||
import server.events.gm.MapleCoconut;
|
import server.events.gm.Coconut;
|
||||||
import server.events.gm.MapleCoconuts;
|
import server.events.gm.MapleCoconuts;
|
||||||
import server.maps.MapleMap;
|
import server.maps.MapleMap;
|
||||||
import tools.PacketCreator;
|
import tools.PacketCreator;
|
||||||
@@ -42,7 +42,7 @@ public final class CoconutHandler extends AbstractPacketHandler {
|
|||||||
*/
|
*/
|
||||||
int id = p.readShort();
|
int id = p.readShort();
|
||||||
MapleMap map = c.getPlayer().getMap();
|
MapleMap map = c.getPlayer().getMap();
|
||||||
MapleCoconut event = map.getCoconut();
|
Coconut event = map.getCoconut();
|
||||||
MapleCoconuts nut = event.getCoconut(id);
|
MapleCoconuts nut = event.getCoconut(id);
|
||||||
if (!nut.isHittable()){
|
if (!nut.isHittable()){
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -32,20 +32,19 @@ import java.util.LinkedList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author kevintjuh93
|
* @author kevintjuh93
|
||||||
*/
|
*/
|
||||||
//Make them better :)
|
//Make them better :)
|
||||||
public class MapleCoconut extends MapleEvent {
|
public class Coconut extends MapleEvent {
|
||||||
private MapleMap map = null;
|
private MapleMap map = null;
|
||||||
private int MapleScore = 0;
|
private int MapleScore = 0;
|
||||||
private int StoryScore = 0;
|
private int StoryScore = 0;
|
||||||
private int countBombing = 80;
|
private int countBombing = 80;
|
||||||
private int countFalling = 401;
|
private int countFalling = 401;
|
||||||
private int countStopped = 20;
|
private int countStopped = 20;
|
||||||
private List<MapleCoconuts> coconuts = new LinkedList<>();
|
private final List<MapleCoconuts> coconuts = new LinkedList<>();
|
||||||
|
|
||||||
public MapleCoconut(MapleMap map) {
|
public Coconut(MapleMap map) {
|
||||||
super(1, 50);
|
super(1, 50);
|
||||||
this.map = map;
|
this.map = map;
|
||||||
}
|
}
|
||||||
@@ -146,7 +146,7 @@ public class MapleMap {
|
|||||||
private boolean eventstarted = false, isMuted = false;
|
private boolean eventstarted = false, isMuted = false;
|
||||||
private MapleSnowball snowball0 = null;
|
private MapleSnowball snowball0 = null;
|
||||||
private MapleSnowball snowball1 = null;
|
private MapleSnowball snowball1 = null;
|
||||||
private MapleCoconut coconut;
|
private Coconut coconut;
|
||||||
|
|
||||||
//CPQ
|
//CPQ
|
||||||
private int maxMobs;
|
private int maxMobs;
|
||||||
@@ -3870,11 +3870,11 @@ public class MapleMap {
|
|||||||
return fieldType == 4 || fieldType == 19;
|
return fieldType == 4 || fieldType == 19;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCoconut(MapleCoconut nut) {
|
public void setCoconut(Coconut nut) {
|
||||||
this.coconut = nut;
|
this.coconut = nut;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MapleCoconut getCoconut() {
|
public Coconut getCoconut() {
|
||||||
return coconut;
|
return coconut;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3891,7 +3891,7 @@ public class MapleMap {
|
|||||||
|
|
||||||
public void startEvent(final Character chr) {
|
public void startEvent(final Character chr) {
|
||||||
if (this.mapid == 109080000 && getCoconut() == null) {
|
if (this.mapid == 109080000 && getCoconut() == null) {
|
||||||
setCoconut(new MapleCoconut(this));
|
setCoconut(new Coconut(this));
|
||||||
coconut.startEvent();
|
coconut.startEvent();
|
||||||
} else if (this.mapid == 109040000) {
|
} else if (this.mapid == 109040000) {
|
||||||
chr.setFitness(new MapleFitness(chr));
|
chr.setFitness(new MapleFitness(chr));
|
||||||
|
|||||||
Reference in New Issue
Block a user