Example #1
0
 public int addGuildMember(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     return g.addGuildMember(mgc);
   }
   return 0;
 }
Example #2
0
 public void disbandGuild(int gid) {
   synchronized (guilds) {
     MapleGuild g = guilds.get(gid);
     g.disbandGuild();
     guilds.remove(gid);
   }
 }
Example #3
0
 public boolean increaseGuildCapacity(int gid) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     return g.increaseCapacity();
   }
   return false;
 }
Example #4
0
 public boolean setGuildAllianceId(int gId, int aId) {
   MapleGuild guild = guilds.get(gId);
   if (guild != null) {
     guild.setAllianceId(aId);
     return true;
   }
   return false;
 }
Example #5
0
 public void allianceMessage(int id, final byte[] packet, int exception, int guildex) {
   MapleAlliance alliance = alliances.get(id);
   if (alliance != null) {
     for (Integer gid : alliance.getGuilds()) {
       if (guildex == gid) {
         continue;
       }
       MapleGuild guild = guilds.get(gid);
       if (guild != null) {
         guild.broadcast(packet, exception);
       }
     }
   }
 }
Example #6
0
 public MapleGuild getGuild(int id, MapleGuildCharacter mgc) {
   synchronized (guilds) {
     if (guilds.get(id) != null) {
       return guilds.get(id);
     }
     if (mgc == null) {
       return null;
     }
     MapleGuild g = new MapleGuild(mgc);
     if (g.getId() == -1) {
       return null;
     }
     guilds.put(id, g);
     return g;
   }
 }
Example #7
0
 public void setGuildEmblem(int gid, short bg, byte bgcolor, short logo, byte logocolor) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.setGuildEmblem(bg, bgcolor, logo, logocolor);
   }
 }
Example #8
0
 public void changeRankTitle(int gid, String[] ranks) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.changeRankTitle(ranks);
   }
 }
Example #9
0
 public void memberLevelJobUpdate(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     g.memberLevelJobUpdate(mgc);
   }
 }
Example #10
0
 public void setGuildNotice(int gid, String notice) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.setGuildNotice(notice);
   }
 }
Example #11
0
 public void expelMember(MapleGuildCharacter initiator, String name, int cid) {
   MapleGuild g = guilds.get(initiator.getGuildId());
   if (g != null) {
     g.expelMember(initiator, name, cid);
   }
 }
Example #12
0
 public int createGuild(int leaderId, String name) {
   return MapleGuild.createGuild(leaderId, name);
 }
Example #13
0
 public void guildChat(int gid, String name, int cid, String msg) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.guildChat(name, cid, msg);
   }
 }
Example #14
0
 public void leaveGuild(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     g.leaveGuild(mgc);
   }
 }
Example #15
0
 public void setGuildMemberOnline(MapleGuildCharacter mgc, boolean bOnline, int channel) {
   MapleGuild g = getGuild(mgc.getGuildId(), mgc);
   g.setOnline(mgc.getId(), bOnline, channel);
 }
Example #16
0
 public void gainGP(int gid, int amount) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.gainGP(amount);
   }
 }
Example #17
0
 public void changeRank(int gid, int cid, int newRank) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.changeRank(cid, newRank);
   }
 }