CPQ tidyup patch + Guild Creation matcher + Solution to Login Accid=0

Adjusted AP gains, to get it to work following the AP Reset check method.
Fixed usage of inexistent itemids on CPQ and fishing.
Fixed one-of-a-kind items being lost in player trades due to missing inventory checks.
Implemented matching system for the guild creation phase. All players intending to join the new guild must be on the Guild Headquartes and accept the creation of the guild.
Fixed changing jobs not properly updating info on the party tab.
Fixed double tooltip information on CPQ actions UI.
Fixed CPQ not disbanding after a player leaves the party/instance.
Fixed checks for "in-progress" CPQ instances.
Fixed changing maps on CPQ not leading players back to the starting battlefield.
Reviewed login system, now preventing non-local IP connecting on local server and local IP on non-local server.
Reviewed login system, now cherrypicking sessions in transition state when trying to disconnect them due to a failed login (avoiding possible mishaps due to duplicate sessions of a same account).
Adjusted PiratePQ stage 2, now mobs respawn rather than making party leader request for new waves.
Adjusted Prime Minister, its spawn is no longer related to starting the quest. It should also allow party fights.
Fixed "forcevac" command not properly applying, rather sending to inventory, "consume-on-pickup" items.
Fixed (probably) accId = 0 issue on login, that was occurring due to client accountid's being set to 0 a while before being checked once again on finishLogin().
Fixed an issue with extended time on CPQ not properly showing the end-match's visual effect.
This commit is contained in:
ronancpl
2019-03-26 16:28:41 -03:00
parent 3bdf8cb2be
commit 83266508af
95 changed files with 2980 additions and 1420 deletions
+2
View File
@@ -48,6 +48,7 @@ import tools.DatabaseConnection;
import tools.MaplePacketCreator;
import tools.Pair;
import net.server.audit.locks.MonitoredLockType;
import server.MapleTrade;
/**
*
@@ -274,6 +275,7 @@ public class MapleHiredMerchant extends AbstractMapleMapObject {
if (c.getPlayer().getMeso() >= price) {
if (canBuy(c, newItem)) {
c.getPlayer().gainMeso(-price, false);
price -= MapleTrade.getFee(price); // thanks BHB for pointing out trade fees not applying here
synchronized (sold) {
sold.add(new SoldItem(c.getPlayer().getName(), pItem.getItem().getItemId(), newItem.getQuantity(), price));
+16 -17
View File
@@ -1264,19 +1264,19 @@ public class MapleMap {
}
public void broadcastBalrogVictory(String leaderName) {
getWorldServer().dropMessage(6, "[VICTORY] " + leaderName + "'s party has successfully defeated the Balrog! Praise to them, they finished with " + countAlivePlayers() + " players alive.");
getWorldServer().dropMessage(6, "[Victory] " + leaderName + "'s party has successfully defeated the Balrog! Praise to them, they finished with " + countAlivePlayers() + " players alive.");
}
public void broadcastHorntailVictory() {
getWorldServer().dropMessage(6, "[VICTORY] To the crew that have finally conquered Horned Tail after numerous attempts, I salute thee! You are the true heroes of Leafre!!");
getWorldServer().dropMessage(6, "[Victory] To the crew that have finally conquered Horned Tail after numerous attempts, I salute thee! You are the true heroes of Leafre!!");
}
public void broadcastZakumVictory() {
getWorldServer().dropMessage(6, "[VICTORY] At last, the tree of evil that for so long overwhelmed Ossyria has fallen. To the crew that managed to finally conquer Zakum, after numerous attempts, victory! You are the true heroes of Ossyria!!");
getWorldServer().dropMessage(6, "[Victory] At last, the tree of evil that for so long overwhelmed Ossyria has fallen. To the crew that managed to finally conquer Zakum, after numerous attempts, victory! You are the true heroes of Ossyria!!");
}
public void broadcastPinkBeanVictory(int channel) {
getWorldServer().dropMessage(6, "[VICTORY] In a swift stroke of sorts, the crew that has attempted Pink Bean at channel " + channel + " has ultimately defeated it. The Temple of Time shines radiantly once again, the day finally coming back, as the crew that managed to finally conquer it returns victoriously from the battlefield!!");
getWorldServer().dropMessage(6, "[Victory] In a swift stroke of sorts, the crew that has attempted Pink Bean at channel " + channel + " has ultimately defeated it. The Temple of Time shines radiantly once again, the day finally coming back, as the crew that managed to finally conquer it returns victoriously from the battlefield!!");
}
private boolean removeKilledMonsterObject(MapleMonster monster) {
@@ -1893,7 +1893,7 @@ public class MapleMap {
public void spawnAllMonsterIdFromMapSpawnList(int id, int difficulty, boolean isPq) {
for(SpawnPoint sp: getAllMonsterSpawn()) {
if(sp.getMonsterId() == id) {
if(sp.getMonsterId() == id && sp.shouldForceSpawn()) {
spawnMonster(sp.getMonster(), difficulty, isPq);
}
}
@@ -2079,7 +2079,7 @@ public class MapleMap {
public MaplePortal getDoorPortal(int doorid) {
MaplePortal doorPortal = portals.get(0x80 + doorid);
if(doorPortal == null) {
FilePrinter.printError(FilePrinter.EXCEPTION, "[DOOR] " + mapName + "(" + mapid + ") does not contain door portalid " + doorid);
FilePrinter.printError(FilePrinter.EXCEPTION, "[Door] " + mapName + "(" + mapid + ") does not contain door portalid " + doorid);
return portals.get(0x80);
}
@@ -4334,10 +4334,10 @@ public class MapleMap {
if (team == 0 && redTeamBuffs.size() >= 4 || team == 1 && blueTeamBuffs.size() >= 4) {
return 2;
}
final MCSkill skil = MapleCarnivalFactory.getInstance().getGuardian(num);
if (team == 0 && redTeamBuffs.contains(skil)) {
final MCSkill skill = MapleCarnivalFactory.getInstance().getGuardian(num);
if (team == 0 && redTeamBuffs.contains(skill)) {
return 0;
} else if (team == 1 && blueTeamBuffs.contains(skil)) {
} else if (team == 1 && blueTeamBuffs.contains(skill)) {
return 0;
}
GuardianSpawnPoint pt = this.getRandomGuardianSpawn(team);
@@ -4352,7 +4352,7 @@ public class MapleMap {
reactor.resetReactorActions(0);
this.spawnReactor(reactor);
reactor.setGuardian(pt);
this.buffMonsters(team, skil);
this.buffMonsters(team, skill);
getReactorByOid(reactor.getObjectId()).hitReactor(((MapleCharacter) this.getAllPlayer().get(0)).getClient());
} catch (Exception e) {
e.printStackTrace();
@@ -4360,21 +4360,20 @@ public class MapleMap {
return 1;
}
public void buffMonsters(int team, MCSkill skil) {
public void buffMonsters(int team, MCSkill skill) {
if (skill == null) return;
if (team == 0) {
redTeamBuffs.add(skil);
redTeamBuffs.add(skill);
} else if (team == 1) {
blueTeamBuffs.add(skil);
blueTeamBuffs.add(skill);
}
for (MapleMapObject mmo : this.mapobjects.values()) {
if (mmo.getType() == MapleMapObjectType.MONSTER) {
MapleMonster mob = (MapleMonster) mmo;
if (mob.getTeam() == team) {
if (skil != null) {
skil.getSkill().applyEffect(null, mob, false, null);
}
skill.getSkill().applyEffect(null, mob, false, null);
}
}
}
}
+2
View File
@@ -42,6 +42,7 @@ import tools.Pair;
import tools.data.output.MaplePacketLittleEndianWriter;
import net.server.audit.locks.MonitoredLockType;
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
import server.MapleTrade;
/**
*
@@ -279,6 +280,7 @@ public class MaplePlayerShop extends AbstractMapleMapObject {
}
c.getPlayer().gainMeso(-price, false);
price -= MapleTrade.getFee(price); // thanks BHB for pointing out trade fees not applying here
owner.gainMeso(price, true);
SoldItem soldItem = new SoldItem(c.getPlayer().getName(), pItem.getItem().getItemId(), quantity, price);