From 89f60df2c8e92045cc7d1d97f88df672c9def8cc Mon Sep 17 00:00:00 2001 From: NotAdam Date: Thu, 4 Apr 2019 22:00:36 +1100 Subject: [PATCH] slightly better name for the cost check function --- src/world/Action/Action.cpp | 8 ++++---- src/world/Action/Action.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index b350df8d..60714b24 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -267,7 +267,7 @@ void Sapphire::Action::Action::execute() assert( m_pSource ); // subtract costs first, if somehow the caster stops meeting those requirements cancel the cast - if( !casterHasCostRequirements( true ) ) + if( !costCheck( true ) ) { interrupt(); return; @@ -405,7 +405,7 @@ bool Sapphire::Action::Action::playerPrecheck( Entity::Player& player ) // validate range - if( !casterHasCostRequirements() ) + if( !costCheck() ) return false; return true; @@ -433,7 +433,7 @@ bool Sapphire::Action::Action::isComboAction() const return m_actionData->actionCombo == lastActionId; } -bool Sapphire::Action::Action::casterHasCostRequirements( bool subtractCosts ) +bool Sapphire::Action::Action::costCheck( bool subtractCosts ) { return primaryCostCheck( subtractCosts ) && secondaryCostCheck( subtractCosts ); } @@ -470,7 +470,7 @@ bool Sapphire::Action::Action::primaryCostCheck( bool subtractCosts ) return true; } - // free casts, likely just pure ogcds + // free casts, likely just pure ogcds case Common::ActionPrimaryCostType::None: { return true; diff --git a/src/world/Action/Action.h b/src/world/Action/Action.h index 216e1b21..6c01d239 100644 --- a/src/world/Action/Action.h +++ b/src/world/Action/Action.h @@ -52,7 +52,7 @@ namespace Sapphire::Action * @param subtractCosts Whether we should subtract the costs (eg, mp/tp) from the player or to just check them * @return whether the requirements are met by the caster */ - bool casterHasCostRequirements( bool subtractCosts = false ); + bool costCheck( bool subtractCosts = false ); /*! * @brief Checks if the action *may* target a resident instead of an actor