use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method magicAttack.
public static byte[] magicAttack(MapleCharacter chr, int skill, int skilllevel, int stance, int numAttackedAndDamage, Map<Integer, List<Integer>> damage, int charge, int speed, int direction, int display) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MAGIC_ATTACK.getValue());
addAttackBody(mplew, chr, skill, skilllevel, stance, numAttackedAndDamage, 0, damage, speed, direction, display);
if (charge != -1) {
mplew.writeInt(charge);
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method memberLeft.
// someone leaving, mode == 0x2c for leaving, 0x2f for expelled
public static byte[] memberLeft(MapleGuildCharacter mgc, boolean bExpelled) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(bExpelled ? 0x2f : 0x2c);
mplew.writeInt(mgc.getGuildId());
mplew.writeInt(mgc.getId());
mplew.writeMapleAsciiString(mgc.getName());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getFredrick.
public static byte[] getFredrick(byte op) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.FREDRICK.getValue());
mplew.write(op);
switch(op) {
case 0x24:
mplew.skip(8);
break;
default:
mplew.write(0);
break;
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showBoughtCashPackage.
public static byte[] showBoughtCashPackage(List<Item> cashPackage, int accountId) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CASHSHOP_OPERATION.getValue());
mplew.write(0x89);
mplew.write(cashPackage.size());
for (Item item : cashPackage) {
addCashItemInformation(mplew, item, accountId);
}
mplew.writeShort(0);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getTradePartnerAdd.
public static byte[] getTradePartnerAdd(MapleCharacter c) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.PLAYER_INTERACTION.getValue());
mplew.write(PlayerInteractionHandler.Action.VISIT.getCode());
mplew.write(1);
addCharLook(mplew, c, false);
mplew.writeMapleAsciiString(c.getName());
return mplew.getPacket();
}
Aggregations