Hello ragezone,
I'm in the process of rewriting some of mooples handlers and noticed some stuff about them that I'd rather ask about. Generally speaking, wether I can always ban when something in the packet is off, or if that can also happen due to other reasons.
For example, in a buy action (cashshopoperation, shop, or even the storage) I've noticed that they simply return when currency < itemprice.
From my understanding, sending the packet should not be possible in the first place if a player doesn't have enough meso/cash. I'm in general for banning for everything (before the hacker causes harm in some other way), so in this case, can I just assume someone packet edited and ban immediatly? Or can this also happen due to lag or some other error?
The same goes for item == null checks, for example:
As CashShopFactory only returns null if the snCS is not in my servers commidity.img.xml, can I be safe to ban players if cItem == null?Code:CashItem cItem = CashShopFactory.getInstance().getItem(snCS); if (cItem == null || !cItem.isOnSale() || cs.getCash(useNX) < cItem.getPrice()) { c.announce(MaplePacketCreator.enableActions()); return; }
Thanks for any advice!



Reply With Quote


