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();
}
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();
}
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();
}
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();
}
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();
}
Aggregations