Blocking a Cash Item isn't actually that hard, and it shouldn't be different either.
In CashOperationHandler like usual, you'll see this:
Code:
if (action == 0x03 || action == 0x1E) {
Below it you'll find:
Code:
if (cItem == null || !cItem.isOnSale() || cs.getCash(useNX) < cItem.getPrice()) {
return;
}
You can either add on to it one specific id or a few:
[code]if (cItem == null || !cItem.isOnSale() || cs.getCash(useNX) < cItem.getPrice() || cItem.getItemId() == XXXX || cItem.getItemId() == YYYY) {
return;
}/code]
Or, you can create a constant in like GameConstants with an integer array of blocked itemID's.
Code:
public static final int[] aBlockedCash = {1, 2, 3};//ItemID's here
and then under that if-statement, you would do:
Code:
for (int itemID : GameConstants.aBlockedCash) {
if (cItem.getItemId() == itemID) {
return;
}
}
As for reloadMap, I don't see why that should be much different either? In MapleMapFactory of Solaxia, add this function:
Code:
public MapleMap disposeMap(int mapId) {
if (isMapLoaded(mapId)) {
lock.lock(); //What the Concurrent.
try {
final MapleMap remove = maps.remove(mapId);
List<MapleCharacter> chrs = new ArrayList(remove.getCharacters());
final MapleMap newMap = getMap(mapId);
for (MapleCharacter chr : chrs) chr.changeMap(newMap, newMap.getPortal(remove.findClosestSpawnpoint(chr.getPosition()).getId()));
return newMap;
} finally {
lock.unlock();
}
}
return getMap(mapId);
}
Then in your reloadMap function, you should be using this:
Code:
public reloadMap(int mid) {
c.getChannelServer().getMapFactory().disposeMap(mid);
}
Just reading by what @kkong1001 replied. I think I had followed that years ago myself, but yeah you have to remove the map from MapleMapFactory's HashMap and then call getMap to reload the XML. That's why you call disposeMap from the factory, and you call that function from the NPC or even a GM Command.