Weapon proc spell target
I've written a small bit of code to enable weapon procs to work, however, I can't see a way of working out who the spell should be cast on (always casts on target at the moment). The spell effecttype for 'Avatar' on Primal weapons (which are cast on the player) is the same as 'Anarchy' on the Sceptre of destruction (which should be cast on the target).
Anyone know how to determine who the target should be from the spell/item? I've included to the code I put in, should anyone want it. It goes in right at the bottom of Client::Attack() in attack.cpp. Code:
// Check for proc on weapon, proc based on DEX (Kaiyodo mod) |
Well, once/if/when someone comes out with a spell editor, you could create a spell that is exactly like Avatar, only it is self-only and see if that works. Have you tried putting Gate as an item effect? Or Minor Shielding?
|
The Minor Shielding and Gate spells are flagged as 'Self-only' in the spell data (their spelltype is 'ST_Self'). Spells of this type, as well as any flagged with 'ST_AETarget' or 'ST_AECaster' will work just fine on a proccing weapon. The problems is with spells of type 'ST_Target' that need more information that I actually have, i.e. who to make the target.
I thought for a while that 'beneficial' spells would always proc on the player, while offensive spells proc on the target, but then remembered a few 'cursed' items that can proc offensive spells on the player (like the Cancel Magic proccing sword), so that was a non-starter. K. |
I know, but if self-only spells proc on yourself, you could make a spell exactly like Avatar, call it something different (or maybe you wouldn't have to, I don't know much about spell identification), but just make it self-only. This would be the "jerry-rigging" temporary fix, but it should work...
|
That would certainly work, I've got a temporary bodge in there at the moment that basically goes 'if spell = avatar, target = me'. It's crude, but it lets me have fun with the primal weapons :)
K. |
Is there possibly an overlooked bit of data in the item info that says who the spell proc is on? That would seem to make the most sense. Try comparing items that proc on target with items that proc on wielder....
|
Avatar is the spell that shamans get. Primal Avatar is the proc on the weapon. I haven't looked but i'm betting it's self only.
|
I'm pretty sure it's a targetable spell, Primal Avatar is a dropped spell in Sleepers I believe, a componentless version of Avatar.
The weapons I've been testing with are from the standard DB in the EQEmu zipfile (Primal velium warsword to be specific) so I'd presume all of the data for the weapon is spot on, i.e. packet sniffed from real EQ. All I do is cast the spell number that the weapon tells me to, I'm sure I'm just missing a bit of secret info stored in the weapon somewhere. K. |
Well, was a shot. I'll take a look deeper when i'm at home and have some time. :)
|
theres a primal avatar for shamans it doesnt take regent.
|
All times are GMT -4. The time now is 05:56 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.