Implemented CWKPQ

Made CWKPQ fully-functional, using the Expedition system (won't work
with the lobby system).
This commit is contained in:
ronancpl
2017-06-30 01:26:47 -03:00
parent a7beff1bb4
commit ca3838050d
126 changed files with 50072 additions and 49743 deletions

View File

@@ -332,7 +332,16 @@ public class EventInstanceManager {
public void registerExpedition(MapleExpedition exped) {
expedition = exped;
registerPlayer(exped.getLeader());
registerExpeditionTeam(exped, exped.getRecruitingMap().getId());
}
private void registerExpeditionTeam(MapleExpedition exped, int recruitMap) {
expedition = exped;
for(MapleCharacter chr: exped.getMembers()) {
if(chr.getMapId() == recruitMap)
registerPlayer(chr);
}
}
public void unregisterPlayer(MapleCharacter chr) {
@@ -516,7 +525,10 @@ public class EventInstanceManager {
killCount.clear();
if (expedition != null) {
expedition.dispose(true);
em.getChannelServer().getExpeditions().remove(expedition);
expedition = null;
}
if(!eventCleared) em.disposeInstance(name);
em = null;