|
المشاركات 151 |
+التقييم 0.07 |
تاريخ التسجيل Apr 2019 |
الاقامة Egypt |
نظام التشغيل Designer and Programmer |
رقم العضوية 11 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Conquer_Online_Server.Game
{
public static class Weather
{
public static DateTime NextChange = new DateTime();
public static Network.GamePackets.Weather CurrentWeatherBase = new Conquer_Online_Server.Network.GamePackets.Weather( true);
public static uint Intensity
{
get
{
return CurrentWeatherBase.Intensity;
}
set
{
CurrentWeatherBase.Intensity = value;
}
}
public static uint Appearence
{
get
{
return CurrentWeatherBase.Appearence;
}
set
{
CurrentWeatherBase.Appearence = value;
}
}
public static uint Direction
{
get
{
return CurrentWeatherBase.Direction;
}
set
{
CurrentWeatherBase.Direction = value;
}
}
public static uint CurrentWeather
{
get
{
return CurrentWeatherBase.WeatherType;
}
set
{
CurrentWeatherBase.WeatherType = value;
foreach (Client.GameState client in Program.Values)
{
CurrentWeatherBase.Send(client);
}
}
}
}
}
private void ServerFunctions(int time)
{
#region New weather
Conquer_Online_Server.Network.GamePackets.Weather weather;
#region Rain System
if (DateTime.Now.Minute == 10 && DateTime.Now.Second == 0 || DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
foreach (GameState state in Kernel.GamePool.Values)
{
Program.WeatherType = Conquer_Online_Server.Network.GamePackets.Weather. Rain;
weather = new Conquer_Online_Server.Network.GamePackets.Weather( true)
{
WeatherType = (uint)Program.WeatherType,
Intensity = 255,
Appearence = 255,
Direction = 255
};
state.Send(weather);
}
}
#endregion Rain System
#region Snow System
if (DateTime.Now.Minute == 20 && DateTime.Now.Second == 0 || DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
foreach (GameState state in Kernel.GamePool.Values)
{
Program.WeatherType = Conquer_Online_Server.Network.GamePackets.Weather. Snow;
weather = new Conquer_Online_Server.Network.GamePackets.Weather( true)
{
WeatherType = (uint)Program.WeatherType,
Intensity = 255,
Appearence = 255,
Direction = 255
};
state.Send(weather);
}
}
#endregion Snow System
#region AutumnLeaves
if (DateTime.Now.Minute == 30 && DateTime.Now.Second == 0 || DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
foreach (GameState state in Kernel.GamePool.Values)
{
Program.WeatherType = Conquer_Online_Server.Network.GamePackets.Weather. AutumnLeaves;
weather = new Conquer_Online_Server.Network.GamePackets.Weather( true)
{
WeatherType = (uint)Program.WeatherType,
Intensity = 255,
Appearence = 255,
Direction = 255
};
state.Send(weather);
}
}
#endregion AutumnLeaves
#region CherryBlossomPetals
if (DateTime.Now.Minute == 40 && DateTime.Now.Second == 0 || DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
foreach (GameState state in Kernel.GamePool.Values)
{
Program.WeatherType = Conquer_Online_Server.Network.GamePackets.Weather. CherryBlossomPetals;
weather = new Conquer_Online_Server.Network.GamePackets.Weather( true)
{
WeatherType = (uint)Program.WeatherType,
Intensity = 255,
Appearence = 255,
Direction = 255
};
state.Send(weather);
}
}
#endregion CherryBlossomPetals
#region BlowingCotten
if (DateTime.Now.Minute == 60 && DateTime.Now.Second == 0 || DateTime.Now.Minute == 00 && DateTime.Now.Second == 00)
{
foreach (GameState state in Kernel.GamePool.Values)
{
Program.WeatherType = Conquer_Online_Server.Network.GamePackets.Weather. BlowingCotten;
weather = new Conquer_Online_Server.Network.GamePackets.Weather( true)
{
WeatherType = (uint)Program.WeatherType,
Intensity = 255,
Appearence = 255,
Direction = 255
};
state.Send(weather);
}
}
#endregion CherryBlossomPetals
#endregion New weather
الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1) | |
|
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
سستم المطلوب كونكر | محمد ياسر | تطوير سيرفرات كونكر | 2 | 2023-10-10 02:01 AM |
اضافت سيستم الطقس كامله | ElSaher | تطوير سيرفرات كونكر | 5 | 2023-09-08 05:52 AM |
طلب سستم | medo2020 | مشكلات السيرفيرات كونكر الشخصيه | 12 | 2020-04-30 10:28 AM |
سستم exchangeshop | محمد ياسر | تطوير سيرفرات كونكر | 19 | 2019-12-07 09:25 PM |
طلب سستم | taha | مشكلات السيرفيرات كونكر الشخصيه | 2 | 2019-08-02 01:10 AM |