mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
match retail packet.
This commit is contained in:
parent
35d8082715
commit
1cefb03acc
3 changed files with 4 additions and 4 deletions
|
@ -511,7 +511,7 @@ void Action::Action::buildEffects()
|
|||
bool shouldHitThisTarget = true;
|
||||
for( const auto& statusIt : getSourceChara()->getStatusEffectMap() )
|
||||
{
|
||||
bool result = statusIt.second->onActionHitTarget( this, actor.get(), victimCounter );
|
||||
bool result = statusIt.second->onActionHitTarget( this, actor, victimCounter );
|
||||
if( !result )
|
||||
shouldHitThisTarget = false;
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ void Sapphire::StatusEffect::StatusEffect::refresh( Sapphire::World::Action::Sta
|
|||
refresh();
|
||||
}
|
||||
|
||||
bool Sapphire::StatusEffect::StatusEffect::onActionHitTarget( World::Action::Action* action, Entity::Chara* victim, int victimCounter )
|
||||
bool Sapphire::StatusEffect::StatusEffect::onActionHitTarget( World::Action::Action* action, Entity::CharaPtr victim, int victimCounter )
|
||||
{
|
||||
switch( static_cast< Common::StatusEffectType >( m_effectEntry.effectType ) )
|
||||
{
|
||||
|
@ -351,7 +351,7 @@ bool Sapphire::StatusEffect::StatusEffect::onActionHitTarget( World::Action::Act
|
|||
break;
|
||||
}
|
||||
float restored = 0.01f * m_targetActor->getMaxMp() * m_effectEntry.effectValue1;
|
||||
action->getEffectbuilder()->restoreMP( m_targetActor, m_targetActor, static_cast< uint32_t >( restored ) );
|
||||
action->getEffectbuilder()->restoreMP( victim, m_targetActor, static_cast< uint32_t >( restored ), Sapphire::Common::ActionEffectResultFlag::EffectOnSource );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
void onBeforeActionStart( World::Action::Action* action );
|
||||
|
||||
bool onActionHitTarget( World::Action::Action* action, Entity::Chara* victim, int victimCounter );
|
||||
bool onActionHitTarget( World::Action::Action* action, Entity::CharaPtr victim, int victimCounter );
|
||||
|
||||
void applyStatus();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue