Remove "Maple" prefix from MaplePacketCreator name
This commit is contained in:
@@ -24,7 +24,7 @@ package server.maps;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import net.server.Server;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.PacketCreator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -107,21 +107,21 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
|
||||
MapleCharacter owner = this.getOwner();
|
||||
if (GameType == MiniGameType.OMOK) {
|
||||
owner.announce(MaplePacketCreator.getMiniGameNewVisitor(this, challenger, 1));
|
||||
owner.getMap().broadcastMessage(MaplePacketCreator.addOmokBox(owner, 2, 0));
|
||||
owner.announce(PacketCreator.getMiniGameNewVisitor(this, challenger, 1));
|
||||
owner.getMap().broadcastMessage(PacketCreator.addOmokBox(owner, 2, 0));
|
||||
} else if (GameType == MiniGameType.MATCH_CARD) {
|
||||
owner.announce(MaplePacketCreator.getMatchCardNewVisitor(this, challenger, 1));
|
||||
owner.getMap().broadcastMessage(MaplePacketCreator.addMatchCardBox(owner, 2, 0));
|
||||
owner.announce(PacketCreator.getMatchCardNewVisitor(this, challenger, 1));
|
||||
owner.getMap().broadcastMessage(PacketCreator.addMatchCardBox(owner, 2, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public void closeRoom(boolean forceClose) {
|
||||
owner.getMap().broadcastMessage(MaplePacketCreator.removeMinigameBox(owner));
|
||||
owner.getMap().broadcastMessage(PacketCreator.removeMinigameBox(owner));
|
||||
|
||||
if (forceClose) {
|
||||
this.broadcastToOwner(MaplePacketCreator.getMiniGameClose(false, 4));
|
||||
this.broadcastToOwner(PacketCreator.getMiniGameClose(false, 4));
|
||||
}
|
||||
this.broadcastToVisitor(MaplePacketCreator.getMiniGameClose(true, 3));
|
||||
this.broadcastToVisitor(PacketCreator.getMiniGameClose(true, 3));
|
||||
|
||||
if (visitor != null) {
|
||||
visitor.setMiniGame(null);
|
||||
@@ -135,17 +135,17 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
public void removeVisitor(boolean forceClose, MapleCharacter challenger) {
|
||||
if (visitor == challenger) {
|
||||
if (forceClose) {
|
||||
visitor.announce(MaplePacketCreator.getMiniGameClose(true, 4));
|
||||
visitor.announce(PacketCreator.getMiniGameClose(true, 4));
|
||||
}
|
||||
|
||||
challenger.setMiniGame(null);
|
||||
visitor = null;
|
||||
|
||||
this.getOwner().getClient().announce(MaplePacketCreator.getMiniGameRemoveVisitor());
|
||||
this.getOwner().getClient().announce(PacketCreator.getMiniGameRemoveVisitor());
|
||||
if (GameType == MiniGameType.OMOK) {
|
||||
this.getOwner().getMap().broadcastMessage(MaplePacketCreator.addOmokBox(owner, 1, 0));
|
||||
this.getOwner().getMap().broadcastMessage(PacketCreator.addOmokBox(owner, 1, 0));
|
||||
} else if (GameType == MiniGameType.MATCH_CARD) {
|
||||
this.getOwner().getMap().broadcastMessage(MaplePacketCreator.addMatchCardBox(owner, 1, 0));
|
||||
this.getOwner().getMap().broadcastMessage(PacketCreator.addMatchCardBox(owner, 1, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
}
|
||||
|
||||
private void updateMiniGameBox() {
|
||||
this.getOwner().getMap().broadcastMessage(MaplePacketCreator.addOmokBox(owner, visitor != null ? 2 : 1, inprogress));
|
||||
this.getOwner().getMap().broadcastMessage(PacketCreator.addOmokBox(owner, visitor != null ? 2 : 1, inprogress));
|
||||
}
|
||||
|
||||
private synchronized boolean minigameMatchFinish() {
|
||||
@@ -241,7 +241,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
visitorscore += (15 * (forfeit ? -1 : 1));
|
||||
if (forfeit) visitorforfeits++;
|
||||
|
||||
this.broadcast(MaplePacketCreator.getMiniGameOwnerWin(this, forfeit));
|
||||
this.broadcast(PacketCreator.getMiniGameOwnerWin(this, forfeit));
|
||||
|
||||
minigameMatchFinished();
|
||||
}
|
||||
@@ -255,7 +255,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
ownerscore += (15 * (forfeit ? -1 : 1));
|
||||
if (forfeit) ownerforfeits++;
|
||||
|
||||
this.broadcast(MaplePacketCreator.getMiniGameVisitorWin(this, forfeit));
|
||||
this.broadcast(PacketCreator.getMiniGameVisitorWin(this, forfeit));
|
||||
|
||||
minigameMatchFinished();
|
||||
}
|
||||
@@ -273,7 +273,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
nextavailabletie = timeNow + 5 * 60 * 1000;
|
||||
}
|
||||
|
||||
this.broadcast(MaplePacketCreator.getMiniGameTie(this));
|
||||
this.broadcast(PacketCreator.getMiniGameTie(this));
|
||||
|
||||
minigameMatchFinished();
|
||||
}
|
||||
@@ -390,15 +390,15 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
}
|
||||
|
||||
public void chat(MapleClient c, String chat) {
|
||||
broadcast(MaplePacketCreator.getPlayerShopChat(c.getPlayer(), chat, isOwner(c.getPlayer())));
|
||||
broadcast(PacketCreator.getPlayerShopChat(c.getPlayer(), chat, isOwner(c.getPlayer())));
|
||||
}
|
||||
|
||||
public void sendOmok(MapleClient c, int type) {
|
||||
c.announce(MaplePacketCreator.getMiniGame(c, this, isOwner(c.getPlayer()), type));
|
||||
c.announce(PacketCreator.getMiniGame(c, this, isOwner(c.getPlayer()), type));
|
||||
}
|
||||
|
||||
public void sendMatchCard(MapleClient c, int type) {
|
||||
c.announce(MaplePacketCreator.getMatchCard(c, this, isOwner(c.getPlayer()), type));
|
||||
c.announce(PacketCreator.getMatchCard(c, this, isOwner(c.getPlayer()), type));
|
||||
}
|
||||
|
||||
public MapleCharacter getOwner() {
|
||||
@@ -413,7 +413,7 @@ public class MapleMiniGame extends AbstractMapleMapObject {
|
||||
int slot = move2 * 15 + move1 + 1;
|
||||
if (piece[slot] == 0) {
|
||||
piece[slot] = type;
|
||||
this.broadcast(MaplePacketCreator.getMiniGameMoveOmok(this, move1, move2, type));
|
||||
this.broadcast(PacketCreator.getMiniGameMoveOmok(this, move1, move2, type));
|
||||
for (int y = 0; y < 15; y++) {
|
||||
for (int x = 0; x < 11; x++) {
|
||||
if (searchCombo(x, y, type)) {
|
||||
|
||||
Reference in New Issue
Block a user