Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-18-2002, 02:11 AM
Kaiyodo
Hill Giant
 
Join Date: Jan 2002
Location: Midlands,UK
Posts: 149
Default 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)
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.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:58 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3