Meso patch + Swift Dmg Reflect buff + GPQ Rewards + Starting Q. items
Fixed several RNG pool issues within several handler classes. Fixed an overflow issue with mesos, that would cause players to lose all amount on inventory. Changed the code coupon SQL structure. Now nxcode_items.quantity is to be specified for both nx values and item quantities alike, instead of the use of "quantity" only when items are being provided. Bob Snail now appears each 4 hours, instead of any time. Removed duplicate command Warpto. Warpto merged with Reach command. Fixed solo expeditions being disposed for "lack of personnel" after changing maps (normal limitations should not apply when USE_ENABLE_SOLO_EXPEDITIONS is enabled). Fixed mobskills "Weapon/Magic Reflect" taking too long to show the active status over the mob's head. Fixed a case with clean slate scroll not working as expected. Improved reward contents for the GPQ. Fixed loot manager not acting properly when verifying one-of-a-kind contents. Implemented quest item requirement checkups to start quests. Items required to start a quest now should appear if the player did not start it yet, e.g.: SOS letter. Fixed an issue with server message/boss HPbar switch interaction that would not work the moment after a player changed channels/entered Cash Shop. Improved Victoria Island worldmap design, at the Kerning subway area.
This commit is contained in:
@@ -1001,7 +1001,7 @@ public class MapleItemInformationProvider {
|
||||
if (!ServerConstants.USE_PERFECT_SCROLLING && !usingWhiteScroll && !ItemConstants.isCleanSlate(scrollId) && !assertGM) {
|
||||
nEquip.setUpgradeSlots((byte) (nEquip.getUpgradeSlots() - 1));
|
||||
}
|
||||
if (Randomizer.nextInt(101) < stats.get("cursed")) {
|
||||
if (Randomizer.nextInt(100) < stats.get("cursed")) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1258,8 +1258,15 @@ public class MapleItemInformationProvider {
|
||||
if (pickupRestrictionCache.containsKey(itemId)) {
|
||||
return pickupRestrictionCache.get(itemId);
|
||||
}
|
||||
MapleData data = getItemData(itemId);
|
||||
boolean bRestricted = MapleDataTool.getIntConvert("info/only", data, 0) == 1;
|
||||
|
||||
boolean bRestricted = false;
|
||||
if(itemId != 0) {
|
||||
MapleData data = getItemData(itemId);
|
||||
if (data != null) {
|
||||
bRestricted = MapleDataTool.getIntConvert("info/only", data, 0) == 1;
|
||||
}
|
||||
}
|
||||
|
||||
pickupRestrictionCache.put(itemId, bRestricted);
|
||||
return bRestricted;
|
||||
}
|
||||
|
||||
@@ -1303,7 +1303,8 @@ public class MapleMonster extends AbstractLoadedMapleLife {
|
||||
}
|
||||
|
||||
int useLimit = toUse.getLimit();
|
||||
if (toUse.getSkillId() == 200) {
|
||||
int useSkillid = toUse.getSkillId();
|
||||
if (useSkillid == 200) {
|
||||
int i = 0;
|
||||
for (MapleMapObject mo : getMap().getMapObjects()) {
|
||||
if (mo.getType() == MapleMapObjectType.MONSTER) {
|
||||
@@ -1316,12 +1317,16 @@ public class MapleMonster extends AbstractLoadedMapleLife {
|
||||
if (map.isDojoMap()) { // spawns in dojo should be unlimited
|
||||
useLimit = 0;
|
||||
}
|
||||
} else if (useSkillid >= 143 && useSkillid <= 145) {
|
||||
if (this.isBuffed(MonsterStatus.WEAPON_REFLECT) || this.isBuffed(MonsterStatus.MAGIC_REFLECT)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (useLimit > 0) {
|
||||
monsterLock.lock();
|
||||
try {
|
||||
Integer times = this.skillsUsed.get(new Pair<>(toUse.getSkillId(), toUse.getSkillLevel()));
|
||||
Integer times = this.skillsUsed.get(new Pair<>(useSkillid, toUse.getSkillLevel()));
|
||||
if (times != null && times >= useLimit) {
|
||||
return false;
|
||||
}
|
||||
@@ -1334,7 +1339,7 @@ public class MapleMonster extends AbstractLoadedMapleLife {
|
||||
try {
|
||||
/*
|
||||
for (Pair<Integer, Integer> skill : usedSkills) {
|
||||
if (skill.getLeft() == toUse.getSkillId() && skill.getRight() == toUse.getSkillLevel()) {
|
||||
if (skill.getLeft() == useSkillid && skill.getRight() == toUse.getSkillLevel()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,20 +214,20 @@ public class MobSkill {
|
||||
}
|
||||
break;
|
||||
case 143: // Weapon Reflect
|
||||
stats.put(MonsterStatus.WEAPON_REFLECT, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.WEAPON_IMMUNITY, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.WEAPON_REFLECT, 10);
|
||||
stats.put(MonsterStatus.WEAPON_IMMUNITY, 10);
|
||||
reflection.add(x);
|
||||
break;
|
||||
case 144: // Magic Reflect
|
||||
stats.put(MonsterStatus.MAGIC_REFLECT, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.MAGIC_IMMUNITY, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.MAGIC_REFLECT, 10);
|
||||
stats.put(MonsterStatus.MAGIC_IMMUNITY, 10);
|
||||
reflection.add(x);
|
||||
break;
|
||||
case 145: // Weapon / Magic reflect
|
||||
stats.put(MonsterStatus.WEAPON_REFLECT, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.WEAPON_IMMUNITY, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.MAGIC_REFLECT, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.MAGIC_IMMUNITY, Integer.valueOf(x));
|
||||
stats.put(MonsterStatus.WEAPON_REFLECT, 10);
|
||||
stats.put(MonsterStatus.WEAPON_IMMUNITY, 10);
|
||||
stats.put(MonsterStatus.MAGIC_REFLECT, 10);
|
||||
stats.put(MonsterStatus.MAGIC_IMMUNITY, 10);
|
||||
reflection.add(x);
|
||||
break;
|
||||
case 154: // accuracy up
|
||||
|
||||
@@ -35,15 +35,28 @@ import server.quest.MapleQuest;
|
||||
public class MapleLootManager {
|
||||
|
||||
private static boolean isRelevantDrop(MonsterDropEntry dropEntry, List<MapleCharacter> partyMembers, List<MapleLootInventory> partyInv) {
|
||||
int qStartAmount = 0, qCompleteAmount = 0;
|
||||
MapleQuest quest = MapleQuest.getInstance(dropEntry.questid);
|
||||
int qItemAmount = quest != null ? quest.getItemAmountNeeded(dropEntry.itemId) : 0;
|
||||
if (quest != null) {
|
||||
qStartAmount = quest.getStartItemAmountNeeded(dropEntry.itemId);
|
||||
qCompleteAmount = quest.getCompleteItemAmountNeeded(dropEntry.itemId);
|
||||
}
|
||||
|
||||
boolean restricted = MapleItemInformationProvider.getInstance().isLootRestricted(dropEntry.itemId);
|
||||
boolean restricted = MapleItemInformationProvider.getInstance().isPickupRestricted(dropEntry.itemId);
|
||||
for (int i = 0; i < partyMembers.size(); i++) {
|
||||
MapleLootInventory chrInv = partyInv.get(i);
|
||||
|
||||
if (dropEntry.questid > 0) {
|
||||
if (partyMembers.get(i).getQuestStatus(dropEntry.questid) != 1) {
|
||||
int qItemAmount, chrQuestStatus = partyMembers.get(i).getQuestStatus(dropEntry.questid);
|
||||
if (chrQuestStatus == 0) {
|
||||
qItemAmount = qStartAmount;
|
||||
} else if (chrQuestStatus != 1) {
|
||||
continue;
|
||||
} else {
|
||||
qItemAmount = qCompleteAmount;
|
||||
}
|
||||
|
||||
if (qItemAmount <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -371,7 +371,16 @@ public class MapleQuest {
|
||||
return relevantMobs;
|
||||
}
|
||||
|
||||
public int getItemAmountNeeded(int itemid) {
|
||||
public int getStartItemAmountNeeded(int itemid) {
|
||||
MapleQuestRequirement req = startReqs.get(MapleQuestRequirementType.ITEM);
|
||||
if(req == null)
|
||||
return 0;
|
||||
|
||||
ItemRequirement ireq = (ItemRequirement) req;
|
||||
return ireq.getItemAmountNeeded(itemid);
|
||||
}
|
||||
|
||||
public int getCompleteItemAmountNeeded(int itemid) {
|
||||
MapleQuestRequirement req = completeReqs.get(MapleQuestRequirementType.ITEM);
|
||||
if(req == null)
|
||||
return 0;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class ItemRequirement extends MapleQuestRequirement {
|
||||
}
|
||||
|
||||
public int getItemAmountNeeded(int itemid) {
|
||||
if(items.containsKey(itemid)) {
|
||||
if(items.containsKey(itemid)) {
|
||||
return items.get(itemid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user