Mana Leech

Moderators: Benn, Calix, senji

Post Reply
Superfast Oz
Cardinal Chunder
Posts: 1031
Joined: Fri Nov 19, 2004 11:23 pm
Contact:

Mana Leech

Post 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

Calix
MOTODEAMON
Posts: 6109
Joined: Sat Dec 27, 2003 10:05 am

Re: Mana Leech

Post by Calix »

k nice one, I'll have a look.

Calix
MOTODEAMON
Posts: 6109
Joined: Sat Dec 27, 2003 10:05 am

Re: Mana Leech

Post 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.

Superfast Oz
Cardinal Chunder
Posts: 1031
Joined: Fri Nov 19, 2004 11:23 pm
Contact:

Re: Mana Leech

Post 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.

Belgarion
FISSURE OF WOE
Posts: 325
Joined: Fri Sep 30, 2005 7:54 am

Re: Mana Leech

Post by Belgarion »

What is the current status of mana leech from weapon hits anyway? Ddid you lot change that?
Image
I-Cers about my joining I-C:
Clx: "risk", "what? dont", "I`ll object"
Future: "fucked up"
Villa: "dirty and unclean"
senj: "guildhopper"

Calix
MOTODEAMON
Posts: 6109
Joined: Sat Dec 27, 2003 10:05 am

Re: Mana Leech

Post by Calix »

Unedited. As per basic RunUO, so in theory as per OSI also.

Belgarion
FISSURE OF WOE
Posts: 325
Joined: Fri Sep 30, 2005 7:54 am

Re: Mana Leech

Post 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.
Image
I-Cers about my joining I-C:
Clx: "risk", "what? dont", "I`ll object"
Future: "fucked up"
Villa: "dirty and unclean"
senj: "guildhopper"

Calix
MOTODEAMON
Posts: 6109
Joined: Sat Dec 27, 2003 10:05 am

Re: Mana Leech

Post by Calix »

Will make time to test this today.

Calix
MOTODEAMON
Posts: 6109
Joined: Sat Dec 27, 2003 10:05 am

Re: Mana Leech

Post by Calix »

Yeah seems ok. Must have been because char was GM.

Post Reply