PDA

View Full Version : On the topic of procs...


tamarae
11-11-2002, 05:55 AM
Just a curiosity more than anything. I havent nosed very far into the code because frankly, my c++ sucks hard, slept through that class because it just didnt interest me. Now I'm kinda kicking myself for doing that, because I found a practical application.

Anyway.. back to my question.. there are different types of procs on pc melee weapons:

That which is proc'd on your opponent (a dd spell or dot spell for instance, or slow spell a la willsapper) -OR- a proc which is delivered to the wielder (avatar on primal weapons in ST for example). Is there a way to specify which target the proc should be delivered to? As it stands, weapons such as those which proc bonuses to the wielder like avatar are strengthening the opponent (mobs) instead. Is there an easy fix for this, such as adding a proc target field in the db for those weapons which proc, or just hard coding it into the proc code that says if its x type of proc then do the spell on the wielder instead of the opponent?

tamarae
11-11-2002, 06:00 AM
I've got it all fixed up here, will post the easy-peasy change after class today.

tamarae
11-11-2002, 10:38 AM
in zone/attack.cpp on the line that says:

if (weapon->common.spellID == 1598)
SpellFinished(weapon->common.spellID, GetID(), 10, 0);


Change it to:

if (weapon->common.spellID == 2434)
SpellFinished(weapon->common.spellID, GetID(), 10, 0);



I also added the neutralize magic so that the sword of Capt Bvellos in Kael will proc properly:

if (weapon->common.spellID == 2434) // Avatar (combat)
SpellFinished(weapon->common.spellID, GetID(), 10, 0);
else if (weapon->common.spellID == 1775) // Neutralize Magic (Kael sword)
SpellFinished(weapon->common.spellID, GetID(), 10, 0);
else
SpellFinished(weapon->common.spellID, other->GetID(), 10, 0);

Wiz
11-12-2002, 12:18 AM
I just changed it so benefical spells are proced on yourself.

Kaiyodo
11-12-2002, 01:22 AM
That 'if (weapon->common.spellID == 1598)' was a nasty hack that I put in when no-one knew how to test whether a spell was beneficial or not. I changed it so that beneficial spells were cast on the wielder and non-beneficial on the target when I found the byte in the spell_struct, but my change never made it into the code.

I think there are some problems with Cancel Magic spells as they're flagged as non-beneficial but need to be cast on the wielder. It should mostly work anyway :)

K.

tamarae
11-12-2002, 02:04 AM
Its crude, but it works. I've never been known for my coding elegance, just ask my programming prof :p

Never even thought to look for making beneficial stuff cast on myself, then again I didnt know that existed. Shows ya how deeply into the code I've dug... hehe.

ghostfighter
11-23-2002, 01:59 PM
1

neotokyo
11-24-2002, 12:37 AM
the beneficial - non-beneficial stuff doesnt work well with procs, cause there are probably many exceptions to the rule.

there is the masochist monk stuff that procs a rain DD on the wielder for example. i could guess there are more of this around too, although i dont know any.

but, if these 2 weapons were the only existing it wouldnt be too bad. perhaps i'll see anything in the item struct that tells you exactly how to use a proc...

Lurker_005
11-24-2002, 05:25 AM
Isn't cancel magic "benifical" 1 weapon I can think of has it and proc's on the wielder. The monk one, since it is an AE rain, it really wouldn't matter now would it....

neotokyo
11-24-2002, 05:39 AM
well actually there are 2 item with cancel magic in the game. one that procs on self, one that procs on others.

and no, cancel magic definitly isnt beneficial, since i use it for pulling ;-)

Kaiyodo
11-24-2002, 08:23 AM
The Adamantine Bo Staff (19/30 proc: Lightning Storm) does actually proc on the target, not the wielder. The fact that the proc is a rain spell is why it damages you, as any shaman who's cast his poison rains too close to his target will know :)

My monk used to use the Bo Staff when fighting giant sized mobs as the collision radius for them is huge, you can hit them while being out of range of the rain when it goes off.

As for the cancel magic being 'beneficial', the spell in the spdat is marked as beneficial even though it behaves as a harmful spell when cast on mobs. The only weapon I know that procs this was the glowing black sword which procced on the wielder, I don't know of a weapon that procced CM on the target, but I've been out of the game for a year :) It's possible it could proc a spell with the same name but different flags though (like the many versions of Avatar).

K.