mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-07 13:12:24 +00:00
Fixed more instances of AA timers being eaten
Every time I touch zone/AA.cpp to fix timers it gets uglier. This should fix the bug reported here: http://www.peqtgc.com/phpBB3/viewtopic.php?f=17&t=14125 It should also fix AAs not being reset when it when you have no buff slots free (confirmed on live)
This commit is contained in:
parent
9a19a00bdc
commit
3a95f81196
@ -1,5 +1,8 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 10/09/2013 ==
|
||||||
|
demonstar55: Fixed some more instances of the AA timer being eaten
|
||||||
|
|
||||||
== 10/08/2013 ==
|
== 10/08/2013 ==
|
||||||
demonstar55: Added IsBuffSpell(spell_id) that will return true if the spell has a duration, so would end up in effects/song/discs etc windows on the client
|
demonstar55: Added IsBuffSpell(spell_id) that will return true if the spell has a duration, so would end up in effects/song/discs etc windows on the client
|
||||||
demonstar55: Replaced instances of using CalcBuffDuration to determine if a spell was a buff with IsBuffSpell
|
demonstar55: Replaced instances of using CalcBuffDuration to determine if a spell was a buff with IsBuffSpell
|
||||||
|
|||||||
14
zone/AA.cpp
14
zone/AA.cpp
@ -262,7 +262,6 @@ void Client::ActivateAA(aaID activate){
|
|||||||
}
|
}
|
||||||
SetMana(GetMana() - caa->mana_cost);
|
SetMana(GetMana() - caa->mana_cost);
|
||||||
}
|
}
|
||||||
HandleAAAction(aaid);
|
|
||||||
if(caa->reuse_time > 0)
|
if(caa->reuse_time > 0)
|
||||||
{
|
{
|
||||||
uint32 timer_base = CalcAAReuseTimer(caa);
|
uint32 timer_base = CalcAAReuseTimer(caa);
|
||||||
@ -273,6 +272,7 @@ void Client::ActivateAA(aaID activate){
|
|||||||
p_timers.Start(AATimerID + pTimerAAStart, timer_base);
|
p_timers.Start(AATimerID + pTimerAAStart, timer_base);
|
||||||
SendAATimer(AATimerID, 0, 0);
|
SendAATimer(AATimerID, 0, 0);
|
||||||
}
|
}
|
||||||
|
HandleAAAction(aaid);
|
||||||
}
|
}
|
||||||
|
|
||||||
//cast the spell, if we have one
|
//cast the spell, if we have one
|
||||||
@ -531,10 +531,14 @@ void Client::HandleAAAction(aaID activate) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//cast the spell, if we have one
|
//cast the spell, if we have one
|
||||||
if(spell_id > 0 && spell_id < SPDAT_RECORDS) {
|
if(IsValidSpell(spell_id)) {
|
||||||
//I dont know when we need to mem and when we do not, if ever...
|
int aatid = GetAATimerID(activate);
|
||||||
//MemorizeSpell(8, spell_id, 3);
|
if(!CastSpell(spell_id, target_id , 10, -1, -1, 0, -1, pTimerAAStart + aatid , CalcAAReuseTimer(caa), 1)) {
|
||||||
CastSpell(spell_id, target_id);
|
SendAATimer(aatid, 0, 0xFFFFFF);
|
||||||
|
Message_StringID(15,ABILITY_FAILED);
|
||||||
|
p_timers.Clear(&database, pTimerAAStart + aatid);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//handle the duration timer if we have one.
|
//handle the duration timer if we have one.
|
||||||
|
|||||||
@ -1818,7 +1818,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
|||||||
if (isproc) {
|
if (isproc) {
|
||||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, true);
|
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, true);
|
||||||
} else {
|
} else {
|
||||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false);
|
if(!SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false))
|
||||||
|
if(casting_spell_type == 1) // AA failed to cast, InterruptSpell to reset timer
|
||||||
|
InterruptSpell();
|
||||||
}
|
}
|
||||||
if(IsPlayerIllusionSpell(spell_id)
|
if(IsPlayerIllusionSpell(spell_id)
|
||||||
&& IsClient()
|
&& IsClient()
|
||||||
@ -3478,7 +3480,8 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob* spelltar, bool reflect, bool use_r
|
|||||||
// if SpellEffect returned false there's a problem applying the
|
// if SpellEffect returned false there's a problem applying the
|
||||||
// spell. It's most likely a buff that can't stack.
|
// spell. It's most likely a buff that can't stack.
|
||||||
mlog(SPELLS__CASTING_ERR, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
|
mlog(SPELLS__CASTING_ERR, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
|
||||||
Message_StringID(MT_Shout, SPELL_NO_HOLD);
|
if(casting_spell_type != 1) // AA is handled differently
|
||||||
|
Message_StringID(MT_Shout, SPELL_NO_HOLD);
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user