Search in sources :

Example 56 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method showOwnRecovery.

public static byte[] showOwnRecovery(byte heal) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
    mplew.write(0x0A);
    mplew.write(heal);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 57 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method newGuildMember.

public static byte[] newGuildMember(MapleGuildCharacter mgc) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
    mplew.write(0x27);
    mplew.writeInt(mgc.getGuildId());
    mplew.writeInt(mgc.getId());
    mplew.writeAsciiString(getRightPaddedStr(mgc.getName(), '\0', 13));
    mplew.writeInt(mgc.getJobId());
    mplew.writeInt(mgc.getLevel());
    // should be always 5 but whatevs
    mplew.writeInt(mgc.getGuildRank());
    // should always be 1 too
    mplew.writeInt(mgc.isOnline() ? 1 : 0);
    // ? could be guild signature, but doesn't seem to matter
    mplew.writeInt(1);
    mplew.writeInt(3);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 58 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method notYetSoldInv.

public static byte[] notYetSoldInv(List<MTSItemInfo> items) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.MTS_OPERATION.getValue());
    mplew.write(0x23);
    mplew.writeInt(items.size());
    if (!items.isEmpty()) {
        for (MTSItemInfo item : items) {
            addItemInfo(mplew, item.getItem(), true);
            // id
            mplew.writeInt(item.getID());
            // this + below = price
            mplew.writeInt(item.getTaxes());
            // price
            mplew.writeInt(item.getPrice());
            mplew.writeInt(0);
            mplew.writeLong(getTime(item.getEndingDate()));
            // account name (what was nexon thinking?)
            mplew.writeMapleAsciiString(item.getSeller());
            // char name
            mplew.writeMapleAsciiString(item.getSeller());
            for (int i = 0; i < 28; i++) {
                mplew.write(0);
            }
        }
    } else {
        mplew.writeInt(0);
    }
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter) MTSItemInfo(server.MTSItemInfo) Point(java.awt.Point)

Example 59 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method cancelDebuff.

public static byte[] cancelDebuff(long mask) {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(19);
    mplew.writeShort(SendOpcode.CANCEL_BUFF.getValue());
    mplew.writeLong(0);
    mplew.writeLong(mask);
    mplew.write(0);
    return mplew.getPacket();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 60 with MaplePacketLittleEndianWriter

use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.

the class MaplePacketCreator method removeMapEffect.

public static byte[] removeMapEffect() {
    final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
    mplew.writeShort(SendOpcode.BLOW_WEATHER.getValue());
    mplew.write(0);
    mplew.writeInt(0);
    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