Guild & Alliances Patches

As reported by J0k3r613, patched guild system not recognizing properly
the guild leader just after creation. Patched many more issues related
to guilds and alliances.
This commit is contained in:
ronancpl
2017-06-21 01:17:25 -03:00
parent 7f6d420cf1
commit 6b2b3616d6
83 changed files with 293 additions and 178 deletions

View File

@@ -498,7 +498,9 @@ public class Server implements Runnable {
}
if(mc != null) {
g.addGuildMember(mc.getMGC()); // i really REALLY must make player MGC the same as the guild MGC
mc.setMGC(g.getMGC(mc.getId()));
if(g.getMGC(mc.getId()) == null) System.out.println("null for " + mc.getName() + " when loading " + id);
g.getMGC(mc.getId()).setCharacter(mc);
g.setOnline(mc.getId(), true, mc.getClient().getChannel());
}
@@ -520,10 +522,10 @@ public class Server implements Runnable {
g.setOnline(mc.getId(), bOnline, channel);
}
public int addGuildMember(MapleGuildCharacter mgc) {
public int addGuildMember(MapleGuildCharacter mgc, MapleCharacter chr) {
MapleGuild g = guilds.get(mgc.getGuildId());
if (g != null) {
return g.addGuildMember(mgc);
return g.addGuildMember(mgc, chr);
}
return 0;
}