EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Quick fix for proccing weapons (https://www.eqemulator.org/forums/showthread.php?t=980)

Kaiyodo 04-02-2002 02:32 AM

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.

Shawn319 04-02-2002 03:03 AM

Sounds like it could help the new PVP code.. Lyenu is just wrapping up pvp modes and it might make it into the next release.

Lyenu X`Arie 04-02-2002 05:52 AM

Thanks Kaiyodo =). I renamed it to spell_type instead of unknown_4[1] BTW. So that should be in 0.3.0 =)

flipper 04-02-2002 06:37 AM

The real 0.3.0 or yesterdays pre-release? :p

Drawde 04-02-2002 07:30 AM

This sounds like it would be useful for AI as well, I was wondering how NPCs would be able to tell which spells in their list to cast on themselves and which to cast on their enemies.

Ariak 04-04-2002 12:08 PM

:P

Having a cleric mob CH on you would be a bit funny.


All times are GMT -4. The time now is 02:50 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.