use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method updateBuddyChannel.
public static byte[] updateBuddyChannel(int characterid, int channel) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.BUDDYLIST.getValue());
mplew.write(0x14);
mplew.writeInt(characterid);
mplew.write(0);
mplew.writeInt(channel);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method spawnGuide.
public static byte[] spawnGuide(boolean spawn) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(3);
mplew.writeShort(SendOpcode.SPAWN_GUIDE.getValue());
if (spawn) {
mplew.write(1);
} else {
mplew.write(0);
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getMacros.
public static byte[] getMacros(SkillMacro[] macros) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.MACRO_SYS_DATA_INIT.getValue());
int count = 0;
for (int i = 0; i < 5; i++) {
if (macros[i] != null) {
count++;
}
}
mplew.write(count);
for (int i = 0; i < 5; i++) {
SkillMacro macro = macros[i];
if (macro != null) {
mplew.writeMapleAsciiString(macro.getName());
mplew.write(macro.getShout());
mplew.writeInt(macro.getSkill1());
mplew.writeInt(macro.getSkill2());
mplew.writeInt(macro.getSkill3());
}
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method petChat.
public static byte[] petChat(int cid, byte index, int act, String text) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.PET_CHAT.getValue());
mplew.writeInt(cid);
mplew.write(index);
mplew.write(0);
mplew.write(act);
mplew.writeMapleAsciiString(text);
mplew.write(0);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method showBuffeffect.
public static byte[] showBuffeffect(int cid, int skillid, int effectid, byte direction) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SHOW_FOREIGN_EFFECT.getValue());
mplew.writeInt(cid);
// buff level
mplew.write(effectid);
mplew.writeInt(skillid);
mplew.write(direction);
mplew.write(1);
mplew.writeLong(0);
return mplew.getPacket();
}
Aggregations