1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-03 01:07:47 +00:00

read aspect from exd, correct potency for heavy shot

This commit is contained in:
NotAdam 2019-02-11 10:03:36 +11:00
parent a60d55250a
commit f40f0a30e2
3 changed files with 6 additions and 7 deletions

View file

@ -21,7 +21,7 @@ public:
void onCharaHit( Sapphire::Entity::Chara& sourceActor, Sapphire::Entity::Chara& hitActor, void onCharaHit( Sapphire::Entity::Chara& sourceActor, Sapphire::Entity::Chara& hitActor,
Sapphire::Action::Action& currentAction ) override Sapphire::Action::Action& currentAction ) override
{ {
currentAction.damageTarget( 100, hitActor ); currentAction.damageTarget( 150, hitActor );
} }
}; };

View file

@ -37,6 +37,7 @@ Sapphire::Action::Action::Action( Entity::CharaPtr caster, uint32_t actionId,
m_cooldownGroup = action->cooldownGroup; m_cooldownGroup = action->cooldownGroup;
m_range = action->range; m_range = action->range;
m_effectRange = action->effectRange; m_effectRange = action->effectRange;
m_aspect = static_cast< Common::ActionAspect >( action->aspect );
// a default range is set by the game for the class/job // a default range is set by the game for the class/job
if( m_range == -1 ) if( m_range == -1 )
@ -312,8 +313,7 @@ void Sapphire::Action::Action::buildEffectPackets()
} }
} }
void Sapphire::Action::Action::damageTarget( uint32_t potency, Entity::Chara& chara, void Sapphire::Action::Action::damageTarget( uint32_t potency, Entity::Chara& chara )
Common::ActionAspect aspect )
{ {
// todo: scale potency into damage from stats // todo: scale potency into damage from stats

View file

@ -49,8 +49,6 @@ namespace Sapphire::Action
/*! /*!
* @brief Checks if the action *may* target a resident instead of an actor * @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. * @return true if the target *may* be a resident and not an actor, otherwise false.
*/ */
bool hasResidentTarget() const; bool hasResidentTarget() const;
@ -69,9 +67,9 @@ namespace Sapphire::Action
* @brief Damages a target and adds the effect entry * @brief Damages a target and adds the effect entry
* @param potency The amount of damage the target takes * @param potency The amount of damage the target takes
* @param chara The chara to inflict damage upon * @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 * @brief Heals a target and adds the effect entry
* @param potency Amount of healing to apply * @param potency Amount of healing to apply
@ -124,6 +122,7 @@ namespace Sapphire::Action
uint8_t m_cooldownGroup; uint8_t m_cooldownGroup;
int8_t m_range; int8_t m_range;
uint8_t m_effectRange; uint8_t m_effectRange;
Common::ActionAspect m_aspect;
Entity::CharaPtr m_pSource; Entity::CharaPtr m_pSource;
Entity::CharaPtr m_pTarget; Entity::CharaPtr m_pTarget;