RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 RC1] Time System

Morxeton

Sorceror
RANCID77;661149 said:
Dang man you need a can of raid.. for all these bugs.. LoL.. and just so everyone else knows hes on my shard we working to get it all fixed so no i aint flamming him

Ya damn noob:eek:

Well we found some bugs... Don't set your timerspeed anytime soon. :)

I'll be releasing a new version in a little while. Found something else annoying with RunUO handling light level checks. If you're logged onto a shard that is not local to you, and you stand still, you will never receive a light level update. However, if you are logged onto your own shard locally, it updates fine.

I'll be implementing a fix for this that will not result in any additional lag (or shouldn't).

EDIT:
Upon doing some testing and going through code, it appears to be something else going on with just RANCID's shard. Looking into this still...

EDIT #2:
Seems to be a problem possibly with the MobileObject hashtable that the Time System uses... checking into this further.

EDIT #3:
The bug that we discovered was the UpdateTimeStamp bug set at the system level.
 

Morxeton

Sorceror
New version released.

v2.0.1:

  • Fixed a bug where [TS GET would not be able to retrieve the UseNightSightDarkestHourOverride and UseNightSightOverride variables.
  • Removed NightSightLevelReduction from the Variables list, as this is set per EMO, not system wide.
  • Fixed a bug where the default configuration was not calling to "Support.ReIndexArray()" to index the EMO and EEMO arrays. This resulted in the [TS SETEMO and GETEMO commands reporting incorrect indexes.
  • Fixed a bug when setting the timerspeed via [TS SET TIMERSPEED, it would crash the shard as the low and high values being passed into the method were int and not double.
  • Fixed a bug in the CalculateLightLevel() method that was not checking if a MobileObject was null before attempting to use a property of the object.
  • Added a couple lines of code at the end of the Load() method to reindex the EMO and EEMO arrays after loading has completed.
  • Removed an unnecessary check in the CalculateLightLevel() method.
  • Fixed a bug where the system was configured to use an UpdateTimeStamp variable at the system level instead of the mobile level, resulting in only one mobile receiving light level updates.
 

Cheetah2003

Wanderer
Morxeton;661205 said:
New version released.

v2.0.1:

  • Fixed a bug where [TS GET would not be able to retrieve the UseNightSightDarkestHourOverride and UseNightSightOverride variables.
  • Removed NightSightLevelReduction from the Variables list, as this is set per EMO, not system wide.
  • Fixed a bug where the default configuration was not calling to "Support.ReIndexArray()" to index the EMO and EEMO arrays. This resulted in the [TS SETEMO and GETEMO commands reporting incorrect indexes.
  • Fixed a bug when setting the timerspeed via [TS SET TIMERSPEED, it would crash the shard as the low and high values being passed into the method were int and not double.
  • Fixed a bug in the CalculateLightLevel() method that was not checking if a MobileObject was null before attempting to use a property of the object.
  • Added a couple lines of code at the end of the Load() method to reindex the EMO and EEMO arrays after loading has completed.
  • Removed an unnecessary check in the CalculateLightLevel() method.
  • Fixed a bug where the system was configured to use an UpdateTimeStamp variable at the system level instead of the mobile level, resulting in only one mobile receiving light level updates.

Does this update address this:

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.TimeSystem.TimeEngine.CalculateLightLevel(Object o) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engines\TimeEngine.cs:line 286
   at Server.Mobiles.PlayerMobile.ComputeBaseLightLevels(Int32& global, Int32& personal) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 711
   at Server.Mobile.ComputeLightLevels(Int32& global, Int32& personal) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 827
   at Server.Mobiles.PlayerMobile.CheckLightLevels(Boolean forceResend) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 751
   at Server.Region.OnRegionChange(Mobile m, Region oldRegion, Region newRegion) in d:\source\c#\RunUO\RunUO\Region.cs:line 839
   at Server.Mobile.UpdateRegion() in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6754
   at Server.Mobile.set_Map(Map value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6692
   at Server.Mobile.set_NetState(NetState value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 7826
   at Server.Network.PacketHandlers.PlayCharacter(NetState state, PacketReader pvSrc) in d:\source\c#\RunUO\RunUO\Network\PacketHandlers.cs:line 1891
   at Server.Network.MessagePump.HandleReceive(NetState ns) in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 238
   at Server.Network.MessagePump.Slice() in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 108
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 504
 

Pyro-Tech

Knight
quick question....if left unedited, does this follow UO's day/night cycle??

and does it still have the option to set ir in real time??



The reason im asking is due to david's sleeping NPC's script in the 2.0 archive, i had originally planned on setting things up for the npc's to sleep on my shard at night. So....thanks for any light you can shed on this

EDIT: so how do you implement EMO's?? do you have to define them like regions?

also, how does this work on custom maps??

and considering the way things are set up and customizable, you could in theory make it night all the time couldn't you?

and i can't remember from the last one, the vampire sickness system that cirulates a bit....do you know if chaning day/night cycle affects them adversly, or does it keep with the custom lightlevels from the day/night cycles.

thanks and if you can't answer that last bit, don't worry about it...i can test it, but am too tired/lazy to do it at the moment lol...ill look at it tomorrow or something

END EDIT
 

Morxeton

Sorceror
Cheetah2003;661220 said:
Does this update address this:

Code:
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.TimeSystem.TimeEngine.CalculateLightLevel(Object o) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Engines\TimeEngine.cs:line 286
   at Server.Mobiles.PlayerMobile.ComputeBaseLightLevels(Int32& global, Int32& personal) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 711
   at Server.Mobile.ComputeLightLevels(Int32& global, Int32& personal) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 827
   at Server.Mobiles.PlayerMobile.CheckLightLevels(Boolean forceResend) in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Mobiles\PlayerMobile.cs:line 751
   at Server.Region.OnRegionChange(Mobile m, Region oldRegion, Region newRegion) in d:\source\c#\RunUO\RunUO\Region.cs:line 839
   at Server.Mobile.UpdateRegion() in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6754
   at Server.Mobile.set_Map(Map value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 6692
   at Server.Mobile.set_NetState(NetState value) in d:\source\c#\RunUO\RunUO\Mobile.cs:line 7826
   at Server.Network.PacketHandlers.PlayCharacter(NetState state, PacketReader pvSrc) in d:\source\c#\RunUO\RunUO\Network\PacketHandlers.cs:line 1891
   at Server.Network.MessagePump.HandleReceive(NetState ns) in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 238
   at Server.Network.MessagePump.Slice() in d:\source\c#\RunUO\RunUO\Network\MessagePump.cs:line 108
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 504

Yes, this was the bug:
  • Fixed a bug in the CalculateLightLevel() method that was not checking if a MobileObject was null before attempting to use a property of the object.
 

Morxeton

Sorceror
Pyro-Tech;661245 said:
quick question....if left unedited, does this follow UO's day/night cycle??

and does it still have the option to set ir in real time??



The reason im asking is due to david's sleeping NPC's script in the 2.0 archive, i had originally planned on setting things up for the npc's to sleep on my shard at night. So....thanks for any light you can shed on this

EDIT: so how do you implement EMO's?? do you have to define them like regions?

also, how does this work on custom maps??

and considering the way things are set up and customizable, you could in theory make it night all the time couldn't you?

and i can't remember from the last one, the vampire sickness system that cirulates a bit....do you know if chaning day/night cycle affects them adversly, or does it keep with the custom lightlevels from the day/night cycles.

thanks and if you can't answer that last bit, don't worry about it...i can test it, but am too tired/lazy to do it at the moment lol...ill look at it tomorrow or something

END EDIT

I am on my way into work, I'll have to answer this later :)

Hint:
Use [TS ADDEMO to add an EMO region, but you must define its bounds and settings after adding it. By default it goes to the Internal map with -1, -1 to -1, -1 bounds. Be sure to set the MAP first, then the X2Y2 variables next then X1Y1.

I will be creating documentation that explains all this :)
 

Morxeton

Sorceror
Pyro-Tech;661245 said:
quick question....if left unedited, does this follow UO's day/night cycle??

and does it still have the option to set ir in real time??
Yes, the default is every five seconds IRL is one minute in game, which is UO's (or RunUO rather) day/night cycle.

You can use real time by typing [TS SET UseRealTime true.

Pyro-Tech;661245 said:
The reason im asking is due to david's sleeping NPC's script in the 2.0 archive, i had originally planned on setting things up for the npc's to sleep on my shard at night. So....thanks for any light you can shed on this
I don't know anything about that script, but if it's based off of light level, it should not be a problem. You could mod that script and check to see if it is nighttime by using:

TimeSystem.TimeEngine.IsNightTime(mobile);

This would return true if it is night.


Pyro-Tech;661245 said:
EDIT: so how do you implement EMO's?? do you have to define them like regions?
EMO's are not typical RunUO regions. You define them using the [TS SETEMO command in game. To add a new EMO, just type [TS ADDMO by itself. Then use [TS SETEMO to configure it. Be sure to set the map first, then X2Y2, then X1Y1.

Pyro-Tech;661245 said:
also, how does this work on custom maps??
They would work perfectly fine on custom maps. Just be sure to set your EMO regions based on your map layout.

Pyro-Tech;661245 said:
and considering the way things are set up and customizable, you could in theory make it night all the time couldn't you?
If you want it to always be nighttime (well at least the lightlevel will always be dark), you can set the DayLevel variable to the same value as the NightLevel variable. However, the system will still perform it's day/night cycles, it's just that the light levels would always be the same.

Pyro-Tech;661245 said:
and i can't remember from the last one, the vampire sickness system that cirulates a bit....do you know if chaning day/night cycle affects them adversly, or does it keep with the custom lightlevels from the day/night cycles.
If that script is based off of light levels, it should function just fine. If any of these scripts don't work with my Time System, please let me know and I'll take a look at it and see if I can figure it out.

Pyro-Tech;661245 said:
thanks and if you can't answer that last bit, don't worry about it...i can test it, but am too tired/lazy to do it at the moment lol...ill look at it tomorrow or something

END EDIT
Lol, sure thing. Please let me know the results.
 

Cheetah2003

Wanderer
Thanks for the update Morxeton. Still having trouble though. This one seems paticularly elusive. I can't reproduce it, it just... happens.

Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Server.LightCycle.NightSightTimer.OnTick() in d:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Misc\LightCycle.cs:line 155
   at Server.Timer.Slice() in d:\source\c#\RunUO\RunUO\Timer.cs:line 507
   at Server.Core.Main(String[] args) in d:\source\c#\RunUO\RunUO\Main.cs:line 503

I tried first, just adding a null ref check in that part of the code, to look like this:
Code:
			protected override void OnTick()
			{
				if (m_Owner != null)
				{
					m_Owner.EndAction(typeof(LightCycle));
					m_Owner.LightLevel = 0;
					BuffInfo.RemoveBuff(m_Owner, BuffIcon.NightSight);
					// ** EDIT ** Time System
[COLOR="Red"]					TimeSystem.EffectsEngine.SetNightSightOff(m_Owner);
[/COLOR]					// ** END *** Time System
				}
				else
					Console.WriteLine("Warning: NightSightTimer:OnTick() hit with no owner!");
			}
But somehow, someway, it STILL crashed on the line highlighted in red.

I got it like this now, hopefully to prevent crashing, but the null ref is very baffling, it shouldn't be capable of reaching that offending line if that's a null ref. I'm confused.

Code:
			protected override void OnTick()
			{
				try
				{
					m_Owner.EndAction(typeof(LightCycle));
					m_Owner.LightLevel = 0;
					BuffInfo.RemoveBuff(m_Owner, BuffIcon.NightSight);
					// ** EDIT ** Time System
					TimeSystem.EffectsEngine.SetNightSightOff(m_Owner);
					// ** END *** Time System
				}
				catch (Exception e)
				{
					Console.WriteLine("Warning: NightSightTimer:OnTick() caught an exception.");
					Console.WriteLine(e.ToString());
				}
			}

If anyone has some insight, it'd be much appreciated. :)
 

Morxeton

Sorceror
Hmm that is a very strange crash bug. It doesn't make any damn sense to me either. Try moving the TimeSystem call method to above the m_Owner.EndAction() and see if that makes a difference (even though logically it shouldn't).

It appears to be happening after the duration of nightsight is up. To speed up the reproducing process, change the TimeSpan from this:
Code:
TimeSpan.FromMinutes( Utility.Random( 15, 25 )

To this:
Code:
TimeSpan.FromSeconds( Utility.Random( 5, 10 )

Cast nightsight on yourself and let it wear off repeatedly and see if it crashes.

I will test this when I get home from work. Thanks for the bug report!
 

Cheetah2003

Wanderer
Found another bug for ya.

If you disable logging, and have a 'fresh' installation (the folder where the data file goes doesn't exist), it'll crash when trying to generate a new datafile.

This is because if the data file doesn't exist, it neglects to set defaults, resulting a value can't be null from the timeformat when it goes to write a new data file.

Also happens if you (like me) decide the log file should go in Logs and the data file should go in Saves (so it gets backed up with everything else.)
 

Cheetah2003

Wanderer
Tracked it down for ya! Finally...

Happens when the NightSight timer ticks after the player has logged out. Running the debugger revealed it's crashing on null ref in here...

Code:
        public static void SetNightSightOff(Mobile mobile)
        {
            MobileObject mo = Support.GetMobileObject(mobile);

            SetNightSightOff(mo);
        }

        public static void SetNightSightOff(MobileObject mo)
        {
            mo.IsNightSightOn = false;
            mo.OldLightLevel = 0;
        }
Support.GetMobileObject(mobile) is returning a null.
 

Morxeton

Sorceror
Cheetah2003;661520 said:
Found another bug for ya.

If you disable logging, and have a 'fresh' installation (the folder where the data file goes doesn't exist), it'll crash when trying to generate a new datafile.

This is because if the data file doesn't exist, it neglects to set defaults, resulting a value can't be null from the timeformat when it goes to write a new data file.

Also happens if you (like me) decide the log file should go in Logs and the data file should go in Saves (so it gets backed up with everything else.)

Thanks! Fixed for next version.
 

Morxeton

Sorceror
Cheetah2003;661536 said:
Tracked it down for ya! Finally...

Happens when the NightSight timer ticks after the player has logged out. Running the debugger revealed it's crashing on null ref in here...

Code:
        public static void SetNightSightOff(Mobile mobile)
        {
            MobileObject mo = Support.GetMobileObject(mobile);

            SetNightSightOff(mo);
        }

        public static void SetNightSightOff(MobileObject mo)
        {
            mo.IsNightSightOn = false;
            mo.OldLightLevel = 0;
        }
Support.GetMobileObject(mobile) is returning a null.

I was just looking at that before checking this thread and put in a null check for the method. Thanks for researching. This will also be fixed for next version ;)
 

Morxeton

Sorceror
New version released.

v2.0.2:

  • Removed an unnecessary command that I left in 2.0.1 by accident to do some debugging.
  • When using [TS ADDEMO and [TS ADDEEMO, instead of defaulting to Map.Internal, it will now set the EMO to be on the map of the person who typed in the command.
  • Fixed a bug where after the data file is loaded, the EMO and EEMO arrays were not being reindexed.
  • Consolidated some ObjectProps classes into the EMO.
  • Added EMO props: UseLightLevelOverride and LightLevelOverrideAdjust. When UseLightLevelOverride is enabled, the light level for the EMO that has priority would be the LightLevelOverrideAdjust value.
  • Added EMO props: UseMurdererDarkestHourBonus and MurdererDarkestHourLevelBonus. When UseMurdererDarkestHourBonus is enabled, any players that are murderers, instead of the evil spirits taking away their light level, it will be increased by the MurdererDarkestHourLevelBonus value.
  • Moved the UseLatitude, OuterLatitudePercent, and InnerLatitudePercent from MapObject into EffectsMapObject since this is only used in an EMO, not an EEMO.
  • Added NightSightDarkestHourReduction that is enabled/disabled by UseNightSightDarkestHourOverride. This is a percentage of how well nightsight will work during Darkest Hour. If it is set to 100%, then the nightsight effect will be consumed as it is now with UseNightSightDarkestHourOverride set to true.
  • Optimized the CalculateLightLevel() method and made changes for the new features added.
  • When UseNightSightOverride is enabled and NightSightLevelReduction is at 100%, it will now consume the nightsight effect and prevent it from being reapplied.
  • Fixed a bug where on a fresh install or if the data directory is missing, it would fail to set default configuration upon load failure.
  • Added an additional variable in Data.cs so that you can specify the location of the logs directory.
  • Logging can now be disabled/enabled in game via [TS SET LOGGING true/false. However, you must still set the m_Logging variable in Data.cs if you wish to capture logs of the loading process.
  • Fixed a bug in the SetNightSightOff(MobileObject) method where it would not check to see if mo was null before trying to use the props of the object.
  • Fixed a bug when using [TS SET <variable>, when forgetting to type in a value, it would throw a null reference exception.
  • Added default EMOs for Ilshenar, Malas, and Tokuno.
  • Changed default UpdateInterval from 500ms to 1000ms.

Based on these changes, please delete your Time System directory (not data file!) before installation.
 

Cheetah2003

Wanderer
Morxeton;661635 said:
New version released.

v2.0.2:

  • Removed an unnecessary command that I left in 2.0.1 by accident to do some debugging.
  • When using [TS ADDEMO and [TS ADDEEMO, instead of defaulting to Map.Internal, it will now set the EMO to be on the map of the person who typed in the command.
  • Fixed a bug where after the data file is loaded, the EMO and EEMO arrays were not being reindexed.
  • Consolidated some ObjectProps classes into the EMO.
  • Added EMO props: UseLightLevelOverride and LightLevelOverrideAdjust. When UseLightLevelOverride is enabled, the light level for the EMO that has priority would be the LightLevelOverrideAdjust value.
  • Added EMO props: UseMurdererDarkestHourBonus and MurdererDarkestHourLevelBonus. When UseMurdererDarkestHourBonus is enabled, any players that are murderers, instead of the evil spirits taking away their light level, it will be increased by the MurdererDarkestHourLevelBonus value.
  • Moved the UseLatitude, OuterLatitudePercent, and InnerLatitudePercent from MapObject into EffectsMapObject since this is only used in an EMO, not an EEMO.
  • Added NightSightDarkestHourReduction that is enabled/disabled by UseNightSightDarkestHourOverride. This is a percentage of how well nightsight will work during Darkest Hour. If it is set to 100%, then the nightsight effect will be consumed as it is now with UseNightSightDarkestHourOverride set to true.
  • Optimized the CalculateLightLevel() method and made changes for the new features added.
  • When UseNightSightOverride is enabled and NightSightLevelReduction is at 100%, it will now consume the nightsight effect and prevent it from being reapplied.
  • Fixed a bug where on a fresh install or if the data directory is missing, it would fail to set default configuration upon load failure.
  • Added an additional variable in Data.cs so that you can specify the location of the logs directory.
  • Logging can now be disabled/enabled in game via [TS SET LOGGING true/false. However, you must still set the m_Logging variable in Data.cs if you wish to capture logs of the loading process.
  • Fixed a bug in the SetNightSightOff(MobileObject) method where it would not check to see if mo was null before trying to use the props of the object.
  • Fixed a bug when using [TS SET <variable>, when forgetting to type in a value, it would throw a null reference exception.
  • Added default EMOs for Ilshenar, Malas, and Tokuno.
  • Changed default UpdateInterval from 500ms to 1000ms.

Based on these changes, please delete your Time System directory (not data file!) before installation.

Can't compile the new version:
Code:
Error	11	'Server.TimeSystem.EffectsMapObject' does not contain a definition for 'UseEvilSpiritSpawning'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Config.cs	173	21	RunUO Core Scripts
Error	12	'Server.TimeSystem.EffectsMapObject' does not contain a definition for 'EvilSpiritMaxSpawns'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Config.cs	174	21	RunUO Core Scripts
 

seirge

Wanderer
Crash on 2.0.2:
Code:
System.NullReferenceException: A null value was found where an object instance was required.
  at Server.TimeSystem.TimeEngine.CalculateLightLevel (System.Object o) [0x00000]
  at Server.LightCycle.ComputeLevelFor (Server.Mobile from) [0x00000]
  at Server.Mobiles.PlayerMobile.ComputeBaseLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobile.ComputeLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobiles.PlayerMobile.CheckLightLevels (Boolean forceResend) [0x00000]
  at Server.TimeSystem.Engine.OnSystemTick () [0x00000]
  at Server.TimeSystem.Engine+TimeSystemTimer.OnTick () [0x00000]
  at Server.Timer.Slice () [0x00000]
  at Server.Core.Main (System.String[] args) [0x00000]
Now I'm trying to catch it in debug mode.
 

Morxeton

Sorceror
Cheetah2003;661693 said:
Can't compile the new version:
Code:
Error	11	'Server.TimeSystem.EffectsMapObject' does not contain a definition for 'UseEvilSpiritSpawning'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Config.cs	173	21	RunUO Core Scripts
Error	12	'Server.TimeSystem.EffectsMapObject' does not contain a definition for 'EvilSpiritMaxSpawns'	C:\source\c#\RunUO Core Scripts\RunUO Core Scripts\Customs\Engines\Time System\Config.cs	174	21	RunUO Core Scripts

Oopsie :)

I was working on an evil spirit spawning engine and wanted to release v2.0.2 before I completed it. I left that in for testing by accident.

I updated the file, you may download it again.
 

Morxeton

Sorceror
seirge;661710 said:
Crash on 2.0.2:
Code:
System.NullReferenceException: A null value was found where an object instance was required.
  at Server.TimeSystem.TimeEngine.CalculateLightLevel (System.Object o) [0x00000]
  at Server.LightCycle.ComputeLevelFor (Server.Mobile from) [0x00000]
  at Server.Mobiles.PlayerMobile.ComputeBaseLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobile.ComputeLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobiles.PlayerMobile.CheckLightLevels (Boolean forceResend) [0x00000]
  at Server.TimeSystem.Engine.OnSystemTick () [0x00000]
  at Server.TimeSystem.Engine+TimeSystemTimer.OnTick () [0x00000]
  at Server.Timer.Slice () [0x00000]
  at Server.Core.Main (System.String[] args) [0x00000]
Now I'm trying to catch it in debug mode.

I'll look into this. Thanks for the bug report! If you catch it in debug mode, that would be awesome :)
 

Morxeton

Sorceror
seirge;661710 said:
Crash on 2.0.2:
Code:
System.NullReferenceException: A null value was found where an object instance was required.
  at Server.TimeSystem.TimeEngine.CalculateLightLevel (System.Object o) [0x00000]
  at Server.LightCycle.ComputeLevelFor (Server.Mobile from) [0x00000]
  at Server.Mobiles.PlayerMobile.ComputeBaseLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobile.ComputeLightLevels (System.Int32& global, System.Int32& personal) [0x00000]
  at Server.Mobiles.PlayerMobile.CheckLightLevels (Boolean forceResend) [0x00000]
  at Server.TimeSystem.Engine.OnSystemTick () [0x00000]
  at Server.TimeSystem.Engine+TimeSystemTimer.OnTick () [0x00000]
  at Server.Timer.Slice () [0x00000]
  at Server.Core.Main (System.String[] args) [0x00000]
Now I'm trying to catch it in debug mode.

I found the bug. It was not checking if the eo.EffectsMap was not null before trying to use a prop from it.

When you enabled UseMurdererDarkestHourBonus, and you were in an area that was not under an EMO, this would throw an exception.

Fixed for next version.
 

Morxeton

Sorceror
New version released.

v2.0.3:

  • Fixed a bug where the CalculateLightLevel() method was not checking to see if eo.EffectsMap was null before attempting to use a property.
 
Top