View Single Post
  #1  
Old 04-02-2002, 02:32 AM
Kaiyodo
Hill Giant
 
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
Default Quick fix for proccing weapons

I found the 'beneficial spell' flag in the spells structure today (unknown_4[1]), you can drop it into the weapon proc code easily to make beneficial spells cast on you and aggressive spells cast on the target. It gets rid of that nasty 'is this spell avatar' bodge I put in

Here's the code to go near the bottom of client::attack() in attack.cpp :-

Code:
extern bool spells_loaded;
if(spells_loaded)
{
   // Check who to cast the effect on. Beneficial or grouponly (1 or 2) = us, agressive spell (0) = them
   if(spells[weapon->common.spellId].unknown_4[1] != 0)
      SpellFinished(weapon->common.spellId, GetID(), 10, 0);
   else
      SpellFinished(weapon->common.spellId, other->GetID(), 10, 0);
}
K.
Reply With Quote