Unlink Tiger Claw from other monk skills for RoF2+

Tiger Claw has its own reuse now, which the client expects

pTimerCombatAbility2 should be able to be used if they do something
similar for other classes.
This commit is contained in:
Michael Cook (mackal) 2015-05-21 18:15:34 -04:00
parent ea44b4b3b1
commit 9cbda0f81b
2 changed files with 60 additions and 54 deletions

View File

@ -39,7 +39,8 @@ enum { //values for pTimerType
pTimerDisciplineReuseStart = 14, pTimerDisciplineReuseStart = 14,
pTimerDisciplineReuseEnd = 24, pTimerDisciplineReuseEnd = 24,
pTimerCombatAbility = 25, pTimerCombatAbility = 25,
pTimerBeggingPickPocket = 26, pTimerCombatAbility2 = 26, // RoF2+ Tiger Claw is unlinked from other monk skills, generic in case other classes ever need it
pTimerBeggingPickPocket = 27,
pTimerLayHands = 87, //these IDs are used by client too pTimerLayHands = 87, //these IDs are used by client too
pTimerHarmTouch = 89, //so dont change them pTimerHarmTouch = 89, //so dont change them

View File

@ -181,6 +181,11 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
return; return;
CombatAbility_Struct* ca_atk = (CombatAbility_Struct*) app->pBuffer; CombatAbility_Struct* ca_atk = (CombatAbility_Struct*) app->pBuffer;
pTimerType timer = pTimerCombatAbility;
// RoF2+ Tiger Claw is unlinked from other monk skills, if they ever do that for other classes there will need
// to be more checks here
if (GetClientVersion() >= ClientVersion::RoF2 && ca_atk->m_skill == SkillTigerClaw)
timer = pTimerCombatAbility2;
/* Check to see if actually have skill */ /* Check to see if actually have skill */
if (!MaxSkill(static_cast<SkillUseTypes>(ca_atk->m_skill))) if (!MaxSkill(static_cast<SkillUseTypes>(ca_atk->m_skill)))
@ -218,7 +223,7 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
if(!CombatRange(GetTarget())) if(!CombatRange(GetTarget()))
return; return;
if(!p_timers.Expired(&database, pTimerCombatAbility, false)) { if(!p_timers.Expired(&database, timer, false)) {
Message(13,"Ability recovery time not yet met."); Message(13,"Ability recovery time not yet met.");
return; return;
} }
@ -268,7 +273,7 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
DoSpecialAttackDamage(GetTarget(), SkillBash, dmg, 1, ht, ReuseTime); DoSpecialAttackDamage(GetTarget(), SkillBash, dmg, 1, ht, ReuseTime);
if(ReuseTime > 0) if(ReuseTime > 0)
{ {
p_timers.Start(pTimerCombatAbility, ReuseTime); p_timers.Start(timer, ReuseTime);
} }
} }
return; return;
@ -304,7 +309,7 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
} }
if(ReuseTime > 0) { if(ReuseTime > 0) {
p_timers.Start(pTimerCombatAbility, ReuseTime); p_timers.Start(timer, ReuseTime);
} }
return; return;
} }
@ -390,7 +395,7 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
ReuseTime = (ReuseTime*HasteMod)/100; ReuseTime = (ReuseTime*HasteMod)/100;
if(ReuseTime > 0){ if(ReuseTime > 0){
p_timers.Start(pTimerCombatAbility, ReuseTime); p_timers.Start(timer, ReuseTime);
} }
} }