Toggle the NX coupon loot notice

Added a toggle to the showHint that announces the NX gain on a NX coupon loot
This commit is contained in:
Matthew Hinds
2022-10-13 21:23:49 +13:00
parent c1fbf2c18c
commit dd260e7b2a
2 changed files with 7 additions and 2 deletions

View File

@@ -1966,7 +1966,9 @@ public class Character extends AbstractCharacterObject {
int nxGain = mapitem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250;
this.getCashShop().gainCash(1, nxGain);
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
if (YamlConfig.config.server.USE_NX_COUPON_LOOT_NOTICE) {
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
}
this.getMap().pickItemDrop(pickupPacket, mapitem);
} else if (InventoryManipulator.addFromDrop(client, mItem, true)) {
@@ -2016,7 +2018,9 @@ public class Character extends AbstractCharacterObject {
int nxGain = mapitem.getItemId() == ItemId.NX_CARD_100 ? 100 : 250;
this.getCashShop().gainCash(1, nxGain);
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
if (YamlConfig.config.server.USE_NX_COUPON_LOOT_NOTICE) {
showHint("You have earned #e#b" + nxGain + " NX#k#n. (" + this.getCashShop().getCash(1) + " NX)", 300);
}
} else if (applyConsumeOnPickup(mItem.getItemId())) {
} else if (InventoryManipulator.addFromDrop(client, mItem, true)) {
if (mItem.getItemId() == ItemId.ARPQ_SPIRIT_JEWEL) {

View File

@@ -122,6 +122,7 @@ public class ServerConfig {
//Announcement Configuration
public boolean USE_ANNOUNCE_SHOPITEMSOLD;
public boolean USE_ANNOUNCE_CHANGEJOB;
public boolean USE_NX_COUPON_LOOT_NOTICE;
//Cash Shop Configuration
public boolean USE_JOINT_CASHSHOP_INVENTORY;