AmoriaPQ + ItemSort fix + revamped GMShop
Implemented AmoriaPQ. Fixed an issue with ItemIdSortHandler where empty vectors given to the sorting module would cause an exception thrown, wiping players inventory items. Thanks to Vcoc, revamped shop data for GMShop (shop id 1337). Mount quest for explorers now uses event script.
This commit is contained in:
@@ -560,13 +560,15 @@ public class MapleItemInformationProvider {
|
||||
}
|
||||
|
||||
public Item scrollEquipWithId(Item equip, int scrollId, boolean usingWhiteScroll, int vegaItemId, boolean isGM) {
|
||||
boolean assertGM = (isGM && ServerConstants.USE_PERFECT_GM_SCROLL);
|
||||
|
||||
if (equip instanceof Equip) {
|
||||
Equip nEquip = (Equip) equip;
|
||||
|
||||
Map<String, Integer> stats = this.getEquipStats(scrollId);
|
||||
Map<String, Integer> eqstats = this.getEquipStats(equip.getItemId());
|
||||
|
||||
if (((nEquip.getUpgradeSlots() > 0 || ItemConstants.isCleanSlate(scrollId))) || isGM) {
|
||||
if (((nEquip.getUpgradeSlots() > 0 || ItemConstants.isCleanSlate(scrollId))) || assertGM) {
|
||||
double prop = (double)stats.get("success");
|
||||
if (vegaItemId == 5610000) {
|
||||
prop = 30.0;
|
||||
@@ -574,7 +576,7 @@ public class MapleItemInformationProvider {
|
||||
prop = 90.0;
|
||||
}
|
||||
|
||||
if(isGM || rollSuccessChance(prop)) {
|
||||
if(assertGM || rollSuccessChance(prop)) {
|
||||
short flag = nEquip.getFlag();
|
||||
switch (scrollId) {
|
||||
case 2040727:
|
||||
@@ -900,7 +902,7 @@ public class MapleItemInformationProvider {
|
||||
break;
|
||||
}
|
||||
if (!ItemConstants.isCleanSlate(scrollId)) {
|
||||
if (ServerConstants.USE_PERFECT_SCROLLING == true && !isGM && !usingWhiteScroll) {
|
||||
if (ServerConstants.USE_PERFECT_SCROLLING == true && !assertGM && !usingWhiteScroll) {
|
||||
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
|
||||
}
|
||||
nEquip.setLevel((byte) (nEquip.getLevel() + 1));
|
||||
@@ -908,13 +910,13 @@ public class MapleItemInformationProvider {
|
||||
}
|
||||
|
||||
if (ServerConstants.USE_PERFECT_SCROLLING == false && !ItemConstants.isCleanSlate(scrollId)) {
|
||||
if (!isGM && !usingWhiteScroll) {
|
||||
if (!assertGM && !usingWhiteScroll) {
|
||||
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
|
||||
}
|
||||
//nEquip.setLevel((byte) (nEquip.getLevel() + 1));
|
||||
}
|
||||
} else {
|
||||
if (!usingWhiteScroll && !ItemConstants.isCleanSlate(scrollId) && !isGM) {
|
||||
if (!usingWhiteScroll && !ItemConstants.isCleanSlate(scrollId) && !assertGM) {
|
||||
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
|
||||
}
|
||||
if (Randomizer.nextInt(101) < stats.get("cursed")) {
|
||||
|
||||
@@ -1386,7 +1386,7 @@ public class MapleMap {
|
||||
final ScheduledFuture<?> monsterItemDrop = TimerManager.getInstance().register(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (MapleMap.this.getMonsterById(m.getId()) != null && !MapleMap.this.getPlayers().isEmpty()) {
|
||||
if (m.isAlive() && !MapleMap.this.getPlayers().isEmpty()) {
|
||||
if (item.getItemId() == 4001101) {
|
||||
MapleMap.this.riceCakes++;
|
||||
MapleMap.this.broadcastMessage(MaplePacketCreator.serverNotice(6, "The Moon Bunny made rice cake number " + (MapleMap.this.riceCakes)));
|
||||
@@ -1395,7 +1395,7 @@ public class MapleMap {
|
||||
}
|
||||
}
|
||||
}, delay, delay);
|
||||
if (getMonsterById(m.getId()) == null) {
|
||||
if (!m.isAlive()) {
|
||||
monsterItemDrop.cancel(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user