Script clean-up Patch
Fixed bugs in some scripts, minor game patches.
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -59,6 +59,9 @@ public class EventInstanceManager {
|
||||
private long timeStarted = 0;
|
||||
private long eventTime = 0;
|
||||
private MapleExpedition expedition = null;
|
||||
private List<Integer> mapIds = new LinkedList<Integer>();
|
||||
private List<Boolean> isInstanced = new LinkedList<Boolean>();
|
||||
private boolean disposed = false;
|
||||
|
||||
public EventInstanceManager(EventManager em, String name) {
|
||||
this.em = em;
|
||||
@@ -322,4 +325,13 @@ public class EventInstanceManager {
|
||||
public boolean isLeader(MapleCharacter chr) {
|
||||
return (chr.getParty().getLeader().getId() == chr.getId());
|
||||
}
|
||||
|
||||
public final MapleMap setInstanceMap(final int mapid) { //gets instance map from the channelserv
|
||||
if (disposed) {
|
||||
return this.getMapFactory().getMap(mapid);
|
||||
}
|
||||
mapIds.add(mapid);
|
||||
isInstanced.add(false);
|
||||
return this.getMapFactory().getMap(mapid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user