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:
@@ -98,6 +98,7 @@ import server.quest.MapleQuest;
|
||||
import tools.AutoJCE;
|
||||
import tools.DatabaseConnection;
|
||||
import tools.Pair;
|
||||
import org.apache.mina.core.session.IoSession;
|
||||
|
||||
public class Server {
|
||||
|
||||
@@ -1630,12 +1631,12 @@ public class Server {
|
||||
return gmLevel;
|
||||
}
|
||||
|
||||
private static String getRemoteIp(InetSocketAddress isa) {
|
||||
return isa.getAddress().getHostAddress();
|
||||
private static String getRemoteIp(IoSession session) {
|
||||
return MapleSessionCoordinator.getSessionRemoteAddress(session);
|
||||
}
|
||||
|
||||
public void setCharacteridInTransition(InetSocketAddress isa, int charId) {
|
||||
String remoteIp = getRemoteIp(isa);
|
||||
public void setCharacteridInTransition(IoSession session, int charId) {
|
||||
String remoteIp = getRemoteIp(session);
|
||||
|
||||
lgnWLock.lock();
|
||||
try {
|
||||
@@ -1645,8 +1646,8 @@ public class Server {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean validateCharacteridInTransition(InetSocketAddress isa, int charId) {
|
||||
String remoteIp = getRemoteIp(isa);
|
||||
public boolean validateCharacteridInTransition(IoSession session, int charId) {
|
||||
String remoteIp = getRemoteIp(session);
|
||||
|
||||
lgnWLock.lock();
|
||||
try {
|
||||
@@ -1657,6 +1658,28 @@ public class Server {
|
||||
}
|
||||
}
|
||||
|
||||
public Integer freeCharacteridInTransition(IoSession session) {
|
||||
String remoteIp = getRemoteIp(session);
|
||||
|
||||
lgnWLock.lock();
|
||||
try {
|
||||
return transitioningChars.remove(remoteIp);
|
||||
} finally {
|
||||
lgnWLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasCharacteridInTransition(IoSession session) {
|
||||
String remoteIp = getRemoteIp(session);
|
||||
|
||||
lgnRLock.lock();
|
||||
try {
|
||||
return transitioningChars.containsKey(remoteIp);
|
||||
} finally {
|
||||
lgnRLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public void registerLoginState(MapleClient c) {
|
||||
srvLock.lock();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user