"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:
@@ -23,6 +23,7 @@ package server.maps;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.inventory.Item;
|
||||
import constants.ServerConstants;
|
||||
import java.awt.Point;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import tools.MaplePacketCreator;
|
||||
@@ -35,7 +36,7 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
protected MapleMapObject dropper;
|
||||
protected int character_ownerid, party_ownerid, meso, questid = -1;
|
||||
protected byte type;
|
||||
protected boolean pickedUp = false, playerDrop;
|
||||
protected boolean pickedUp = false, playerDrop, partyDrop;
|
||||
protected long dropTime;
|
||||
private Lock itemLock = MonitoredReentrantLockFactory.createLock(MonitoredLockType.MAP_ITEM);
|
||||
|
||||
@@ -45,6 +46,7 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
this.dropper = dropper;
|
||||
this.character_ownerid = owner.getId();
|
||||
this.party_ownerid = owner.getPartyId();
|
||||
this.partyDrop = this.party_ownerid != -1;
|
||||
this.ownerClient = owner.getClient();
|
||||
this.meso = 0;
|
||||
this.type = type;
|
||||
@@ -57,6 +59,7 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
this.dropper = dropper;
|
||||
this.character_ownerid = owner.getId();
|
||||
this.party_ownerid = owner.getPartyId();
|
||||
this.partyDrop = this.party_ownerid != -1;
|
||||
this.ownerClient = owner.getClient();
|
||||
this.meso = 0;
|
||||
this.type = type;
|
||||
@@ -70,6 +73,7 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
this.dropper = dropper;
|
||||
this.character_ownerid = owner.getId();
|
||||
this.party_ownerid = owner.getPartyId();
|
||||
this.partyDrop = this.party_ownerid != -1;
|
||||
this.ownerClient = owner.getClient();
|
||||
this.meso = meso;
|
||||
this.type = type;
|
||||
@@ -105,6 +109,20 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
party_ownerid = partyid;
|
||||
}
|
||||
|
||||
public final int getClientsideOwnerId(MapleCharacter player) {
|
||||
if (this.party_ownerid == -1) {
|
||||
return this.character_ownerid;
|
||||
} else {
|
||||
if (!partyDrop && player.getId() == this.character_ownerid) {
|
||||
return player.getId();
|
||||
} else if (player.getPartyId() == this.party_ownerid) {
|
||||
return player.getId();
|
||||
} else {
|
||||
return this.party_ownerid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean isFFADrop() {
|
||||
return type == 2 || type == 3 || hasExpiredOwnershipTime();
|
||||
}
|
||||
@@ -187,7 +205,7 @@ public class MapleMapItem extends AbstractMapleMapObject {
|
||||
if (chr.needQuestItem(questid, getItemId())) {
|
||||
this.lockItem();
|
||||
try {
|
||||
client.announce(MaplePacketCreator.dropItemFromMapObject(chr.getParty() != null, this, null, getPosition(), (byte) 2));
|
||||
client.announce(MaplePacketCreator.dropItemFromMapObject(chr, this, null, getPosition(), (byte) 2));
|
||||
} finally {
|
||||
this.unlockItem();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user