1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 11:07:45 +00:00

Implement benediction.

This commit is contained in:
collett 2020-01-15 18:29:27 +09:00
parent 7a7a2f1724
commit 71d486e806

View file

@ -0,0 +1,28 @@
#include <Script/NativeScriptApi.h>
#include <ScriptObject.h>
#include <Actor/Player.h>
#include <Action/Action.h>
#include <Math/CalcStats.h>
using namespace Sapphire;
class ActionBenediction140 :
public ScriptAPI::ActionScript
{
public:
ActionBenediction140() :
ScriptAPI::ActionScript( 140 )
{
}
void onExecute( Sapphire::World::Action::Action& action ) override
{
auto pTarget = action.getHitChara();
if( pTarget )
{
action.getEffectbuilder()->heal( pTarget, pTarget, pTarget->getMaxHp() );
}
}
};
EXPOSE_SCRIPT( ActionBenediction140 );