From f40f0a30e2f1d5054a5dc071681835268d2daf83 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 11 Feb 2019 10:03:36 +1100 Subject: [PATCH] read aspect from exd, correct potency for heavy shot --- .../action/playeractions/archer/ActionHeavyShot97.cpp | 2 +- src/world/Action/Action.cpp | 4 ++-- src/world/Action/Action.h | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp b/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp index ba9275af..e5f4fae3 100644 --- a/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp +++ b/src/scripts/action/playeractions/archer/ActionHeavyShot97.cpp @@ -21,7 +21,7 @@ public: void onCharaHit( Sapphire::Entity::Chara& sourceActor, Sapphire::Entity::Chara& hitActor, Sapphire::Action::Action& currentAction ) override { - currentAction.damageTarget( 100, hitActor ); + currentAction.damageTarget( 150, hitActor ); } }; diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index 8999588f..917000e5 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -37,6 +37,7 @@ Sapphire::Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId, m_cooldownGroup = action->cooldownGroup; m_range = action->range; m_effectRange = action->effectRange; + m_aspect = static_cast< Common::ActionAspect >( action->aspect ); // a default range is set by the game for the class/job if( m_range == -1 ) @@ -312,8 +313,7 @@ void Sapphire::Action::Action::buildEffectPackets() } } -void Sapphire::Action::Action::damageTarget( uint32_t potency, Entity::Chara& chara, - Common::ActionAspect aspect ) +void Sapphire::Action::Action::damageTarget( uint32_t potency, Entity::Chara& chara ) { // todo: scale potency into damage from stats diff --git a/src/world/Action/Action.h b/src/world/Action/Action.h index 4a98eaf3..56f8bdca 100644 --- a/src/world/Action/Action.h +++ b/src/world/Action/Action.h @@ -49,8 +49,6 @@ namespace Sapphire::Action /*! * @brief Checks if the action *may* target a resident instead of an actor - * This checks if m_pTarget is nullptr but m_targetId is set - * * @return true if the target *may* be a resident and not an actor, otherwise false. */ bool hasResidentTarget() const; @@ -69,9 +67,9 @@ namespace Sapphire::Action * @brief Damages a target and adds the effect entry * @param potency The amount of damage the target takes * @param chara The chara to inflict damage upon - * @param aspect The aspect of the damage */ - void damageTarget( uint32_t potency, Entity::Chara& chara, Common::ActionAspect aspect = Common::ActionAspect::None ); + void damageTarget( uint32_t potency, Entity::Chara& chara ); + /*! * @brief Heals a target and adds the effect entry * @param potency Amount of healing to apply @@ -124,6 +122,7 @@ namespace Sapphire::Action uint8_t m_cooldownGroup; int8_t m_range; uint8_t m_effectRange; + Common::ActionAspect m_aspect; Entity::CharaPtr m_pSource; Entity::CharaPtr m_pTarget;