GuildPQ fix

Fixed some issues with GPQ startup crashing the leader when doing the
map transition.
This commit is contained in:
ronancpl
2017-09-22 23:26:46 -03:00
parent 8794cc8f31
commit 7bbf512797
39 changed files with 4961 additions and 4969 deletions

20
.gitignore vendored
View File

@@ -2,15 +2,15 @@
.idea/
# Netbeans project files
nbproject/
tools/MapleCouponInstaller/nbproject/
tools/MapleIdRetriever/nbproject/
tools/MobBookIndexer/nbproject/
tools/MobBookUpdate/nbproject/
/nbproject/
/tools/MapleCouponInstaller/nbproject/
/tools/MapleIdRetriever/nbproject/
/tools/MobBookIndexer/nbproject/
/tools/MobBookUpdate/nbproject/
# build files
build/
tools/MapleCouponInstaller/build/
tools/MapleIdRetriever/build/
tools/MobBookIndexer/build/
tools/MobBookUpdate/build/
/build/
/tools/MapleCouponInstaller/build/
/tools/MapleIdRetriever/build/
/tools/MobBookIndexer/build/
/tools/MobBookUpdate/build/

View File

@@ -37,13 +37,13 @@ Now install the Java 7 Development Kit:
* netbeans-8.0.2-javase-windows.exe -> It's a NetBeans project, use other IDE at your own risk.
Overwrite whenever prompted with the JAR files under "jce_policy-7/UnlimitedJCEPolicy" in these Java folders:
C:\Program Files\Java\jre7\lib
C:\Program Files\Java\jre7\lib\ext
C:\Program Files\Java\jre7\lib\security
C:\Program Files\Java\jdk1.7.0_01\lib
C:\Program Files\Java\jdk1.7.0_01\jre\lib
C:\Program Files\Java\jdk1.7.0_01\jre\lib\ext
C:\Program Files\Java\jdk1.7.0_01\jre\lib\security
* C:\Program Files\Java\jre7\lib
* C:\Program Files\Java\jre7\lib\ext
* C:\Program Files\Java\jre7\lib\security
* C:\Program Files\Java\jdk1.7.0_01\lib
* C:\Program Files\Java\jdk1.7.0_01\jre\lib
* C:\Program Files\Java\jdk1.7.0_01\jre\lib\ext
* C:\Program Files\Java\jdk1.7.0_01\jre\lib\security
Now that the tools have been installed, test if they are working.

View File

@@ -1,4 +1,4 @@
#Fri, 22 Sep 2017 18:20:17 -0300
#Fri, 22 Sep 2017 22:54:29 -0300
C\:\\Nexon\\MapleSolaxia\\MapleSolaxiaV2=

BIN
dist/MapleSolaxia.jar vendored

Binary file not shown.

View File

@@ -544,4 +544,5 @@ Refatorado sistema de schedules para skill cooldowns e buff expiretimes.
Completamente reestruturado sistema de buffs. Nova flag permite permanência de buffs mais fortes mesmo que novos buffs surjam.
22 Setembro 2017,
Adicionado buffs para GPQ.
Adicionado buffs para GPQ.
Consertado GPQ não iniciando devido a problemas com o script de evento.

View File

@@ -2,6 +2,14 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="1"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
<group>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/GuildQuest.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/9040000.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventInstanceManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/client/MapleCharacter.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/src/scripting/event/EventManager.java</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/npc/1052013.js</file>
<file>file:/C:/Nexon/MapleSolaxia/MapleSolaxiaV2/scripts/event/AmoriaPQ.js</file>
</group>
</open-files>
</project-private>

View File

@@ -60,6 +60,8 @@ function setEventRequirements() {
if(maxLevel - minLevel >= 1) reqStr += minLevel + " ~ " + maxLevel;
else reqStr += minLevel;
reqStr += "\r\n All members of the same guild";
reqStr += "\r\n Time limit: ";
reqStr += eventTime + " minutes";
@@ -178,11 +180,6 @@ function afterSetup(eim) {
if(leader != null) {
eim.setProperty("guild", "" + leader.getGuildId());
}
if(isTeamAllJobs(eim)) {
var rnd = Math.floor(Math.random() * 4);
eim.applyEventPlayersItemBuff(2023000 + rnd);
}
}
function respawnStages(eim) {}
@@ -190,9 +187,6 @@ function respawnStages(eim) {}
function playerEntry(eim, player) {
var map = eim.getMapInstance(entryMap);
player.changeMap(map, map.getPortal(0));
var texttt = "So, here is the brief. You guys should be warned that, once out on the fortress outskirts, anyone that would not be equipping the #b#t1032033##k will die instantly due to the deteriorated state of the air around there. That being said, once your team move out to the next stage, make sure to #bhit the glowing rocks#k in that region and #bequip the dropped item#k before advancing stages. That will protect you thoroughly from the air sickness. Good luck!";
player.getClient().getSession().write(Packages.tools.MaplePacketCreator.getNPCTalk(9040000, /*(byte)*/ 0, texttt, "00 00", /*(byte)*/ 0));
}
function scheduledTimeout(eim) {
@@ -206,6 +200,11 @@ function scheduledTimeout(eim) {
end(eim);
} else {
eim.startEventTimer(eventTime * 60000);
//if(isTeamAllJobs(eim)) {
var rnd = Math.floor(Math.random() * 4);
eim.applyEventPlayersItemBuff(2023000 + rnd);
//}
}
} else {
end(eim);
@@ -236,6 +235,13 @@ function changedMap(eim, player, mapid) {
}
}
function afterChangedMap(eim, player, mapid) {
if (mapid == 990000100) {
var texttt = "So, here is the brief. You guys should be warned that, once out on the fortress outskirts, anyone that would not be equipping the #b#t1032033##k will die instantly due to the deteriorated state of the air around there. That being said, once your team moves out to the next stage, make sure to #bhit the glowing rocks#k in that region and #bequip the dropped item#k before advancing stages. That will protect you thoroughly from the air sickness. Good luck!";
player.getClient().getSession().write(Packages.tools.MaplePacketCreator.getNPCTalk(9040000, /*(byte)*/ 0, texttt, "00 00", /*(byte)*/ 0));
}
}
function changedLeader(eim, leader) {}
function playerDead(eim, player) {

View File

@@ -53,7 +53,7 @@ function action(mode, type, selection) {
sel = selection;
if (selection == 0) {
if(!cm.isGuildLeader()) {
cm.sendOk("Your guild master/jr.master must talk to me to register this guild quest.");
cm.sendOk("Your guild master/jr.master must talk to me to register the guild for the guild quest.");
cm.dispose();
} else {
if(em.isQueueFull()) {
@@ -98,7 +98,7 @@ function action(mode, type, selection) {
if (sel == 0) {
var entry = em.addGuildToQueue(cm.getPlayer().getGuildId(), cm.getPlayer().getId());
if(entry > 0) {
cm.sendOk("Your guild has been registered successfully. A message will pop on your chat keeping your guild aware about the registration status.\r\n\r\nNow, #rimportant#k: as the leader of this instance, #ryou must already be present on this channel#k the right moment your guild is called for the strategy time. #bThe missubmission of this action will void#k your guild registration as a whole, and the next guild will be called immediately. Must be noted also, that if you become absent from the end of the strategy time to any point on the duration of the instance, it will render the instance interrupted, and your guild will be moved out instantly, moving again the queue.");
cm.sendOk("Your guild has been registered successfully. A message will pop on your chat keeping your guild aware about the registration status.\r\n\r\nNow, #rimportant#k: as the leader of this instance, #ryou must already be present on this channel#k the right moment your guild is called for the strategy time. #bThe missubmission of this action will void#k your guild registration as a whole, and the next guild will be called immediately. Must be noted also that if you, leader of this instance, become absent from the end of the strategy time to any point on the duration of the instance, it will render the mission interrupted, and your guild will be moved out instantly, moving again the queue.");
} else if(entry == 0) {
cm.sendOk("The queue on this channel is already full. Please be patient and try again after a while, or try on another channel.");
} else {

View File

@@ -1063,6 +1063,10 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
if (getEventInstance() != null) getEventInstance().changedMap(this, map);
}
private void eventAfterChangedMap(int map) {
if (getEventInstance() != null) getEventInstance().afterChangedMap(this, map);
}
public boolean canRecoverLastBanish() {
return System.currentTimeMillis() - this.banishTime < 5 * 60 * 1000;
}
@@ -1159,6 +1163,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
canWarpCounter--;
if(canWarpCounter == 0) canWarpMap = true;
eventAfterChangedMap(this.getMapId());
}
public void changeMap(final MapleMap target, final Point pos) {
@@ -1171,6 +1177,8 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
canWarpCounter--;
if(canWarpCounter == 0) canWarpMap = true;
eventAfterChangedMap(this.getMapId());
}
private boolean buffMapProtection() {
@@ -2966,9 +2974,12 @@ public class MapleCharacter extends AbstractAnimatedMapleMapObject {
try {
Map<MapleBuffStat, MapleBuffStatValueHolder> stats = new LinkedHashMap<>();
Map<MapleBuffStat, MapleBuffStatValueHolder> buffList = buffEffects.remove(effect.getBuffSourceId());
for (Entry<MapleBuffStat, MapleBuffStatValueHolder> stateffect : buffList.entrySet()) {
stats.put(stateffect.getKey(), stateffect.getValue());
buffEffectsCount.put(stateffect.getKey(), (byte)(buffEffectsCount.get(stateffect.getKey()) - 1));
if(buffList != null) {
for (Entry<MapleBuffStat, MapleBuffStatValueHolder> stateffect : buffList.entrySet()) {
stats.put(stateffect.getKey(), stateffect.getValue());
buffEffectsCount.put(stateffect.getKey(), (byte)(buffEffectsCount.get(stateffect.getKey()) - 1));
}
}
return stats;

View File

@@ -421,6 +421,12 @@ public class EventInstanceManager {
} catch (ScriptException | NoSuchMethodException ex) {}
}
public void afterChangedMap(MapleCharacter chr, int mapId) { // optional
try {
em.getIv().invokeFunction("afterChangedMap", this, chr, mapId);
} catch (ScriptException | NoSuchMethodException ex) {}
}
public void changedLeader(MapleCharacter ldr) {
try {
em.getIv().invokeFunction("changedLeader", this, ldr);

View File

@@ -526,7 +526,7 @@ public class EventManager {
+ " and HAS JUST STARTED THE STRATEGY PHASE. After 3 minutes, no more guild members will be allowed to join the effort."
+ " Check out Shuang at the excavation site in Perion for more info.";
mg.dropMessage(0, callout);
mg.dropMessage(6, callout);
}
private void exportMovedQueueToGuild(Integer guildId, int place) {
@@ -534,7 +534,7 @@ public class EventManager {
String callout = "[Guild Quest] Your guild has been registered to attend to the Sharenian Guild Quest at channel " + this.getChannelServer().getId()
+ " and is currently on the " + ordinal(place) + " place on the waiting queue.";
mg.dropMessage(0, callout);
mg.dropMessage(6, callout);
}
private List<Integer> getNextGuildQueue() {

File diff suppressed because it is too large Load Diff