2021-11-27 00:53:57 +01:00
|
|
|
#pragma once
|
2019-06-02 20:45:18 +10:00
|
|
|
|
|
|
|
#include "Action.h"
|
2021-11-27 00:53:57 +01:00
|
|
|
#include <Exd/Structs.h>
|
2019-06-02 20:45:18 +10:00
|
|
|
|
|
|
|
namespace Sapphire::Data
|
|
|
|
{
|
|
|
|
struct ItemAction;
|
|
|
|
using ItemActionPtr = std::shared_ptr< ItemAction >;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Sapphire::World::Action
|
|
|
|
{
|
|
|
|
class ItemAction : public Action
|
|
|
|
{
|
|
|
|
public:
|
2021-11-27 00:53:57 +01:00
|
|
|
ItemAction( Entity::CharaPtr source, uint32_t itemId, std::shared_ptr< Component::Excel::ExcelStruct< Component::Excel::ItemAction > > itemActionData,
|
2020-03-01 01:00:57 +11:00
|
|
|
uint16_t itemSourceSlot, uint16_t itemSourceContainer );
|
2019-06-02 20:45:18 +10:00
|
|
|
virtual ~ItemAction() = default;
|
|
|
|
|
|
|
|
void start() override;
|
|
|
|
|
|
|
|
void execute() override;
|
|
|
|
|
|
|
|
void interrupt() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void handleVFXItem();
|
|
|
|
|
2022-01-16 22:48:55 +01:00
|
|
|
void handleMountItem();
|
|
|
|
|
2019-06-02 20:45:18 +10:00
|
|
|
private:
|
2021-11-27 00:53:57 +01:00
|
|
|
std::shared_ptr< Component::Excel::ExcelStruct< Component::Excel::ItemAction > > m_itemAction;
|
2019-06-02 20:45:18 +10:00
|
|
|
|
|
|
|
uint16_t m_itemSourceSlot;
|
|
|
|
uint16_t m_itemSourceContainer;
|
|
|
|
};
|
2021-11-27 00:53:57 +01:00
|
|
|
}
|