Reworked Autoassigner & Hero's Will & Trade + Visual NX + New commands
Reworked autoassigner (improved limits between required secondary and surplus primary stats). Hero's will removes most of diseases, tonic removes slow. Added visual info for collected NX cards. Added commands cake (cake boss with customizable HP) and setgmlevel. Reworked Trade system now checking for slots smartly (instead of just checking for empty slots).
This commit is contained in:
@@ -374,8 +374,11 @@ public final class Channel {
|
||||
mask ^= (1 << slot);
|
||||
|
||||
usedDojo &= mask;
|
||||
if(party != null) dojoParty.remove(party.hashCode());
|
||||
else if(dojoParty.containsValue(slot)) { // they left the dojo before completing it, no party there!
|
||||
if(party != null) {
|
||||
if(dojoParty.remove(party.hashCode()) != null) return;
|
||||
}
|
||||
|
||||
if(dojoParty.containsValue(slot)) { // strange case, no party there!
|
||||
Set<Entry<Integer, Integer>> es = Collections.unmodifiableSet(dojoParty.entrySet());
|
||||
|
||||
for(Entry<Integer, Integer> e: es) {
|
||||
@@ -411,6 +414,20 @@ public final class Channel {
|
||||
}
|
||||
}
|
||||
|
||||
public void freeDojoSectionIfEmpty(int dojoMapId) {
|
||||
final int slot = getDojoSlot(dojoMapId);
|
||||
final int delta = (dojoMapId) % 100;
|
||||
final int stage = (dojoMapId / 100) % 100;
|
||||
final int dojoBaseMap = (dojoMapId >= 925030000) ? 925030000 : 925020000;
|
||||
|
||||
for (int i = 0; i < 5; i++) { //only 32 stages, but 38 maps
|
||||
MapleMap dojoMap = getMapFactory().getMap(dojoBaseMap + (100 * (stage + i)) + delta);
|
||||
if(!dojoMap.getAllPlayers().isEmpty()) return;
|
||||
}
|
||||
|
||||
freeDojoSlot(slot, null);
|
||||
}
|
||||
|
||||
public void startDojoSchedule(final int dojoMapId) {
|
||||
final int slot = getDojoSlot(dojoMapId);
|
||||
final int stage = (dojoMapId / 100) % 100;
|
||||
|
||||
Reference in New Issue
Block a user