Login Purification + Optimized currenttime calls + Standardized WZ

Repelled ultimately the game-breaking issue that was introduced recently on the revamp of the login phase.
Optimized the getcurrenttime calls to the OS. Made most of the handler calls fetch directly from the Server object instead, the Server itself delegated with periodically updating the current time value. The result is an slightly delayed currenttime, backed with realtime value update within minutes.
Protected concurrently inventory sort handlers. Expected no more NullPointers from the sorting feature.
Added a server flag to limit cash items being sold on player shops/hired merchants.
Stabilized the MapleTV mechanics, and activities properly split by world.
Normalized Character.wz: equipments supposed to have the "cash" property now implements it.
Normalized String.wz: every item that doesn't have a "name" property now implements it.
Normalized the XMLs that lost indentation on the last source update.
New tool: MapleInvalidItemWithNoNameFetcher. Fetches and reports itemids throughout the XMLs that doesn't contain the "name" property and equipments that lacks "cash" property.

Frolic Omniknight references aside, if you have run into any more issues regarding the new login system, please open an issue and show the steps you've done to reach the problem.
This commit is contained in:
ronancpl
2018-07-18 13:00:53 -03:00
parent ad812de001
commit f439c158e2
252 changed files with 93423 additions and 1459 deletions

View File

@@ -201,22 +201,20 @@ public final class PlayerInteractionHandler extends AbstractMaplePacketHandler {
chr.getClient().announce(MaplePacketCreator.getMiniRoomError(6));
return;
}
if (itemId > 5030000 && itemId < 5030012 || itemId > 5140000 && itemId < 5140006) {
if (createType == 4) {
MaplePlayerShop shop = new MaplePlayerShop(chr, desc);
chr.setPlayerShop(shop);
chr.getMap().addMapObject(shop);
shop.sendShop(c);
c.getWorldServer().registerPlayerShop(shop);
//c.announce(MaplePacketCreator.getPlayerShopRemoveVisitor(1));
} else {
MapleHiredMerchant merchant = new MapleHiredMerchant(chr, itemId, desc);
chr.setHiredMerchant(merchant);
c.getWorldServer().registerHiredMerchant(merchant);
chr.getClient().getChannelServer().addHiredMerchant(chr.getId(), merchant);
chr.announce(MaplePacketCreator.getHiredMerchant(chr, merchant, true));
}
if (ItemConstants.isPlayerShop(itemId)) {
MaplePlayerShop shop = new MaplePlayerShop(chr, desc);
chr.setPlayerShop(shop);
chr.getMap().addMapObject(shop);
shop.sendShop(c);
c.getWorldServer().registerPlayerShop(shop);
//c.announce(MaplePacketCreator.getPlayerShopRemoveVisitor(1));
} else if (ItemConstants.isHiredMerchant(itemId)) {
MapleHiredMerchant merchant = new MapleHiredMerchant(chr, itemId, desc);
chr.setHiredMerchant(merchant);
c.getWorldServer().registerHiredMerchant(merchant);
chr.getClient().getChannelServer().addHiredMerchant(chr.getId(), merchant);
chr.announce(MaplePacketCreator.getHiredMerchant(chr, merchant, true));
}
}
} else if (mode == Action.INVITE.getCode()) {
@@ -473,12 +471,18 @@ public final class PlayerInteractionHandler extends AbstractMaplePacketHandler {
FilePrinter.printError(FilePrinter.EXPLOITS + chr.getName() + ".txt", chr.getName() + " might of possibly packet edited Hired Merchants\nperBundle: " + perBundle + "\nperBundle * bundles (This multiplied cannot be greater than 2000): " + perBundle * bundles + "\nbundles: " + bundles + "\nprice: " + price);
return;
}
Item sellItem = ivItem.copy();
if (ServerConstants.USE_ENFORCE_UNMERCHABLE_PET && ItemConstants.isPet(ivItem.getItemId())) {
c.announce(MaplePacketCreator.serverNotice(1, "Pets are not allowed to be sold on the Player Shop."));
if(ServerConstants.USE_ENFORCE_UNMERCHABLE_CASH && MapleItemInformationProvider.getInstance().isCash(ivItem.getItemId())) {
c.announce(MaplePacketCreator.serverNotice(1, "Cash items are not allowed to be sold on the Player Store."));
return;
}
if (ServerConstants.USE_ENFORCE_UNMERCHABLE_PET && ItemConstants.isPet(ivItem.getItemId())) {
c.announce(MaplePacketCreator.serverNotice(1, "Pets are not allowed to be sold on the Player Store."));
return;
}
Item sellItem = ivItem.copy();
if(!ItemConstants.isRechargeable(ivItem.getItemId())) {
sellItem.setQuantity(perBundle);
}