use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method summonSkill.
public static byte[] summonSkill(int cid, int summonSkillId, int newStance) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SUMMON_SKILL.getValue());
mplew.writeInt(cid);
mplew.writeInt(summonSkillId);
mplew.write(newStance);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method leftKnockBack.
public static byte[] leftKnockBack() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(2);
mplew.writeShort(SendOpcode.LEFT_KNOCK_BACK.getValue());
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method guildEmblemChange.
public static byte[] guildEmblemChange(int gid, short bg, byte bgcolor, short logo, byte logocolor) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.GUILD_OPERATION.getValue());
mplew.write(0x42);
mplew.writeInt(gid);
mplew.writeShort(bg);
mplew.write(bgcolor);
mplew.writeShort(logo);
mplew.write(logocolor);
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method updateAllianceInfo.
public static byte[] updateAllianceInfo(MapleAlliance alliance, MapleClient c) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.ALLIANCE_OPERATION.getValue());
mplew.write(0x0F);
mplew.writeInt(alliance.getId());
mplew.writeMapleAsciiString(alliance.getName());
for (int i = 1; i <= 5; i++) {
mplew.writeMapleAsciiString(alliance.getRankTitle(i));
}
mplew.write(alliance.getGuilds().size());
for (Integer guild : alliance.getGuilds()) {
mplew.writeInt(guild);
}
// probably capacity
mplew.writeInt(alliance.getCapacity());
mplew.writeShort(0);
for (Integer guildd : alliance.getGuilds()) {
getGuildInfo(mplew, Server.getInstance().getGuild(guildd, c.getWorld()));
}
return mplew.getPacket();
}
use of tools.data.output.MaplePacketLittleEndianWriter in project HeavenMS by ronancpl.
the class MaplePacketCreator method getAfterLoginError.
/**
* Gets a login failed packet.
*
* Possible values for <code>reason</code>:<br> 2: ID deleted or blocked<br>
* 3: ID deleted or blocked<br> 4: Incorrect password<br> 5: Not a
* registered id<br> 6: Trouble logging into the game?<br> 7: Already logged
* in<br> 8: Trouble logging into the game?<br> 9: Trouble logging into the
* game?<br> 10: Cannot process so many connections<br> 11: Only users older
* than 20 can use this channel<br> 12: Trouble logging into the game?<br>
* 13: Unable to log on as master at this ip<br> 14: Wrong gateway or
* personal info and weird korean button<br> 15: Processing request with
* that korean button!<br> 16: Please verify your account through
* email...<br> 17: Wrong gateway or personal info<br> 21: Please verify
* your account through email...<br> 23: Crashes<br> 25: Maple Europe notice
* =[ FUCK YOU NEXON<br> 27: Some weird full client notice, probably for
* trial versions<br>
*
* @param reason The reason logging in failed.
* @return The login failed packet.
*/
public static byte[] getAfterLoginError(int reason) {
// same as above o.o
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(8);
mplew.writeShort(SendOpcode.SELECT_CHARACTER_BY_VAC.getValue());
// using other types then stated above = CRASH
mplew.writeShort(reason);
return mplew.getPacket();
}
Aggregations