Zipangu overhaul + Quest take-item & Boss HP bar patch + 3rd job quiz

Added drop data on missing mobs and EXP gain on several quests around World Tour (Japan).
Added a bonus feature for the Showa expedition, accessible when there is no casualties at the time of completion.
Added missing shop data at the NPCs in Singapore.
Patched quests that should be taking some items but weren't doing that properly.
Patched some bosses with boss HP bar not having the "boss" label defined on Mob.wz, rendering some inconsistencies with the bar in-game.
Overhauled the 3rd job quiz mechanic, adding missed questions to the pool.
This commit is contained in:
ronancpl
2018-03-31 00:21:30 -03:00
parent cd16117553
commit 6da5edd837
54 changed files with 4599 additions and 161 deletions

View File

@@ -3364,13 +3364,31 @@ public class MaplePacketCreator {
return mplew.getPacket();
}
public static byte[] customShowBossHP(byte call, int oid, int currHP, int maxHP, byte tagColor, byte tagBgColor) {
private static Pair<Integer, Integer> normalizedCustomMaxHP(long currHP, long maxHP) {
int sendHP, sendMaxHP;
if(maxHP <= Integer.MAX_VALUE) {
sendHP = (int) currHP;
sendMaxHP = (int) maxHP;
} else {
float f = ((float) currHP) / maxHP;
sendHP = (int) (Integer.MAX_VALUE * f);
sendMaxHP = Integer.MAX_VALUE;
}
return new Pair<>(sendHP, sendMaxHP);
}
public static byte[] customShowBossHP(byte call, int oid, long currHP, long maxHP, byte tagColor, byte tagBgColor) {
Pair<Integer, Integer> customHP = normalizedCustomMaxHP(currHP, maxHP);
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.FIELD_EFFECT.getValue());
mplew.write(call);
mplew.writeInt(oid);
mplew.writeInt(currHP);
mplew.writeInt(maxHP);
mplew.writeInt(customHP.left);
mplew.writeInt(customHP.right);
mplew.write(tagColor);
mplew.write(tagBgColor);
return mplew.getPacket();