|
||
|
|||||||
| Modification Suggestions This is where you can suggest a modifcation to RunUO! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Oct 2002
Age: 47
Posts: 4,754
|
While playing around with the XMLAttachments system I found a bug in SpellHelper.cs.
SpellHelper.cs has a method to call Damage where the source of the spell (from) is NULL. Code:
public static void Damage( TimeSpan delay, Mobile target, double damage, int phys, int fire, int cold, int pois, int nrgy )
{
Damage( delay, target, null, damage, phys, fire, cold, pois, nrgy );
}
The bug pops up later in SpellHelper.cs when DoLeech is called. DoLeech requires from to be a mobile, but has no error checking. This results in a crash if from is null. To fix, right before: Code:
DoLeech( damageGiven, from, target ); Code:
if (from != null ) Code:
DoLeech( damageGiven, m_From, m_Target ); Code:
if( m_From != null ) Last edited by HellRazor; 02-20-2010 at 06:58 PM. Reason: Fixed a bug in the bug fix! |
|
|
|
|
|
#2 (permalink) |
|
Bug Hunter
|
Surely I'm dumb and noob - but BaseCreature? I mean, do BaseCreature contain PlayerMobile also? Wouldn't this break the leeching effect for players?
What if, instead, the if statement checks Mobile instead of BaseCreature?
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff |
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Oct 2002
Age: 47
Posts: 4,754
|
Quote:
Should have just inserted a check to ensure from != null. I'll update my post to correct the fix. Thanks! |
|
|
|
|
|
|
#4 (permalink) | |
|
Bug Hunter
|
Quote:
![]() I have also reported it in Demise forums since, as I stated almost everywhere, the RunUO official development is moving from there: maybe you want to have a look here too
__________________
If you guys want ML, you are going to have to create it, submit it, and if it is good enough it will more than likely be added to the repository - Jeff |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|