Page 1 of 1

Mana Leech

Posted: Sat May 12, 2012 9:34 am
by Superfast Oz
Calix,

Been looking at mana leech this morning with Joe, and it doesn't seem to be broken to me. With legendary necro/ss, I am leeching about 8-10 mana from a mob per wither from about 22-24 damage.

Perhaps you had insanely high skills set or something when you tested it?

For ref: GetDamageTypes in BaseWeapon calculates leeches for hits.
DoLeech in spellhelper for spells

Re: Mana Leech

Posted: Sat May 12, 2012 1:55 pm
by Calix
k nice one, I'll have a look.

Re: Mana Leech

Posted: Sat May 12, 2012 6:07 pm
by Calix
Tried this with normal skills and it's still the same, probably something to do with char being a GM. I'll try it on a normal char later.

Re: Mana Leech

Posted: Sun May 13, 2012 9:20 am
by Superfast Oz
Spellhelper.cs:

Replace

Code: Select all

if ( context.Type == typeof( WraithFormSpell ) )
				{
					int wraithLeech = ( 5 + (int)( ( 15 * from.Skills.SpiritSpeak.Value ) / 100 ) ); // Wraith form gives 5-20% mana leech
					int manaLeech = AOS.Scale( damageGiven, wraithLeech );
					if ( manaLeech != 0 )
					{
						from.Mana += manaLeech;
						from.PlaySound( 0x44D );
					}
				}
With

Code: Select all

if ( context.Type == typeof( WraithFormSpell ) )
				{
					int wraithLeech = ( 5 + (int)( ( 15 * from.Skills.SpiritSpeak.Value ) / 100 ) ); // Wraith form gives 5-20% mana leech
					int manaLeech = AOS.Scale( damageGiven, wraithLeech );
					if ( manaLeech != 0 )
					{
						from.SendMessage( "You have hit for {1} and have leeched {0} mana", manaLeech, damageGiven );
						from.Mana += manaLeech;
						from.PlaySound( 0x44D );
					}
				}
Around line 984. You will now report dmg vs leech when using a spell in wraith form.

Re: Mana Leech

Posted: Mon May 14, 2012 11:32 pm
by Belgarion
What is the current status of mana leech from weapon hits anyway? Ddid you lot change that?

Re: Mana Leech

Posted: Mon May 14, 2012 11:51 pm
by Calix
Unedited. As per basic RunUO, so in theory as per OSI also.

Re: Mana Leech

Posted: Tue May 15, 2012 6:17 pm
by Belgarion
Depends if base code is pre or post mana leech changes? I think we did some discussing on this a while back. plx2dig in forum and find out when next u at work.

Re: Mana Leech

Posted: Fri May 18, 2012 2:55 am
by Calix
Will make time to test this today.

Re: Mana Leech

Posted: Fri May 18, 2012 5:25 am
by Calix
Yeah seems ok. Must have been because char was GM.