Beispiel #1
0
        public Map(MapInfo info)
        {
            this.id            = info.id;
            this.name          = info.name;
            this.CattleyaMapID = info.CattleyaMapID;
            this.CattleyaX     = info.CattleyaX;
            this.CattleyaY     = info.CattleyaY;
            this.CattleyaZ     = info.CattleyaZ;

            this.actorsByID     = new Dictionary <uint, Actor>();
            this.actorsByRegion = new Dictionary <uint, List <Actor> >();
            this.pcByName       = new Dictionary <string, ActorPC>();
            this.nextPcId       = 1;
            this.nextNpcId      = ID_BORDER + 1;
            this.nextItemId     = ID_BORDER2 + 1;


            this.gTime = new GameTime();
            this.gTime.UpdateTime(1, 12, 0);

            this.weather = Global.WEATHER_TYPE.SUNNY;
            this.wTask   = new SagaMap.Tasks.SystemTasks.DynamicWeather(this);
            this.wTask.Activate();

            if (info.heightmaps.Count > 0)
            {
                this.hMap = new HeightMap(info.heightmaps[0]);
            }
            else
            {
                this.hMap = null;
            }
        }
Beispiel #2
0
 public void OnTimeWeatherChange(byte[] gameTime, Global.WEATHER_TYPE weather)
 {
     Packets.Server.SendTime sendPacket = new SagaMap.Packets.Server.SendTime();
     sendPacket.SetTime(gameTime[0], gameTime[1], gameTime[2]);
     sendPacket.SetWeather(weather);
     this.C.netIO.SendPacket(sendPacket, C.SessionID);
 }
Beispiel #3
0
        public void UpdateTimeAndWeather(byte day, byte hour, byte min, Global.WEATHER_TYPE weather)
        {
            this.gTime.UpdateTime(day, hour, min);
            this.weather = weather;

            this.SendEventToAllActors(TOALL_EVENT_TYPE.UPDATE_TIME_AND_WEATHER, null, null, true);
        }
Beispiel #4
0
        public Map(MapInfo info)
        {
            this.id = info.id;
            this.name = info.name;
            this.CattleyaMapID = info.CattleyaMapID;
            this.CattleyaX = info.CattleyaX;
            this.CattleyaY = info.CattleyaY;
            this.CattleyaZ = info.CattleyaZ;

            this.actorsByID = new Dictionary<uint, Actor>();
            this.actorsByRegion = new Dictionary<uint, List<Actor>>();
            this.pcByName = new Dictionary<string, ActorPC>();
            this.nextPcId = 1;
            this.nextNpcId = ID_BORDER + 1;
            this.nextItemId = ID_BORDER2 + 1;

            this.gTime = new GameTime();
            this.gTime.UpdateTime(1, 12, 0);

            this.weather = Global.WEATHER_TYPE.SUNNY;
            this.wTask = new SagaMap.Tasks.SystemTasks.DynamicWeather(this);
            this.wTask.Activate();

            if (info.heightmaps.Count > 0)
                this.hMap = new HeightMap(info.heightmaps[0]);
            else
                this.hMap = null;
        }
Beispiel #5
0
 public void OnTimeWeatherChange(byte[] gameTime, Global.WEATHER_TYPE weather)
 {
 }
Beispiel #6
0
 public void SetWeather(Global.WEATHER_TYPE weather)
 {
     this.PutByte((byte)weather, 7);
 }
Beispiel #7
0
        public void UpdateWeather(Global.WEATHER_TYPE weather)
        {
            this.weather = weather;

            this.SendEventToAllActors(TOALL_EVENT_TYPE.UPDATE_TIME_AND_WEATHER, null, null, true);
        }
Beispiel #8
0
        public void UpdateWeather(Global.WEATHER_TYPE weather)
        {
            this.weather = weather;

            this.SendEventToAllActors(TOALL_EVENT_TYPE.UPDATE_TIME_AND_WEATHER, null, null, true);
        }
Beispiel #9
0
        public void UpdateTimeAndWeather(byte day, byte hour, byte min, Global.WEATHER_TYPE weather)
        {
            this.gTime.UpdateTime(day, hour, min);
            this.weather = weather;

            this.SendEventToAllActors(TOALL_EVENT_TYPE.UPDATE_TIME_AND_WEATHER, null, null, true);
        }