use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMiniGameMoveOmok.
public static byte[] getMiniGameMoveOmok(MapleMiniGame game, int move1, int move2, int move3) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(12);
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.MOVE_OMOK.getCode());
mplew.writeInt(move1);
mplew.writeInt(move2);
mplew.write(move3);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method crogBoatPacket.
public static byte[] crogBoatPacket(boolean type) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CONTI_MOVE.getValue());
mplew.write(10);
mplew.write(type ? 4 : 5);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showGiftSucceed.
public static byte[] showGiftSucceed(String to, CashItem item) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CASHSHOP_OPERATION.getValue());
// 0x5D, Couldn't be sent
mplew.write(0x5E);
mplew.writeMapleAsciiString(to);
mplew.writeInt(item.getItemId());
mplew.writeShort(item.getCount());
mplew.writeInt(item.getPrice());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMatchCardSelect.
public static byte[] getMatchCardSelect(MapleMiniGame game, int turn, int slot, int firstslot, int type) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(6);
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.SELECT_CARD.getCode());
mplew.write(turn);
if (turn == 1) {
mplew.write(slot);
} else if (turn == 0) {
mplew.write(slot);
mplew.write(firstslot);
mplew.write(type);
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method removeMessengerPlayer.
public static byte[] removeMessengerPlayer(int position) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MESSENGER.getValue());
mplew.write(0x02);
mplew.write(position);
return mplew.getPacket();
}
Aggregations