Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2011, 09:30 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default Check Buffs Before Cast

Evening ladies and gents, I come to you with a question (or series..depending).

Can some one point me in the direction of where I might find either examples of buff checking or provide one?

Basically, I am looking to check for a certain buff during the casting process. To better demonstrate, I'll use Gift of Mana (AAXP) as my guinea pig.

A) Player casts Nuke001.
B) Player completes Nuke001, orc pawn is roflstomped.
C) Player gains Gift of Mana.
D) Player casts Nuke002. etc etc

I am looking to add in a check for certain buffs (i.e. Gift of Mana) during the casting process for possibly allowing a stacking effect (or if nothing else, for my own point of reference).


I appreciate any and all help provided!

-Hateborne
Reply With Quote
  #2  
Old 01-12-2011, 10:29 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

You mean in a perl script or in the source? Also not quite sure what you mean by stacking effect, like add another spell?
Reply With Quote
  #3  
Old 01-13-2011, 11:27 AM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

Apologies for not clarifying.

In the source (C++).

I chose Gift of Mana because the effect is similar. Currently, I have issues with Gift of Mana not working in the current source version.

Player has 50k mana.
Player casts Nuke001 (30k mana).
Player gains Gift of Mana.
Player has Gift of Mana but CANNOT cast Nuke002 (25k mana) because the client is only checking current mana and ignoring the fact that he has GoM up.

Basically, in the source I am using (possibly even the ones on servers) GoM will only work if the player already had the mana to cast the spell. If you have GoM but don't have the actual amount to cast the spell....no go.

Trying to find a way to add a check for either a dynamic spell id (search for the spell id where the name matches 'Gift of Mana') or hardcode in the spell id from my spell file. As server goes to set the mana cost, if buff GoM is found, then mana cost is set to 1.

The stacking thing is something completely different (as I have learned last night). Ignore that bit.



Thank you for the reply and thank you in advance for any more you can provide!

-Hate
Reply With Quote
  #4  
Old 01-13-2011, 07:33 PM
Caryatis
Dragon
 
Join Date: May 2009
Location: Milky Way
Posts: 539
Default

Just to be clear, that's how it works on live as well. You need to have the full amount for the spell even if you aren't going to use any of it.

However if you wanted to alter it so its like that, search spells.cpp for the message you get when you don't have enough mana, that is going to be the spot you want to add a check to.
Reply With Quote
  #5  
Old 01-13-2011, 07:40 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

I see, thank you for the heads up and information.

-Hateborne
Reply With Quote
Reply


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 03:00 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3