Beispiel #1
0
 public int addGuildMember(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     return g.addGuildMember(mgc);
   }
   return 0;
 }
Beispiel #2
0
 public void disbandGuild(int gid) {
   synchronized (guilds) {
     MapleGuild g = guilds.get(gid);
     g.disbandGuild();
     guilds.remove(gid);
   }
 }
Beispiel #3
0
 public boolean increaseGuildCapacity(int gid) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     return g.increaseCapacity();
   }
   return false;
 }
Beispiel #4
0
 public boolean setGuildAllianceId(int gId, int aId) {
   MapleGuild guild = guilds.get(gId);
   if (guild != null) {
     guild.setAllianceId(aId);
     return true;
   }
   return false;
 }
Beispiel #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);
       }
     }
   }
 }
Beispiel #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;
   }
 }
Beispiel #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);
   }
 }
Beispiel #8
0
 public void changeRankTitle(int gid, String[] ranks) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.changeRankTitle(ranks);
   }
 }
Beispiel #9
0
 public void memberLevelJobUpdate(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     g.memberLevelJobUpdate(mgc);
   }
 }
Beispiel #10
0
 public void setGuildNotice(int gid, String notice) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.setGuildNotice(notice);
   }
 }
Beispiel #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);
   }
 }
Beispiel #12
0
 public int createGuild(int leaderId, String name) {
   return MapleGuild.createGuild(leaderId, name);
 }
Beispiel #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);
   }
 }
Beispiel #14
0
 public void leaveGuild(MapleGuildCharacter mgc) {
   MapleGuild g = guilds.get(mgc.getGuildId());
   if (g != null) {
     g.leaveGuild(mgc);
   }
 }
Beispiel #15
0
 public void setGuildMemberOnline(MapleGuildCharacter mgc, boolean bOnline, int channel) {
   MapleGuild g = getGuild(mgc.getGuildId(), mgc);
   g.setOnline(mgc.getId(), bOnline, channel);
 }
Beispiel #16
0
 public void gainGP(int gid, int amount) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.gainGP(amount);
   }
 }
Beispiel #17
0
 public void changeRank(int gid, int cid, int newRank) {
   MapleGuild g = guilds.get(gid);
   if (g != null) {
     g.changeRank(cid, newRank);
   }
 }