Search in sources :

Example 6 with Server

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);
        }
    }
}
Also used : MapleGuildSummary(net.server.guild.MapleGuildSummary) Server(net.server.Server) MapleGuild(net.server.guild.MapleGuild)

Example 7 with Server

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()));
}
Also used : Server(net.server.Server) World(net.server.world.World)

Example 8 with Server

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());
    }
}
Also used : Server(net.server.Server)

Aggregations

Server (net.server.Server)8 World (net.server.world.World)4 MapleGuild (net.server.guild.MapleGuild)3 MapleCharacter (client.MapleCharacter)2 SQLException (java.sql.SQLException)2 Channel (net.server.channel.Channel)2 MaplePartyCharacter (net.server.world.MaplePartyCharacter)2 BuddylistEntry (client.BuddylistEntry)1 CharacterNameAndId (client.CharacterNameAndId)1 MapleFamily (client.MapleFamily)1 MaplePet (client.inventory.MaplePet)1 Point (java.awt.Point)1 UnknownHostException (java.net.UnknownHostException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1 PlayerBuffValueHolder (net.server.PlayerBuffValueHolder)1 CharacterIdChannelPair (net.server.channel.CharacterIdChannelPair)1 MapleAlliance (net.server.guild.MapleAlliance)1 MapleGuildCharacter (net.server.guild.MapleGuildCharacter)1 MapleGuildSummary (net.server.guild.MapleGuildSummary)1 MapleMessengerCharacter (net.server.world.MapleMessengerCharacter)1