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)
if((float)rand()/RAND_MAX < (GetDEX()/1500.0f)) // 255 dex = 0.17 chance of proc.
{
if(item && other && other->GetHP() > 0)
{
if((item->common.spellId < 65535ul) && (item->common.effecttype == 0))
SpellFinished(item->common.spellId, other->GetID(), 10, 0);
}
}
K.