mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
effect entry field rename
This commit is contained in:
parent
1893cb951f
commit
ccc81ed90a
3 changed files with 16 additions and 15 deletions
|
@ -668,14 +668,14 @@ namespace Sapphire::Common
|
|||
struct EffectEntry
|
||||
{
|
||||
Common::ActionEffectType effectType;
|
||||
Common::ActionHitSeverityType hitSeverity;
|
||||
Common::ActionHitSeverityType healSeverity;
|
||||
uint8_t param0;
|
||||
uint8_t param1;
|
||||
/*!
|
||||
* @brief Shows an additional percentage in the battle log
|
||||
*
|
||||
* Has no effect on what is shown and stored in value
|
||||
*/
|
||||
uint8_t param; // this one is the real param
|
||||
uint8_t param2;
|
||||
uint8_t valueMultiplier; // This multiplies whatever value is in the 'value' param by 10. Possibly a workaround for big numbers
|
||||
uint8_t flags;
|
||||
int16_t value;
|
||||
|
|
|
@ -12,10 +12,10 @@ EffectResult::EffectResult( Entity::CharaPtr target, uint64_t runAfter ) :
|
|||
m_target( std::move( target ) ),
|
||||
m_delayMs( runAfter ),
|
||||
m_value( 0 ),
|
||||
m_hitSeverity( Common::ActionHitSeverityType::NormalDamage ),
|
||||
m_healSeverity( Common::ActionHitSeverityType::NormalHeal ),
|
||||
m_param0( 0 ),
|
||||
m_param1( 0 ),
|
||||
m_type( Common::ActionEffectType::Nothing ),
|
||||
m_param( 0 ),
|
||||
m_param2( 0 ),
|
||||
m_flag( Common::ActionEffectResultFlag::None )
|
||||
{
|
||||
|
||||
|
@ -38,7 +38,7 @@ uint64_t EffectResult::getDelay()
|
|||
|
||||
void EffectResult::damage( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionEffectResultFlag flag )
|
||||
{
|
||||
m_hitSeverity = severity;
|
||||
m_param0 = static_cast< uint8_t >( severity );
|
||||
m_value = amount;
|
||||
m_flag = flag;
|
||||
|
||||
|
@ -47,7 +47,7 @@ void EffectResult::damage( uint32_t amount, Common::ActionHitSeverityType severi
|
|||
|
||||
void EffectResult::heal( uint32_t amount, Common::ActionHitSeverityType severity, Common::ActionEffectResultFlag flag )
|
||||
{
|
||||
m_healSeverity = severity;
|
||||
m_param1 = static_cast< uint8_t >( severity );
|
||||
m_value = amount;
|
||||
m_flag = flag;
|
||||
|
||||
|
@ -79,7 +79,7 @@ void EffectResult::comboSucceed()
|
|||
void EffectResult::applyStatusEffect( uint16_t statusId, uint8_t param )
|
||||
{
|
||||
m_value = statusId;
|
||||
m_param = param;
|
||||
m_param2 = param;
|
||||
|
||||
m_type = Common::ActionEffectType::ApplyStatusEffect;
|
||||
}
|
||||
|
@ -90,10 +90,10 @@ Common::EffectEntry EffectResult::buildEffectEntry() const
|
|||
|
||||
// todo: that retarded shit so > u16 max numbers work
|
||||
entry.value = getValue();
|
||||
entry.hitSeverity = m_hitSeverity;
|
||||
entry.healSeverity = m_healSeverity;
|
||||
entry.param0 = m_param0;
|
||||
entry.param1 = m_param1;
|
||||
entry.effectType = m_type;
|
||||
entry.param = m_param;
|
||||
entry.param2 = m_param2;
|
||||
entry.flags = static_cast< uint8_t >( m_flag );
|
||||
|
||||
return entry;
|
||||
|
|
|
@ -37,12 +37,13 @@ namespace Sapphire::World::Action
|
|||
|
||||
Entity::CharaPtr m_target;
|
||||
|
||||
Common::ActionHitSeverityType m_hitSeverity;
|
||||
Common::ActionHitSeverityType m_healSeverity;
|
||||
Common::ActionEffectType m_type;
|
||||
|
||||
uint8_t m_param0;
|
||||
uint8_t m_param1;
|
||||
uint8_t m_param2;
|
||||
|
||||
uint32_t m_value;
|
||||
uint8_t m_param;
|
||||
Common::ActionEffectResultFlag m_flag;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue