mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
27 lines
No EOL
543 B
C++
27 lines
No EOL
543 B
C++
#include <ScriptObject.h>
|
|
#include <Actor/Player.h>
|
|
#include <Action/Action.h>
|
|
#include <Inventory/Item.h>
|
|
|
|
class ActionDye2472 :
|
|
public Sapphire::ScriptAPI::ActionScript
|
|
{
|
|
public:
|
|
ActionDye2472() :
|
|
Sapphire::ScriptAPI::ActionScript( 2472 )
|
|
{
|
|
}
|
|
|
|
void onExecute( Sapphire::World::Action::Action& action ) override
|
|
{
|
|
auto sourceChara = action.getSourceChara();
|
|
|
|
if( !sourceChara->isPlayer() )
|
|
return;
|
|
|
|
//TODO: Effect
|
|
sourceChara->getAsPlayer()->dyeItemFromDyeingInfo();
|
|
}
|
|
};
|
|
|
|
EXPOSE_SCRIPT(ActionDye2472); |