Maker & Storage fetch Wz + Buff system & PS / HM patch + Pet Evolution

Storage now fetches transaction fees from the WZ.
Maker now pulls info about catalyzers from the WZ.
Fixed the enhanced buff system disappearing with some statsup when using multiple-statups items.
Fixed hired merchant now removing owner and visitors at expiration time.
Fixed some concurrent issues with player shops and hired merchants.
Fixed pet evolutions, now not only handing out not-expired pets but also refreshing the expire time as well.
Added item replace behaviour on the item expire system.
This commit is contained in:
ronancpl
2018-06-07 12:57:56 -03:00
parent ce74680953
commit cdac59326a
22 changed files with 486 additions and 262 deletions
+13 -18
View File
@@ -99,20 +99,15 @@ public class MaplePlayerShop extends AbstractMapleMapObject {
}
private void addVisitor(MapleCharacter visitor) {
visitorLock.lock();
try {
for (int i = 0; i < 3; i++) {
if (visitors[i] == null) {
visitors[i] = visitor;
visitor.setSlot(i);
this.broadcast(MaplePacketCreator.getPlayerShopNewVisitor(visitor, i + 1));
if(i == 2) visitor.getMap().broadcastMessage(MaplePacketCreator.addCharBox(owner, 1));
break;
}
for (int i = 0; i < 3; i++) {
if (visitors[i] == null) {
visitors[i] = visitor;
visitor.setSlot(i);
this.broadcast(MaplePacketCreator.getPlayerShopNewVisitor(visitor, i + 1));
if(i == 2) visitor.getMap().broadcastMessage(MaplePacketCreator.addCharBox(owner, 1));
break;
}
} finally {
visitorLock.unlock();
}
}
@@ -490,11 +485,6 @@ public class MaplePlayerShop extends AbstractMapleMapObject {
}
public synchronized boolean visitShop(MapleCharacter chr) {
if(!open.get()) {
chr.dropMessage(1, "This store is not yet open.");
return false;
}
if (this.isBanned(chr.getName())) {
chr.dropMessage(1, "You have been banned from this store.");
return false;
@@ -502,6 +492,11 @@ public class MaplePlayerShop extends AbstractMapleMapObject {
visitorLock.lock();
try {
if(!open.get()) {
chr.dropMessage(1, "This store is not yet open.");
return false;
}
if (this.hasFreeSlot() && !this.isVisitor(chr)) {
this.addVisitor(chr);
chr.setPlayerShop(this);