mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
Merge branch 'action_data_update_pr' into develop_c
This commit is contained in:
commit
1e431ee924
7 changed files with 36 additions and 8 deletions
|
@ -624,6 +624,7 @@ namespace Sapphire::Common
|
||||||
TpGain = 13,
|
TpGain = 13,
|
||||||
GpGain = 14,
|
GpGain = 14,
|
||||||
ApplyStatusEffect = 15,
|
ApplyStatusEffect = 15,
|
||||||
|
//ApplyStatusEffect2 = 16, // thin air uses this one but works fine with 15 wtf?
|
||||||
StatusNoEffect = 21,
|
StatusNoEffect = 21,
|
||||||
/*!
|
/*!
|
||||||
* @brief Tells the client that it should show combo indicators on actions.
|
* @brief Tells the client that it should show combo indicators on actions.
|
||||||
|
@ -1040,6 +1041,7 @@ namespace Sapphire::Common
|
||||||
MPRestore = 11,
|
MPRestore = 11,
|
||||||
Haste = 12,
|
Haste = 12,
|
||||||
InstantCast = 13,
|
InstantCast = 13,
|
||||||
|
NoCostCast = 14,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ActionTypeFilter : int32_t
|
enum class ActionTypeFilter : int32_t
|
||||||
|
|
|
@ -1812,8 +1812,8 @@ ActionLut::Lut ActionLut::m_actionLut =
|
||||||
{ 3571, { 400, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 5 } },
|
{ 3571, { 400, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 5 } },
|
||||||
|
|
||||||
//Thin Air, シンエアー
|
//Thin Air, シンエアー
|
||||||
//applies to self: Thin Air, シンエアー, duration 12000, param 0
|
//applies to self: Thin Air, シンエアー, duration 12000, param 65436
|
||||||
{ 7430, { 0, 0, 0, 0, 0, 1217, 12000, 0, 0, 0, 0, 0 } },
|
{ 7430, { 0, 0, 0, 0, 0, 1217, 12000, 65436, 0, 0, 0, 0 } },
|
||||||
|
|
||||||
//Tetragrammaton, テトラグラマトン
|
//Tetragrammaton, テトラグラマトン
|
||||||
//has heal: potency 700
|
//has heal: potency 700
|
||||||
|
@ -3514,4 +3514,7 @@ ActionLut::StatusEffectTable ActionLut::m_statusEffectTable =
|
||||||
//Swiftcast, 迅速魔: InstantCast, 1 casts
|
//Swiftcast, 迅速魔: InstantCast, 1 casts
|
||||||
{ 167, { 13, 1, 0, 0, 0 } },
|
{ 167, { 13, 1, 0, 0, 0 } },
|
||||||
|
|
||||||
|
//Thin Air, シンエアー: NoCostCast, primary costs
|
||||||
|
{ 1217, { 14, 1, 0, 0, 0 } },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -77,7 +77,7 @@ void EffectBuilder::comboSucceed( Entity::CharaPtr& target )
|
||||||
moveToResultList( target, nextResult );
|
moveToResultList( target, nextResult );
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectBuilder::applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, uint16_t statusId, uint32_t duration, uint8_t param, uint64_t resultDelayMs )
|
void EffectBuilder::applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, uint16_t statusId, uint32_t duration, uint16_t param, uint64_t resultDelayMs )
|
||||||
{
|
{
|
||||||
EffectResultPtr nextResult = make_EffectResult( target, source, Common::Util::getTimeMs() + resultDelayMs );
|
EffectResultPtr nextResult = make_EffectResult( target, source, Common::Util::getTimeMs() + resultDelayMs );
|
||||||
nextResult->applyStatusEffect( statusId, duration, param );
|
nextResult->applyStatusEffect( statusId, duration, param );
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Sapphire::World::Action
|
||||||
|
|
||||||
void comboSucceed( Entity::CharaPtr& target );
|
void comboSucceed( Entity::CharaPtr& target );
|
||||||
|
|
||||||
void applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, uint16_t statusId, uint32_t duration, uint8_t param, uint64_t resultDelayMs = 500 );
|
void applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, uint16_t statusId, uint32_t duration, uint16_t param, uint64_t resultDelayMs = 500 );
|
||||||
void applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, StatusEffect::StatusEffectPtr pStatusEffect, uint64_t resultDelayMs = 500 );
|
void applyStatusEffect( Entity::CharaPtr& target, Entity::CharaPtr& source, StatusEffect::StatusEffectPtr pStatusEffect, uint64_t resultDelayMs = 500 );
|
||||||
|
|
||||||
void statusNoEffect( Entity::CharaPtr& target, uint16_t statusId );
|
void statusNoEffect( Entity::CharaPtr& target, uint16_t statusId );
|
||||||
|
|
|
@ -84,7 +84,7 @@ void EffectResult::comboSucceed()
|
||||||
m_type = Common::ActionEffectType::ComboSucceed;
|
m_type = Common::ActionEffectType::ComboSucceed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectResult::applyStatusEffect( uint16_t statusId, uint32_t duration, uint8_t param )
|
void EffectResult::applyStatusEffect( uint16_t statusId, uint32_t duration, uint16_t param )
|
||||||
{
|
{
|
||||||
m_value = statusId;
|
m_value = statusId;
|
||||||
m_statusDuration = duration;
|
m_statusDuration = duration;
|
||||||
|
@ -118,7 +118,7 @@ Common::EffectEntry EffectResult::buildEffectEntry() const
|
||||||
entry.param0 = m_param0;
|
entry.param0 = m_param0;
|
||||||
entry.param1 = m_param1;
|
entry.param1 = m_param1;
|
||||||
entry.effectType = m_type;
|
entry.effectType = m_type;
|
||||||
entry.param2 = m_param2;
|
entry.param2 = static_cast< uint8_t >( m_param2 );
|
||||||
entry.flags = static_cast< uint8_t >( m_flag );
|
entry.flags = static_cast< uint8_t >( m_flag );
|
||||||
|
|
||||||
return entry;
|
return entry;
|
||||||
|
@ -147,6 +147,7 @@ void EffectResult::execute()
|
||||||
}
|
}
|
||||||
|
|
||||||
case Common::ActionEffectType::ApplyStatusEffect:
|
case Common::ActionEffectType::ApplyStatusEffect:
|
||||||
|
//case Common::ActionEffectType::ApplyStatusEffect2:
|
||||||
{
|
{
|
||||||
uint64_t lastTickOverride = 0;
|
uint64_t lastTickOverride = 0;
|
||||||
//remove same effect from the same source (refreshing old buff)
|
//remove same effect from the same source (refreshing old buff)
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Sapphire::World::Action
|
||||||
void restoreMP( uint32_t amount, Common::ActionEffectResultFlag flag = Common::ActionEffectResultFlag::None );
|
void restoreMP( uint32_t amount, Common::ActionEffectResultFlag flag = Common::ActionEffectResultFlag::None );
|
||||||
void startCombo( uint16_t actionId );
|
void startCombo( uint16_t actionId );
|
||||||
void comboSucceed();
|
void comboSucceed();
|
||||||
void applyStatusEffect( uint16_t statusId, uint32_t duration, uint8_t param );
|
void applyStatusEffect( uint16_t statusId, uint32_t duration, uint16_t param );
|
||||||
void applyStatusEffect( StatusEffect::StatusEffectPtr pStatusEffect );
|
void applyStatusEffect( StatusEffect::StatusEffectPtr pStatusEffect );
|
||||||
void statusNoEffect( uint16_t statusId );
|
void statusNoEffect( uint16_t statusId );
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace Sapphire::World::Action
|
||||||
|
|
||||||
uint8_t m_param0;
|
uint8_t m_param0;
|
||||||
uint8_t m_param1;
|
uint8_t m_param1;
|
||||||
uint8_t m_param2;
|
uint16_t m_param2;
|
||||||
|
|
||||||
uint32_t m_value;
|
uint32_t m_value;
|
||||||
uint32_t m_statusDuration;
|
uint32_t m_statusDuration;
|
||||||
|
|
|
@ -297,6 +297,28 @@ void Sapphire::StatusEffect::StatusEffect::onBeforeActionStart( Sapphire::World:
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case Common::StatusEffectType::NoCostCast:
|
||||||
|
{
|
||||||
|
// value1: cost type, 0 = all costs, 1 = primary, 2 = secondary
|
||||||
|
// value2-4: affected action ids, or all actions if value2 is 0
|
||||||
|
if( m_effectEntry.effectValue2 != 0 )
|
||||||
|
{
|
||||||
|
if( action->getId() != m_effectEntry.effectValue2 &&
|
||||||
|
action->getId() != m_effectEntry.effectValue3 &&
|
||||||
|
action->getId() != m_effectEntry.effectValue4 )
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( m_effectEntry.effectValue1 == 0 || m_effectEntry.effectValue1 == 1 )
|
||||||
|
action->setPrimaryCost( Common::ActionPrimaryCostType::None, 0 );
|
||||||
|
|
||||||
|
// secondary cost not implemented yet
|
||||||
|
//if( m_effectEntry.effectValue1 == 0 || m_effectEntry.effectValue1 == 2 )
|
||||||
|
// action->setSecondaryCost();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue