Search in sources :

Example 26 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 27 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 28 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 29 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 30 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Aggregations

MaplePacketLittleEndianWriter (tools.data.output.MaplePacketLittleEndianWriter)431 Point (java.awt.Point)44 MaplePlayerShopItem (server.maps.MaplePlayerShopItem)15 Item (client.inventory.Item)11 SpecialCashItem (server.CashShop.SpecialCashItem)11 MapleShopItem (server.MapleShopItem)11 MapleMapItem (server.maps.MapleMapItem)11 CashItem (server.CashShop.CashItem)10 MapleCharacter (client.MapleCharacter)8 MapleBuffStat (client.MapleBuffStat)4 MaplePet (client.inventory.MaplePet)3 MTSItemInfo (server.MTSItemInfo)3 MapleDisease (client.MapleDisease)2 SQLException (java.sql.SQLException)2 ArrayList (java.util.ArrayList)2 LinkedHashMap (java.util.LinkedHashMap)2 Channel (net.server.channel.Channel)2 MapleGuild (net.server.guild.MapleGuild)2 MapleMonster (server.life.MapleMonster)2 BuddylistEntry (client.BuddylistEntry)1