2020-03-14 00:31:14 -07:00
|
|
|
#include <ScriptObject.h>
|
|
|
|
#include <Actor/Player.h>
|
|
|
|
#include <Action/Action.h>
|
|
|
|
#include <Inventory/Item.h>
|
|
|
|
|
2023-03-05 23:27:35 +01:00
|
|
|
class ActionDye2472 : public Sapphire::ScriptAPI::ActionScript
|
2020-03-14 00:31:14 -07:00
|
|
|
{
|
|
|
|
public:
|
2023-03-05 23:27:35 +01:00
|
|
|
ActionDye2472() : Sapphire::ScriptAPI::ActionScript( 2472 )
|
2020-03-14 00:31:14 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void onExecute( Sapphire::World::Action::Action& action ) override
|
|
|
|
{
|
|
|
|
auto sourceChara = action.getSourceChara();
|
|
|
|
|
|
|
|
if( !sourceChara->isPlayer() )
|
|
|
|
return;
|
|
|
|
|
|
|
|
//TODO: Effect
|
|
|
|
sourceChara->getAsPlayer()->dyeItemFromDyeingInfo();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
EXPOSE_SCRIPT(ActionDye2472);
|