Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2012, 06:20 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default COMMITTED: AA reset timer on failed casts.

For some reason shorter reuse timer AAs (Divine Arbiration, Wrath of the Wild) were not being reset on failed casts (interrupts)

Code:
Index: AA.cpp
===================================================================
--- AA.cpp      (revision 2196)
+++ AA.cpp      (working copy)
@@ -288,7 +288,11 @@
                        }

                        if(!CastSpell(caa->spell_id, target_id, 10, -1, -1, 0, -1, AATimerID + pTimerAAStart, timer_base, 1))
-                                       return;
+                       {
+                               // Reset the timer on an AA if it failed to cast for some reason (interrupt)
+                               p_timers.Clear(&database, AATimerID + pTimerAAStart);
+                               return;
+                       }
                }
                else
                {

Last edited by cavedude; 09-13-2012 at 01:47 PM..
Reply With Quote
  #2  
Old 09-02-2012, 01:45 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

I'm going to be taking a look at your submissions and testing them on TGC. If all goes well, they'll be committed. Start to look for them live on the server tomorrow.
Reply With Quote
  #3  
Old 09-05-2012, 07:15 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Hmm, there appears to miss a case.. Will have to do some investigation (my guess is when the target moves out of range, but that's just intuition right now, haven't payed enough attention to when it happens :/ )
Reply With Quote
  #4  
Old 09-08-2012, 06:41 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Okay, I found the case where it was still not resetting the timer, and my inclination was right, it was when the target moved out of range. You can ignore the previous diff and apply this one (I originally didn't want to touch the Cast functions because of a rather ominous warning, but I have to now!)

Code:
Index: AA.cpp
===================================================================
--- AA.cpp      (revision 2207)
+++ AA.cpp      (working copy)
@@ -241,6 +241,7 @@
                case aaTargetCurrentGroup:
                        if(GetTarget() == NULL) {
                                Message_StringID(MT_DefaultText, AA_NO_TARGET); //You must first select a target for this ability!
+                               p_timers.Clear(&database, AATimerID + pTimerAAStart);
                                return;
                        }
                        target_id = GetTarget()->GetID();
@@ -501,6 +502,7 @@
                case aaTargetCurrentGroup:
                        if(GetTarget() == NULL) {
                                Message_StringID(MT_DefaultText, AA_NO_TARGET); //You must first select a target for this ability!
+                               p_timers.Clear(&database, timer_id + pTimerAAEffectStart);
                                return;
                        }
                        target_id = GetTarget()->GetID();
Index: spells.cpp
===================================================================
--- spells.cpp  (revision 2207)
+++ spells.cpp  (working copy)
@@ -711,6 +711,9 @@
                CastToNPC()->AI_Event_SpellCastFinished(false, casting_spell_slot);
        }

+       if(casting_spell_type == 1 && IsClient()) //Rest AA Timer on failed cast
+               CastToClient()->GetPTimers().Clear(&database, casting_spell_timer);
+
        ZeroCastingVars();      // resets all the state keeping stuff

        mlog(SPELLS__CASTING, "Spell %d has been interrupted.", spellid);
Reply With Quote
  #5  
Old 09-10-2012, 12:29 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Look for the updated code on PEQ tomorrow.
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 02:43 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3