Added weather

This commit is contained in:
Light2
2013-11-21 15:17:32 +01:00
parent 3f721f876f
commit e7350687db
5 changed files with 139 additions and 2 deletions
+35
View File
@@ -553,6 +553,8 @@ public class SimulationService implements INetworkDispatch {
}
}
core.weatherService.sendWeather(object);
if (!object.hasSkill(ghost.getProfessionWheelPosition())) {
object.showFlyText("cbt_spam", "skill_up", (float) 2.5, new RGB(154, 205, 50), 0);
object.playEffectObject("clienteffect/skill_granted.cef", "");
@@ -872,5 +874,38 @@ public class SimulationService implements INetworkDispatch {
return height;
}
public void notifyPlanet(Planet planet, IoBuffer packet) {
ConcurrentHashMap<Integer, Client> clients = core.getActiveConnectionsMap();
for(Client client : clients.values()) {
if(client.getParent() == null)
continue;
if(client.getParent().getPlanet() == null)
continue;
else if(client.getParent().getPlanet() == planet)
client.getSession().write(packet);
}
}
public void notifyAllClients(IoBuffer packet) {
ConcurrentHashMap<Integer, Client> clients = core.getActiveConnectionsMap();
for(Client client : clients.values()) {
if(client.getParent() == null)
continue;
client.getSession().write(packet);
}
}
}