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:
ronancpl
2017-09-15 21:32:15 -03:00
parent 6abbc2947e
commit 1ffcf47f79
133 changed files with 63565 additions and 60865 deletions

View File

@@ -196,7 +196,7 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
private boolean hidden, canDoor = true, Berserk, hasMerchant, whiteChat = false;
private int linkedLevel = 0;
private String linkedName = null;
private boolean finishedDojoTutorial, dojoParty;
private boolean finishedDojoTutorial;
private String name;
private String chalktext;
private String dataString;
@@ -245,7 +245,6 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
private EnumMap<MapleDisease, MapleDiseaseValueHolder> diseases = new EnumMap<>(MapleDisease.class);
private Map<Integer, MapleDoor> doors = new LinkedHashMap<>();
private ScheduledFuture<?> dragonBloodSchedule;
private ScheduledFuture<?>[] fullnessSchedule = new ScheduledFuture<?>[3];
private ScheduledFuture<?> hpDecreaseTask;
private ScheduledFuture<?> beholderHealingSchedule, beholderBuffSchedule, BerserkSchedule;
private ScheduledFuture<?> expiretask;
@@ -4082,8 +4081,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
statup.add(new Pair<>(MapleStat.LEVEL, level));
statup.add(new Pair<>(MapleStat.MAXHP, maxhp));
statup.add(new Pair<>(MapleStat.MAXMP, maxmp));
statup.add(new Pair<>(MapleStat.STR, str));
statup.add(new Pair<>(MapleStat.DEX, dex));
statup.add(new Pair<>(MapleStat.STR, Math.min(str, Short.MAX_VALUE)));
statup.add(new Pair<>(MapleStat.DEX, Math.min(dex, Short.MAX_VALUE)));
if (job.getId() % 1000 > 0) {
remainingSp[GameConstants.getSkillBook(job.getId())] += 3;
statup.add(new Pair<>(MapleStat.AVAILABLESP, remainingSp[GameConstants.getSkillBook(job.getId())]));

View File

@@ -812,7 +812,7 @@ public class MapleClient {
}
}
public final void disconnect(boolean shutdown, boolean cashshop) {//once per MapleClient instance
public final synchronized void disconnect(boolean shutdown, boolean cashshop) {//once per MapleClient instance
if (disconnecting) {
return;
}

View File

@@ -98,7 +98,6 @@ import client.inventory.Equip;
import client.inventory.MapleInventory;
import client.inventory.MapleInventoryType;
import client.inventory.MaplePet;
import constants.GameConstants;
import constants.ItemConstants;
import constants.ServerConstants;
import java.util.ArrayList;
@@ -1252,6 +1251,12 @@ public class Commands {
continue;
}
}
if(player.getJob().isA(MapleJob.ARAN1)) {
skill = SkillFactory.getSkill(5001005);
player.changeSkillLevel(skill, (byte) -1, -1, -1);
}
player.yellowMessage("Skills maxed out.");
break;
@@ -1659,7 +1664,7 @@ public class Commands {
case "givems":
if (sub.length < 3){
player.yellowMessage("Syntax: !givemx <playername> <gainmx>");
player.yellowMessage("Syntax: !givems <playername> <gainmx>");
break;
}
@@ -1783,7 +1788,7 @@ public class Commands {
player.getMap().getPortal(sub[1]).setPortalState(true);
break;
case "closeportals":
case "closeportal":
if (sub.length < 2){
player.yellowMessage("Syntax: !closeportal <portalid>");
break;
@@ -1844,10 +1849,11 @@ public class Commands {
for (MapleCharacter chr : ch.getPlayerStorage().getAllCharacters()) {
s += MapleCharacter.makeMapleReadable(chr.getName()) + ", ";
}
player.dropMessage(s.substring(0, s.length() - 2));
player.dropMessage(6, s.substring(0, s.length() - 2));
}
}
player.dropMessage("There are a total of " + total + " players online.");
player.dropMessage(6, "There are a total of " + total + " players online.");
player.showHint("Players online: #e#r" + total + "#k#n.");
break;
case "warpsnowball":
@@ -2273,14 +2279,14 @@ public class Commands {
break;
case "playernpc":
if (sub.length < 3){
if (sub.length < 3){
player.yellowMessage("Syntax: !playernpc <playername> <npcid>");
break;
}
player.playerNPC(c.getChannelServer().getPlayerStorage().getCharacterByName(sub[1]), Integer.parseInt(sub[2]));
player.playerNPC(c.getChannelServer().getPlayerStorage().getCharacterByName(sub[1]), Integer.parseInt(sub[2]));
break;
default:
default:
return false;
}

View File

@@ -287,7 +287,7 @@ public class Equip extends Item {
}
private int randomizeStatUpgrade(int top) {
int limit = Math.min(top, ServerConstants.MAX_EQUIPMNT_LVLUP_STAT_GAIN);
int limit = Math.min(top, ServerConstants.MAX_EQUIPMNT_LVLUP_STAT_UP);
int poolCount = (limit * (limit + 1) / 2) + limit;
int rnd = Randomizer.rand(0, poolCount);