Mystic Doors review + Togglable SrvMessage-BossHP + Map-Event patch

Reviewed Mystic Doors.
Fixed several issues showing up on Duey in uncommon scenarios.
Fixed a concurrency issue with XMLDomMapleData.
Scheduled forward the "lock disposal" action within the source. Now, it's expected that, after a set while, no method should require usage of a disposed lock and, during that while, a supposed "disposed lock" is still available to run (although no new processes is expected to require use of these locks).
Fixed concurrency issues with player's current event instance, generating several inconsistencies when swiftly registering/unregistering from events.
Implemented a mutually exclusive approach for server message - Boss HPbar.
Fixed item-making Kage requiring lv71~80 ETC instead of the expected 81~90.
Removed the possibility to buy cosmetic coupons with mesos through the NPCs.
Sleepywood JQ's no longer gives cash items when they finish the quest repeatedly.
Added Duey trucks in several maps lacking it. Added NPC Duey in New Leaf City.
Fixed scripted quests not calculating QUEST_RATE (if applied) when rewarding experience and meso.
This commit is contained in:
ronancpl
2018-08-07 23:37:24 -03:00
parent cc541f39d5
commit 4c25c07e28
173 changed files with 38064 additions and 37254 deletions

View File

@@ -628,7 +628,7 @@ public class MaplePacketCreator {
public static byte[] getAfterLoginError(int reason) {//same as above o.o
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(8);
mplew.writeShort(SendOpcode.SELECT_CHARACTER_BY_VAC.getValue());
mplew.writeShort(reason);//using other types then stated above = CRASH
mplew.writeShort(reason);//using other types than stated above = CRASH
return mplew.getPacket();
}
@@ -677,6 +677,8 @@ public class MaplePacketCreator {
* @return the successful authentication packet
*/
public static byte[] getAuthSuccess(MapleClient c) {
Server.getInstance().loadAccountCharacters(c); // locks the login session until data is recovered from the cache or the DB.
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.LOGIN_STATUS.getValue());
mplew.writeInt(0);
@@ -686,7 +688,7 @@ public class MaplePacketCreator {
boolean canFly = Server.getInstance().canFly(c.getAccID());
mplew.writeBool((ServerConstants.USE_ENFORCE_ADMIN_ACCOUNT || canFly) ? c.getGMLevel() > 1 : false); // thanks Steve(kaito1410) for pointing the GM account boolean here
mplew.write((c.getGMLevel() > 1 && canFly) ? 0x80 : 0); // Admin Byte. 0x80,0x40,0x20.. Rubbish.
mplew.write(((ServerConstants.USE_ENFORCE_ADMIN_ACCOUNT || canFly) && c.getGMLevel() > 1) ? 0x80 : 0); // Admin Byte. 0x80,0x40,0x20.. Rubbish.
mplew.write(0); // Country Code.
mplew.writeMapleAsciiString(c.getAccountName());
@@ -3689,27 +3691,23 @@ public class MaplePacketCreator {
return mplew.getPacket();
}
public static byte[] partyCreated(MaplePartyCharacter partychar, int partyId) {
public static byte[] partyCreated(MapleParty party, int partycharid) {
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.PARTY_OPERATION.getValue());
mplew.write(8);
mplew.writeInt(partyId);
if (partychar.getDoors().size() > 0) {
boolean deployedPortal = false;
for (MapleDoor door : partychar.getDoors()) {
if(door.getOwnerId() == partychar.getId()) {
MapleDoorObject mdo = door.getAreaDoor();
mplew.writeInt(mdo.getTo().getId());
mplew.writeInt(mdo.getFrom().getId());
mplew.writeInt(mdo.getPosition().x);
mplew.writeInt(mdo.getPosition().y);
deployedPortal = true;
}
}
mplew.writeInt(party.getId());
Map<Integer, MapleDoor> partyDoors = party.getDoors();
if (partyDoors.size() > 0) {
MapleDoor door = partyDoors.get(partycharid);
if(!deployedPortal) {
if(door != null) {
MapleDoorObject mdo = door.getAreaDoor();
mplew.writeInt(mdo.getTo().getId());
mplew.writeInt(mdo.getFrom().getId());
mplew.writeInt(mdo.getPosition().x);
mplew.writeInt(mdo.getPosition().y);
} else {
mplew.writeInt(999999999);
mplew.writeInt(999999999);
mplew.writeInt(0);
@@ -3798,24 +3796,19 @@ public class MaplePacketCreator {
lew.writeInt(0);
}
}
Map<Integer, MapleDoor> partyDoors = party.getDoors();
for (MaplePartyCharacter partychar : partymembers) {
if (partychar.getChannel() == forchannel && !leaving) {
if (partychar.getDoors().size() > 0) {
boolean deployedPortal = false;
for (MapleDoor door : partychar.getDoors()) {
if(door.getOwnerId() == partychar.getId()) {
MapleDoorObject mdo = door.getTownDoor();
lew.writeInt(mdo.getTown().getId());
lew.writeInt(mdo.getArea().getId());
lew.writeInt(mdo.getPosition().x);
lew.writeInt(mdo.getPosition().y);
deployedPortal = true;
}
}
if(!deployedPortal) {
if (partyDoors.size() > 0) {
MapleDoor door = partyDoors.get(partychar.getId());
if(door != null) {
MapleDoorObject mdo = door.getTownDoor();
lew.writeInt(mdo.getTown().getId());
lew.writeInt(mdo.getArea().getId());
lew.writeInt(mdo.getPosition().x);
lew.writeInt(mdo.getPosition().y);
} else {
lew.writeInt(999999999);
lew.writeInt(999999999);
lew.writeInt(0);