1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-07-11 14:57:46 +00:00

Implement lucid dreaming.

This commit is contained in:
collett 2020-01-14 17:15:05 +09:00
parent 32b677ad4d
commit 4592f955a3
3 changed files with 11 additions and 2 deletions

View file

@ -1037,6 +1037,7 @@ namespace Sapphire::Common
DamageReceiveTrigger = 8,
DamageDealtTrigger = 9,
Shield = 10,
MPRestore = 11,
};
enum class ActionTypeFilter : int32_t

View file

@ -2369,9 +2369,8 @@ ActionLut::Lut ActionLut::m_actionLut =
{ 7538, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
//Reprisal, リプライザル
//has damage: potency 210, combo potency 0, directional potency 0
//applies to targets: Reprisal, リプライザル, duration 10000, param 0
{ 7535, { 210, 0, 0, 0, 0, 0, 0, 0, 1193, 10000, 0, 0 } },
{ 7535, { 0, 0, 0, 0, 0, 0, 0, 0, 1193, 10000, 0, 0 } },
//Shirk, シャーク
{ 7537, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
@ -3506,4 +3505,7 @@ ActionLut::StatusEffectTable ActionLut::m_statusEffectTable =
//Devilment, 攻めのタンゴ: CritDHRateBonus, Damage, crit 20%, dh 20%
{ 1825, { 7, 1, 20, 20, 0 } },
//Lucid Dreaming, ルーシッドドリーム: MPRestore, value 50
{ 1204, { 11, 50, 0, 0, 0 } },
};

View file

@ -98,6 +98,12 @@ void Sapphire::StatusEffect::StatusEffect::onTick()
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
m_lastTick = Util::getTimeMs();
pScriptMgr->onStatusTick( m_targetActor, *this );
auto statusEffectType = static_cast< Common::StatusEffectType >( m_effectEntry.effectType );
if( statusEffectType == Common::StatusEffectType::MPRestore )
{
m_targetActor->restoreMP( m_effectEntry.effectValue1 * 10 );
}
}
uint32_t Sapphire::StatusEffect::StatusEffect::getSrcActorId() const