Improved lamp xp calculation

Improved shop restrictions
Fixed bugged Cyclops room teleport
This commit is contained in:
Ceikry 2023-05-31 08:58:40 +00:00 committed by Ryan
parent 9150137c47
commit cb4c94f3ab
3 changed files with 4 additions and 4 deletions

View file

@ -48,7 +48,7 @@ public final class LampPlugin extends OptionHandler {
} else {
if(player.getInventory().remove((Item) player.getAttribute("lamp"))) {
if (lamp == Lamps.GENIE_LAMP) {
player.getSkills().addExperience(skill, player.getSkills().getLevel(skill) * 10);
player.getSkills().addExperience(skill, player.getSkills().getStaticLevel(skill) * 10);
} else {
player.getSkills().addExperience(skill, lamp.getExp());
}

View file

@ -102,13 +102,13 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
@Override
public boolean leave(Entity e, boolean logout) {
if (e instanceof Player && PLAYERS.contains(e)) {
if (e instanceof Player) {
leave((Player) e);
PLAYERS.remove(e);
if (logout) {
e.setLocation(Location.create(2846, 3540, 2));
}
clearLogoutListener((Player) e, "cyclopes");
clearLogoutListener((Player) e, "cyclopes");
}
return super.leave(e, logout);
}

View file

@ -272,7 +272,7 @@ class Shop(val title: String, val stock: Array<ShopItem>, val general: Boolean =
return TransactionStatus.Failure("Shop item out of stock.")
}
if(isMainStock && inStock.amount > stock[slot].amount && !getServerConfig().getBoolean(Shops.personalizedShops, false) && player.ironmanManager.isIronman)
if(isMainStock && inStock.amount > stock[slot].amount && (!getServerConfig().getBoolean(Shops.personalizedShops, false) || forceShared) && player.ironmanManager.isIronman)
{
sendDialogue(player, "As an ironman, you cannot buy overstocked items from shops.")
return TransactionStatus.Failure("Ironman overstock purchase")