Autoassigner update + Multi-equip drop

Fixed spawn effect not working properly after the HT spawn sequence patch.
Fixed autoassigner not distributing AP properly for brawlers.
More than one of the same equipment can now be dropped by mobs. Feature uses the minimum/maximum quantity fields from the drop data to determine how many of the same will be dropped each instance.
This commit is contained in:
ronancpl
2018-03-27 16:56:23 -03:00
parent 8b8ce3ca24
commit cd16117553
29 changed files with 230 additions and 162 deletions

View File

@@ -1394,6 +1394,18 @@ public class MaplePacketCreator {
return spawnMonsterInternal(life, true, false, false, 0, true);
}
private static void encodeParentlessMobSpawnEffect(MaplePacketLittleEndianWriter mplew, boolean newSpawn, int effect) {
if (effect > 0) {
mplew.write(effect);
mplew.write(0);
mplew.writeShort(0);
if (effect == 15) {
mplew.write(0);
}
}
mplew.write(newSpawn ? -2 : -1);
}
/**
* Internal function to handler monster spawning and controlling.
*
@@ -1455,10 +1467,10 @@ public class MaplePacketCreator {
mplew.write(effect != 0 ? effect : -3);
mplew.writeInt(life.getParentMobOid());
} else {
mplew.write(newSpawn ? -2 : -1);
encodeParentlessMobSpawnEffect(mplew, newSpawn, effect);
}
} else {
mplew.write(newSpawn ? -2 : -1);
encodeParentlessMobSpawnEffect(mplew, newSpawn, effect);
}
mplew.write(life.getTeam());