From 81425cc261acd54604922c9b8bec347f65a5233a Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sun, 16 Jun 2024 02:14:38 -0500 Subject: [PATCH] fixed Era --- source/cBaseObject.cpp | 2 +- source/combat.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/cBaseObject.cpp b/source/cBaseObject.cpp index c4280e2c..1ce12d3e 100644 --- a/source/cBaseObject.cpp +++ b/source/cBaseObject.cpp @@ -1572,7 +1572,7 @@ Point3_st CBaseObject::GetLocation( void ) const //| Function - CBaseObject::GetSwingSpeedIncrease() //| CBaseObject::SetSwingSpeedIncrease() //o------------------------------------------------------------------------------------------------o -//| Purpose - Gets/Sets the weapon swing speed increase in percentage for item +//| Purpose - Gets/Sets the item's Swing Speed Increase property (in percentage), which adjusts the base swing speed of the equipped weapon //o------------------------------------------------------------------------------------------------o SI16 CBaseObject::GetSwingSpeedIncrease( void ) const { diff --git a/source/combat.cpp b/source/combat.cpp index 60430b5a..29049dc2 100644 --- a/source/combat.cpp +++ b/source/combat.cpp @@ -3431,8 +3431,8 @@ R32 CHandleCombat::GetCombatTimeout( CChar *mChar ) SI32 speedBonus = 0; SI32 getOffset = 0; - SI32 baseValue = (cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_LBR) ? 15000 : - ((cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_AOS) ? 80000 : 40000); + SI32 baseValue = ( cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_LBR ) ? 15000 : + (( cwmWorldState->ServerData()->ExpansionCoreShardEra() < ER_ML ) ? 80000 : 40000 ); CChar *ourTarg = mChar->GetTarg(); @@ -3470,7 +3470,8 @@ R32 CHandleCombat::GetCombatTimeout( CChar *mChar ) { if( ourTarg->GetNpcWander() == WT_FLEE || ourTarg->GetNpcWander() == WT_SCARED ) { - baseValue = cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_LBR ? 10000 : 53333; + baseValue = ( cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_LBR ) ? 10000 : + (( cwmWorldState->ServerData()->ExpansionCoreShardEra() < ER_ML ) ? 53333 : 26680 ); } } @@ -3481,9 +3482,9 @@ R32 CHandleCombat::GetCombatTimeout( CChar *mChar ) // Weapon swing delay in LBR and earlier getDelay = baseValue / ( getDelay * getOffset * ( 1 + speedBonus / static_cast( 10 ) )) / globalAttackSpeed; } - else if( cwmWorldState->ServerData()->ExpansionCoreShardEra() <= ER_AOS ) + else if( cwmWorldState->ServerData()->ExpansionCoreShardEra() < ER_ML ) { - // Weapon swing delay in AOS or later + // Weapon swing delay in SE and earlier getDelay = ( baseValue / ( getDelay * getOffset * ( 1 + speedBonus / static_cast( 10 ) )) / 4 - 0.5 ) / globalAttackSpeed; } else