"Exp-party" Pi + Event script disabled on dispose + Personal loot fix
Refactored event scripts, no longer triggering after the event is deemed disposed. Added MCPQ access in Dimensional Doors. Revised Crusader/Dawn Warrior's Combo Attack, no longer resetting orbs after recasting during active time. Added 4th job advancement handing out Maple Warrior skill book. Fixed several issues with not being able to collect drops within owned exclusivity time when back-and-forth changing maps. Revised visual EXP gain. Players that participated most in the defeat of the mob has the gain displayed in white, else yellow, somewhat similar to GMS. Fixed client not disconnecting properly after closing the game inside MTS/Cash Shop, leading to no update on account's login state. Fixed wrongly inputted PIC in anti-multiclient system blocking accounts to login under the same IP. Fixed parameterless command inputs counting as "one empty command".
This commit is contained in:
@@ -2992,8 +2992,7 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
|
||||
int equip = (int) Math.min((long)(gain / 10) * pendantExp, Integer.MAX_VALUE);
|
||||
|
||||
long total = (long) gain + equip + party;
|
||||
gainExpInternal(total, equip, party, show, inChat, white);
|
||||
gainExpInternal((long) gain, equip, party, show, inChat, white);
|
||||
}
|
||||
|
||||
public void loseExp(int loss, boolean show, boolean inChat) {
|
||||
@@ -3004,8 +3003,23 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
gainExpInternal(-loss, 0, 0, show, inChat, white);
|
||||
}
|
||||
|
||||
private void announceExpGain(long gain, int equip, int party, boolean inChat, boolean white) {
|
||||
gain = Math.min(gain, Integer.MAX_VALUE);
|
||||
if (gain == 0) {
|
||||
if (party == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
gain = party;
|
||||
party = 0;
|
||||
white = false;
|
||||
}
|
||||
|
||||
client.announce(MaplePacketCreator.getShowExpGain((int) gain, equip, party, inChat, white));
|
||||
}
|
||||
|
||||
private synchronized void gainExpInternal(long gain, int equip, int party, boolean show, boolean inChat, boolean white) { // need of method synchonization here detected thanks to MedicOP
|
||||
long total = Math.max(gain, -exp.get());
|
||||
long total = Math.max(gain + equip + party, -exp.get());
|
||||
|
||||
if (level < getMaxLevel() && (allowExpGain || this.getEventInstance() != null)) {
|
||||
long leftover = 0;
|
||||
@@ -3016,8 +3030,8 @@ public class MapleCharacter extends AbstractMapleCharacterObject {
|
||||
leftover = nextExp - Integer.MAX_VALUE;
|
||||
}
|
||||
updateSingleStat(MapleStat.EXP, exp.addAndGet((int) total));
|
||||
if (show && gain != 0) {
|
||||
client.announce(MaplePacketCreator.getShowExpGain((int)Math.min(gain, Integer.MAX_VALUE), equip, party, inChat, white));
|
||||
if (show) {
|
||||
announceExpGain(gain, equip, party, inChat, white);
|
||||
}
|
||||
while (exp.get() >= ExpTable.getExpNeededForLevel(level)) {
|
||||
levelUp(true);
|
||||
|
||||
Reference in New Issue
Block a user