Script clean-up Patch

Fixed bugs in some scripts, minor game patches.
This commit is contained in:
ronancpl
2016-08-01 11:17:31 -03:00
parent 63d0e87d4d
commit ab6074a40c
10 changed files with 255 additions and 49 deletions

View File

@@ -304,6 +304,11 @@ public class AbstractPlayerInteraction {
return gainItem(id, quantity, randomStats, showMessage, expires, null);
}
private boolean isAccessory(int id) {
int val = id / 10000;
return(val >= 111 && val <= 113);
}
public Item gainItem(int id, short quantity, boolean randomStats, boolean showMessage, long expires, MaplePet from) {
Item item = null;
MaplePet evolved = null;
@@ -336,6 +341,11 @@ public class AbstractPlayerInteraction {
if (ii.getInventoryType(id).equals(MapleInventoryType.EQUIP)) {
item = ii.getEquipById(id);
if(item != null) {
Equip it = (Equip)item;
if(isAccessory(item.getItemId()) && it.getUpgradeSlots() <= 0) it.setUpgradeSlots(3);
}
if(ServerConstants.USE_ENHANCED_CRAFTING == true && c.getPlayer().getCS() == true)
item = MapleItemInformationProvider.getInstance().scrollEquipWithId(item, 2049100, true, c.getPlayer().isGM());
} else {