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

@@ -3,7 +3,7 @@ package server.minigame;
import client.MapleClient;
import client.inventory.Item;
import client.inventory.manipulator.MapleInventoryManipulator;
import tools.MaplePacketCreator;
import tools.PacketCreator;
import tools.Randomizer;
/**
@@ -18,7 +18,7 @@ public class MapleRockPaperScissor{
private boolean win = false;
public MapleRockPaperScissor(final MapleClient c, final byte mode){
c.announce(MaplePacketCreator.rpsMode((byte) (9 + mode)));
c.announce(PacketCreator.rpsMode((byte) (9 + mode)));
if(mode == 0){
c.getPlayer().gainMeso(-1000, true, true, true);
}
@@ -28,14 +28,14 @@ public class MapleRockPaperScissor{
if(ableAnswer && !win && answer >= 0 && answer <= 2){
final int response = Randomizer.nextInt(3);
if(response == answer){
c.announce(MaplePacketCreator.rpsSelection((byte) response, (byte) round));
c.announce(PacketCreator.rpsSelection((byte) response, (byte) round));
// dont do anything. they can still answer once a draw
}else if((answer == 0 && response == 2) || (answer == 1 && response == 0) || (answer == 2 && response == 1)){ // they win
c.announce(MaplePacketCreator.rpsSelection((byte) response, (byte) (round + 1)));
c.announce(PacketCreator.rpsSelection((byte) response, (byte) (round + 1)));
ableAnswer = false;
win = true;
}else{ // they lose
c.announce(MaplePacketCreator.rpsSelection((byte) response, (byte) -1));
c.announce(PacketCreator.rpsSelection((byte) response, (byte) -1));
ableAnswer = false;
}
return true;
@@ -47,7 +47,7 @@ public class MapleRockPaperScissor{
public final boolean timeOut(final MapleClient c){
if(ableAnswer && !win){
ableAnswer = false;
c.announce(MaplePacketCreator.rpsMode((byte) 0x0A));
c.announce(PacketCreator.rpsMode((byte) 0x0A));
return true;
}
reward(c);
@@ -60,7 +60,7 @@ public class MapleRockPaperScissor{
if(round < 10){
win = false;
ableAnswer = true;
c.announce(MaplePacketCreator.rpsMode((byte) 0x0C));
c.announce(PacketCreator.rpsMode((byte) 0x0C));
return true;
} else {
round = 10;
@@ -79,6 +79,6 @@ public class MapleRockPaperScissor{
public final void dispose(final MapleClient c){
reward(c);
c.announce(MaplePacketCreator.rpsMode((byte) 0x0D));
c.announce(PacketCreator.rpsMode((byte) 0x0D));
}
}