Skip to content

Commit

Permalink
fixed Era
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonSlayer62 committed Jun 16, 2024
1 parent 77dcb51 commit 81425cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion source/cBaseObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
11 changes: 6 additions & 5 deletions source/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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 );
}
}

Expand All @@ -3481,9 +3482,9 @@ R32 CHandleCombat::GetCombatTimeout( CChar *mChar )
// Weapon swing delay in LBR and earlier
getDelay = baseValue / ( getDelay * getOffset * ( 1 + speedBonus / static_cast<float>( 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<float>( 10 ) )) / 4 - 0.5 ) / globalAttackSpeed;
}
else
Expand Down

0 comments on commit 81425cc

Please sign in to comment.