Remove "banishable town scroll" feature
This commit is contained in:
@@ -27,7 +27,6 @@ import client.Disease;
|
||||
import client.inventory.InventoryType;
|
||||
import client.inventory.Item;
|
||||
import client.inventory.manipulator.InventoryManipulator;
|
||||
import config.YamlConfig;
|
||||
import constants.id.ItemId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import net.AbstractPacketHandler;
|
||||
@@ -73,23 +72,8 @@ public final class UseItemHandler extends AbstractPacketHandler {
|
||||
remove(c, slot);
|
||||
return;
|
||||
} else if (ItemConstants.isTownScroll(itemId)) {
|
||||
int banMap = chr.getMapId();
|
||||
int banSp = chr.getMap().findClosestPlayerSpawnpoint(chr.getPosition()).getId();
|
||||
long banTime = currentServerTime();
|
||||
|
||||
if (ii.getItemEffect(toUse.getItemId()).applyTo(chr)) {
|
||||
if (YamlConfig.config.server.USE_BANISHABLE_TOWN_SCROLL) {
|
||||
chr.setBanishPlayerData(banMap, banSp, banTime);
|
||||
}
|
||||
|
||||
remove(c, slot);
|
||||
}
|
||||
return;
|
||||
} else if (ItemConstants.isAntibanishScroll(itemId)) {
|
||||
if (ii.getItemEffect(toUse.getItemId()).applyTo(chr)) {
|
||||
remove(c, slot);
|
||||
} else {
|
||||
chr.dropMessage(5, "You cannot recover from a banish state at the moment.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user