mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47: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
|
struct EffectEntry
|
||||||
{
|
{
|
||||||
Common::ActionEffectType effectType;
|
Common::ActionEffectType effectType;
|
||||||
Common::ActionHitSeverityType hitSeverity;
|
uint8_t param0;
|
||||||
Common::ActionHitSeverityType healSeverity;
|
uint8_t param1;
|
||||||
/*!
|
/*!
|
||||||
* @brief Shows an additional percentage in the battle log
|
* @brief Shows an additional percentage in the battle log
|
||||||
*
|
*
|
||||||
* Has no effect on what is shown and stored in value
|
* 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 valueMultiplier; // This multiplies whatever value is in the 'value' param by 10. Possibly a workaround for big numbers
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
int16_t value;
|
int16_t value;
|
||||||
|
|
|
@ -12,10 +12,10 @@ EffectResult::EffectResult( Entity::CharaPtr target, uint64_t runAfter ) :
|
||||||
m_target( std::move( target ) ),
|
m_target( std::move( target ) ),
|
||||||
m_delayMs( runAfter ),
|
m_delayMs( runAfter ),
|
||||||
m_value( 0 ),
|
m_value( 0 ),
|
||||||
m_hitSeverity( Common::ActionHitSeverityType::NormalDamage ),
|
m_param0( 0 ),
|
||||||
m_healSeverity( Common::ActionHitSeverityType::NormalHeal ),
|
m_param1( 0 ),
|
||||||
m_type( Common::ActionEffectType::Nothing ),
|
m_type( Common::ActionEffectType::Nothing ),
|
||||||
m_param( 0 ),
|
m_param2( 0 ),
|
||||||
m_flag( Common::ActionEffectResultFlag::None )
|
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 )
|
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_value = amount;
|
||||||
m_flag = flag;
|
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 )
|
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_value = amount;
|
||||||
m_flag = flag;
|
m_flag = flag;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void EffectResult::comboSucceed()
|
||||||
void EffectResult::applyStatusEffect( uint16_t statusId, uint8_t param )
|
void EffectResult::applyStatusEffect( uint16_t statusId, uint8_t param )
|
||||||
{
|
{
|
||||||
m_value = statusId;
|
m_value = statusId;
|
||||||
m_param = param;
|
m_param2 = param;
|
||||||
|
|
||||||
m_type = Common::ActionEffectType::ApplyStatusEffect;
|
m_type = Common::ActionEffectType::ApplyStatusEffect;
|
||||||
}
|
}
|
||||||
|
@ -90,10 +90,10 @@ Common::EffectEntry EffectResult::buildEffectEntry() const
|
||||||
|
|
||||||
// todo: that retarded shit so > u16 max numbers work
|
// todo: that retarded shit so > u16 max numbers work
|
||||||
entry.value = getValue();
|
entry.value = getValue();
|
||||||
entry.hitSeverity = m_hitSeverity;
|
entry.param0 = m_param0;
|
||||||
entry.healSeverity = m_healSeverity;
|
entry.param1 = m_param1;
|
||||||
entry.effectType = m_type;
|
entry.effectType = m_type;
|
||||||
entry.param = m_param;
|
entry.param2 = m_param2;
|
||||||
entry.flags = static_cast< uint8_t >( m_flag );
|
entry.flags = static_cast< uint8_t >( m_flag );
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
|
|
|
@ -37,12 +37,13 @@ namespace Sapphire::World::Action
|
||||||
|
|
||||||
Entity::CharaPtr m_target;
|
Entity::CharaPtr m_target;
|
||||||
|
|
||||||
Common::ActionHitSeverityType m_hitSeverity;
|
|
||||||
Common::ActionHitSeverityType m_healSeverity;
|
|
||||||
Common::ActionEffectType m_type;
|
Common::ActionEffectType m_type;
|
||||||
|
|
||||||
|
uint8_t m_param0;
|
||||||
|
uint8_t m_param1;
|
||||||
|
uint8_t m_param2;
|
||||||
|
|
||||||
uint32_t m_value;
|
uint32_t m_value;
|
||||||
uint8_t m_param;
|
|
||||||
Common::ActionEffectResultFlag m_flag;
|
Common::ActionEffectResultFlag m_flag;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue