Search in sources :

Example 71 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 72 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 73 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter)

Example 74 with MaplePacketLittleEndianWriter

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();
}
Also used : MaplePacketLittleEndianWriter(tools.data.output.MaplePacketLittleEndianWriter) Point(java.awt.Point)

Example 75 with MaplePacketLittleEndianWriter

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