Skip to content

Commit

Permalink
Fix using cash items; fix Vicious Hammer packets
Browse files Browse the repository at this point in the history
  • Loading branch information
Hendi48 committed Nov 26, 2021
1 parent ff68459 commit 871836b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/net/server/channel/handlers/UseCashItemHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c)
}
player.setLastUsedCashItem(System.currentTimeMillis());
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
slea.readInt(); // tRequestTime
slea.readShort();
int itemId = slea.readInt();
int itemType = itemId / 10000;
Expand Down
12 changes: 6 additions & 6 deletions src/tools/MaplePacketCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -5097,7 +5097,7 @@ public static byte[] removeNPC(int oid) { //Make npc's invisible
public static byte[] sendHammerData(int hammerUsed) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.VICIOUS_HAMMER.getValue());
mplew.write(0x39);
mplew.write(0x3E); // ItemUpgradeSuccess
mplew.writeInt(0);
mplew.writeInt(hammerUsed);
return mplew.getPacket();
Expand All @@ -5106,7 +5106,7 @@ public static byte[] sendHammerData(int hammerUsed) {
public static byte[] sendHammerMessage() {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.VICIOUS_HAMMER.getValue());
mplew.write(0x3D);
mplew.write(0x42); // ItemUpgradeDone
mplew.writeInt(0);
return mplew.getPacket();
}
Expand All @@ -5116,7 +5116,7 @@ public static byte[] playPortalSound() {
}

public static byte[] showMonsterBookPickup() {
return showSpecialEffect(14);
return showSpecialEffect(13); // no-op in EMS
}

public static byte[] showEquipmentLevelUp() {
Expand All @@ -5129,8 +5129,8 @@ public static byte[] showItemLevelup() {

/**
* 6 = Exp did not drop (Safety Charms) 7 = Enter portal sound 8 = Job
* change 9 = Quest complete 10 = Recovery 14 = Monster book pickup 15 =
* Equipment levelup 16 = Maker Skill Success 19 = Exp card [500, 200, 50]
* change 9 = Quest complete 10 = Recovery 14 = LotteryUse 15 =
* Equipment levelup 16 = Maker Skill Success 17 = Exp card [500, 200, 50]
*
* @param effect
* @return
Expand Down Expand Up @@ -5170,7 +5170,7 @@ public static byte[] showRecovery(int cid, byte amount) {
public static byte[] showWheelsLeft(int left) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.SHOW_ITEM_GAIN_INCHAT.getValue());
mplew.write(0x15);
mplew.write(0x13);
mplew.write(left);
return mplew.getPacket();
}
Expand Down

0 comments on commit 871836b

Please sign in to comment.