The great MCPQ Merge offensive

Fulfilled the lovely pull request #427 from @dragoso, which added in backing code content to HeavenMS.
Implemented structural changes for the Marriage wishlist, in order to receive, maintain and distribute gifts to spouses.
Added untradeable check on wishlist gift handler.
Adjusted CPQ drops to actually load from DB rathe than hard-coded.
Fixed CPQ "random disease to player/party" functionality not applying properly.
Adjusted how CPQ maps are generated. It directly loads a new area from WZ (this process should at least removes the player's spawned mobs) rather than reset the cache at every MCPQ creation.
This commit is contained in:
ronancpl
2019-03-15 12:08:21 -03:00
parent 1383efd6c3
commit 3bdf8cb2be
52 changed files with 2258 additions and 678 deletions

View File

@@ -45,7 +45,8 @@ public enum ItemFactory {
CASH_CYGNUS(4, true),
CASH_ARAN(5, true),
MERCHANT(6, false),
CASH_OVERALL(7, true);
CASH_OVERALL(7, true),
MARRIAGE_GIFTS(8, false);
private final int value;
private final boolean account;
private static final Lock locks[] = new Lock[200]; // thanks Masterrulax for pointing out a bottleneck issue here

View File

@@ -436,7 +436,16 @@ public class MapleInventory implements Iterable<Item> {
}
public static boolean checkSpot(MapleCharacter chr, Item item) { // thanks Vcoc for noticing pshops not checking item stacks when taking item back
return checkSpotsAndOwnership(chr, Collections.singletonList(new Pair<>(item, item.getInventoryType())));
return checkSpot(chr, Collections.singletonList(item));
}
public static boolean checkSpot(MapleCharacter chr, List<Item> items) {
List<Pair<Item, MapleInventoryType>> listItems = new LinkedList<>();
for (Item item : items) {
listItems.add(new Pair<>(item, item.getInventoryType()));
}
return checkSpotsAndOwnership(chr, listItems);
}
public static boolean checkSpots(MapleCharacter chr, List<Pair<Item, MapleInventoryType>> items) {