use of net.server.Server in project HeavenMS by ronancpl.
the class World method reloadGuildSummary.
public void reloadGuildSummary() {
MapleGuild g;
Server server = Server.getInstance();
for (int i : gsStore.keySet()) {
g = server.getGuild(i, getId(), null);
if (g != null) {
gsStore.put(i, new MapleGuildSummary(g));
} else {
gsStore.remove(i);
}
}
}
use of net.server.Server in project HeavenMS by ronancpl.
the class ServerlistRequestHandler method handlePacket.
@Override
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
Server server = Server.getInstance();
for (World world : server.getWorlds()) {
c.announce(MaplePacketCreator.getServerList(world.getId(), ServerConstants.WORLD_NAMES[world.getId()], world.getFlag(), world.getEventMessage(), world.getChannels()));
}
c.announce(MaplePacketCreator.getEndOfServerList());
// too lazy to make a check lol
c.announce(MaplePacketCreator.selectWorld(0));
c.announce(MaplePacketCreator.sendRecommended(server.worldRecommendedList()));
}
use of net.server.Server in project HeavenMS by ronancpl.
the class MapleTVEffect method broadcastTV.
private void broadcastTV(boolean activity) {
Server server = Server.getInstance();
ACTIVE = activity;
if (ACTIVE) {
server.broadcastMessage(user.getWorld(), MaplePacketCreator.enableTV());
server.broadcastMessage(user.getWorld(), MaplePacketCreator.sendTV(user, message, type <= 2 ? type : type - 3, partner));
int delay = 15000;
if (type == 4) {
delay = 30000;
} else if (type == 5) {
delay = 60000;
}
TimerManager.getInstance().schedule(new Runnable() {
@Override
public void run() {
broadcastTV(false);
}
}, delay);
} else {
server.broadcastMessage(user.getWorld(), MaplePacketCreator.removeTV());
}
}
Aggregations