Mob banish on touch + GMS-like cosmetics + Clear missing names
Fixed erroneous clean slate scroll block on equipments having certain properties. Implemented a log for bought cash items from Cash Shop. Implemented mob's player banish by touch (e. g. used by mobs from the Hypnotize quest). Thoroughly revised stylist/surgeon NPCs, adding several missing GMS-like cosmetic contents. Thoroughly revised String.wz names having missing item content throughout the WZ files. Revised missing name info for several faces throughout the WZ files. Solved a possible deadlock case related with a player vision's spawn object method. Fixed an issue with "Movement allowed only within account" items being given as "Untradeable" by NPCs. Happy Holidays and Great New Year everyone!!!
This commit is contained in:
@@ -110,7 +110,8 @@ public class MapleItemInformationProvider {
|
||||
protected Map<Integer, Boolean> pickupRestrictionCache = new HashMap<>();
|
||||
protected Map<Integer, Integer> getMesoCache = new HashMap<>();
|
||||
protected Map<Integer, Integer> monsterBookID = new HashMap<>();
|
||||
protected Map<Integer, Boolean> onEquipUntradableCache = new HashMap<>();
|
||||
protected Map<Integer, Boolean> untradeableCache = new HashMap<>();
|
||||
protected Map<Integer, Boolean> onEquipUntradeableCache = new HashMap<>();
|
||||
protected Map<Integer, scriptedItem> scriptedItemCache = new HashMap<>();
|
||||
protected Map<Integer, Boolean> karmaCache = new HashMap<>();
|
||||
protected Map<Integer, Integer> triggerItemCache = new HashMap<>();
|
||||
@@ -942,7 +943,7 @@ public class MapleItemInformationProvider {
|
||||
|
||||
public boolean canUseCleanSlate(Equip nEquip) {
|
||||
Map<String, Integer> eqstats = this.getEquipStats(nEquip.getItemId());
|
||||
return ServerConstants.USE_ENHANCED_CLNSLATE || nEquip.getLevel() + nEquip.getUpgradeSlots() < eqstats.get("tuc");
|
||||
return ServerConstants.USE_ENHANCED_CLNSLATE || nEquip.getUpgradeSlots() < eqstats.get("tuc"); // issue with clean slate found thanks to Masterrulax
|
||||
}
|
||||
|
||||
public Item scrollEquipWithId(Item equip, int scrollId, boolean usingWhiteScroll, int vegaItemId, boolean isGM) {
|
||||
@@ -1102,7 +1103,7 @@ public class MapleItemInformationProvider {
|
||||
nEquip.setMp((short) stat.getValue().intValue());
|
||||
} else if (stat.getKey().equals("tuc")) {
|
||||
nEquip.setUpgradeSlots((byte) stat.getValue().intValue());
|
||||
} else if (isDropRestricted(equipId)) {
|
||||
} else if (isUntradeableRestricted(equipId)) { // thanks Hyun & Thora for showing an issue with more than only "Untradeable" items being flagged as such here
|
||||
byte flag = nEquip.getFlag();
|
||||
flag |= ItemConstants.UNTRADEABLE;
|
||||
nEquip.setFlag(flag);
|
||||
@@ -1230,6 +1231,23 @@ public class MapleItemInformationProvider {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public boolean isUntradeableRestricted(int itemId) {
|
||||
if (untradeableCache.containsKey(itemId)) {
|
||||
return untradeableCache.get(itemId);
|
||||
}
|
||||
|
||||
boolean bRestricted = false;
|
||||
if(itemId != 0) {
|
||||
MapleData data = getItemData(itemId);
|
||||
if (data != null) {
|
||||
bRestricted = MapleDataTool.getIntConvert("info/tradeBlock", data, 0) == 1;
|
||||
}
|
||||
}
|
||||
|
||||
untradeableCache.put(itemId, bRestricted);
|
||||
return bRestricted;
|
||||
}
|
||||
|
||||
public boolean isLootRestricted(int itemId) {
|
||||
if (dropRestrictionCache.containsKey(itemId)) {
|
||||
return dropRestrictionCache.get(itemId);
|
||||
@@ -1421,12 +1439,12 @@ public class MapleItemInformationProvider {
|
||||
}
|
||||
|
||||
public boolean isUntradeableOnEquip(int itemId) {
|
||||
if (onEquipUntradableCache.containsKey(itemId)) {
|
||||
return onEquipUntradableCache.get(itemId);
|
||||
if (onEquipUntradeableCache.containsKey(itemId)) {
|
||||
return onEquipUntradeableCache.get(itemId);
|
||||
}
|
||||
boolean untradableOnEquip = MapleDataTool.getIntConvert("info/equipTradeBlock", getItemData(itemId), 0) > 0;
|
||||
onEquipUntradableCache.put(itemId, untradableOnEquip);
|
||||
return untradableOnEquip;
|
||||
boolean untradeableOnEquip = MapleDataTool.getIntConvert("info/equipTradeBlock", getItemData(itemId), 0) > 0;
|
||||
onEquipUntradeableCache.put(itemId, untradeableOnEquip);
|
||||
return untradeableOnEquip;
|
||||
}
|
||||
|
||||
public scriptedItem getScriptedItemInfo(int itemId) {
|
||||
|
||||
@@ -257,6 +257,8 @@ public class MapleStatEffect {
|
||||
addBuffStatPairToListIfNotZero(statups, MapleBuffStat.COUPON_DRP3, 1);
|
||||
break;
|
||||
}
|
||||
} else if(isExpIncrease(sourceid)) {
|
||||
addBuffStatPairToListIfNotZero(statups, MapleBuffStat.EXP_INCREASE, MapleDataTool.getInt("expinc", source, 0));
|
||||
}
|
||||
} else {
|
||||
if(isMapChair(sourceid)) {
|
||||
@@ -1366,6 +1368,10 @@ public class MapleStatEffect {
|
||||
return itemType == 5211 || itemType == 5360;
|
||||
}
|
||||
|
||||
public static boolean isExpIncrease(int sourceid) {
|
||||
return sourceid >= 2022450 && sourceid <= 2022452;
|
||||
}
|
||||
|
||||
private boolean isDs() {
|
||||
return skill && (sourceid == Rogue.DARK_SIGHT || sourceid == NightWalker.DARK_SIGHT);
|
||||
}
|
||||
|
||||
@@ -544,8 +544,13 @@ public class MapleMonster extends AbstractLoadedMapleLife {
|
||||
int partyExp = 0;
|
||||
if (attacker.getHp() > 0) {
|
||||
exp *= attacker.getExpRate();
|
||||
|
||||
Integer expBonus = attacker.getBuffedValue(MapleBuffStat.EXP_INCREASE);
|
||||
if (expBonus != null) { // exp increase buff found thanks to HighKey21
|
||||
exp += expBonus;
|
||||
}
|
||||
|
||||
int personalExp = (int) exp;
|
||||
|
||||
if (exp <= Integer.MAX_VALUE) { // assuming no negative xp here
|
||||
if (partyModifier > 0.0f) {
|
||||
partyExp = (int) (personalExp * partyModifier * ServerConstants.PARTY_BONUS_EXP_RATE);
|
||||
|
||||
@@ -384,6 +384,8 @@ public class MapleMap {
|
||||
}
|
||||
|
||||
private void spawnAndAddRangedMapObject(MapleMapObject mapobject, DelayedPacketCreation packetbakery, SpawnCondition condition) {
|
||||
List<MapleCharacter> inRangeCharacters = new LinkedList<>();
|
||||
|
||||
chrRLock.lock();
|
||||
objectWLock.lock();
|
||||
try {
|
||||
@@ -393,7 +395,7 @@ public class MapleMap {
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (condition == null || condition.canSpawn(chr)) {
|
||||
if (chr.getPosition().distanceSq(mapobject.getPosition()) <= getRangedDistance()) {
|
||||
packetbakery.sendPackets(chr.getClient());
|
||||
inRangeCharacters.add(chr);
|
||||
chr.addVisibleMapObject(mapobject);
|
||||
}
|
||||
}
|
||||
@@ -402,9 +404,15 @@ public class MapleMap {
|
||||
objectWLock.unlock();
|
||||
chrRLock.unlock();
|
||||
}
|
||||
|
||||
for (MapleCharacter chr : inRangeCharacters) {
|
||||
packetbakery.sendPackets(chr.getClient());
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnRangedMapObject(MapleMapObject mapobject, DelayedPacketCreation packetbakery, SpawnCondition condition) {
|
||||
List<MapleCharacter> inRangeCharacters = new LinkedList<>();
|
||||
|
||||
chrRLock.lock();
|
||||
try {
|
||||
int curOID = getUsableOID();
|
||||
@@ -412,7 +420,7 @@ public class MapleMap {
|
||||
for (MapleCharacter chr : characters) {
|
||||
if (condition == null || condition.canSpawn(chr)) {
|
||||
if (chr.getPosition().distanceSq(mapobject.getPosition()) <= getRangedDistance()) {
|
||||
packetbakery.sendPackets(chr.getClient());
|
||||
inRangeCharacters.add(chr);
|
||||
chr.addVisibleMapObject(mapobject);
|
||||
}
|
||||
}
|
||||
@@ -420,6 +428,10 @@ public class MapleMap {
|
||||
} finally {
|
||||
chrRLock.unlock();
|
||||
}
|
||||
|
||||
for (MapleCharacter chr : inRangeCharacters) {
|
||||
packetbakery.sendPackets(chr.getClient());
|
||||
}
|
||||
}
|
||||
|
||||
private int getUsableOID() {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class MapleMapFactory {
|
||||
}
|
||||
|
||||
String mapName = getMapName(mapid);
|
||||
MapleData mapData = source.getData(mapName);
|
||||
MapleData mapData = source.getData(mapName); // source.getData issue with giving nulls in rare ocasions found thanks to MedicOP
|
||||
MapleData infoData = mapData.getChildByPath("info");
|
||||
|
||||
String link = MapleDataTool.getString(infoData.getChildByPath("link"), "");
|
||||
|
||||
Reference in New Issue
Block a user