Remove "Maple" prefix from MaplePacketCreator name

This commit is contained in:
P0nk
2021-08-19 21:31:57 +02:00
parent 579e3c639f
commit e184f25184
307 changed files with 2285 additions and 2328 deletions

View File

@@ -27,7 +27,7 @@ import net.AbstractMaplePacketHandler;
import server.events.gm.MapleCoconut;
import server.events.gm.MapleCoconuts;
import server.maps.MapleMap;
import tools.MaplePacketCreator;
import tools.PacketCreator;
import tools.data.input.SeekableLittleEndianAccessor;
/**
@@ -57,29 +57,29 @@ public final class CoconutHandler extends AbstractMaplePacketHandler {
if (Math.random() < 0.01 && event.getStopped() > 0) {
nut.setHittable(false);
event.stopCoconut();
map.broadcastMessage(MaplePacketCreator.hitCoconut(false, id, 1));
map.broadcastMessage(PacketCreator.hitCoconut(false, id, 1));
return;
}
nut.setHittable(false); // for sure :)
nut.resetHits(); // For next event (without restarts)
if (Math.random() < 0.05 && event.getBombings() > 0) {
map.broadcastMessage(MaplePacketCreator.hitCoconut(false, id, 2));
map.broadcastMessage(PacketCreator.hitCoconut(false, id, 2));
event.bombCoconut();
} else if (event.getFalling() > 0) {
map.broadcastMessage(MaplePacketCreator.hitCoconut(false, id, 3));
map.broadcastMessage(PacketCreator.hitCoconut(false, id, 3));
event.fallCoconut();
if (c.getPlayer().getTeam() == 0) {
event.addMapleScore();
map.broadcastMessage(MaplePacketCreator.serverNotice(5, c.getPlayer().getName() + " of Team Maple knocks down a coconut."));
map.broadcastMessage(PacketCreator.serverNotice(5, c.getPlayer().getName() + " of Team Maple knocks down a coconut."));
} else {
event.addStoryScore();
map.broadcastMessage(MaplePacketCreator.serverNotice(5, c.getPlayer().getName() + " of Team Story knocks down a coconut."));
map.broadcastMessage(PacketCreator.serverNotice(5, c.getPlayer().getName() + " of Team Story knocks down a coconut."));
}
map.broadcastMessage(MaplePacketCreator.coconutScore(event.getMapleScore(), event.getStoryScore()));
map.broadcastMessage(PacketCreator.coconutScore(event.getMapleScore(), event.getStoryScore()));
}
} else {
nut.hit();
map.broadcastMessage(MaplePacketCreator.hitCoconut(false, id, 1));
map.broadcastMessage(PacketCreator.hitCoconut(false, id, 1));
}
}
}