1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 02:07:46 +00:00
sapphire/src/world/Manager/ActionMgr.h
2023-03-12 00:39:46 +09:00

47 lines
1.6 KiB
C++

#ifndef SAPPHIRE_ACTIONMGR_H
#define SAPPHIRE_ACTIONMGR_H
#include "ForwardsZone.h"
namespace Sapphire::Data
{
struct Action;
using ActionPtr = std::shared_ptr< Action >;
struct ItemAction;
using ItemActionPtr = std::shared_ptr< ItemAction >;
struct EventItem;
using EventItemPtr = std::shared_ptr< EventItem >;
}
namespace Sapphire::World::Manager
{
class ActionMgr
{
public:
ActionMgr() = default;
~ActionMgr() = default;
void handleTargetedAction( Entity::Chara& chara, uint32_t actionId,
Data::ActionPtr actionData, uint64_t targetId, uint16_t sequence );
void handlePlacedAction( Entity::Chara& chara, uint32_t actionId,
Data::ActionPtr actionData, Common::FFXIVARR_POSITION3 pos, uint16_t sequence );
void handleItemAction( Entity::Player& player, uint32_t itemId, Data::ItemActionPtr itemActionData,
uint16_t itemSourceSlot, uint16_t itemSourceContainer );
void handleEventItemAction( Entity::Player& player, uint32_t itemId, Data::EventItemPtr itemActionData, uint32_t sequence, uint64_t targetId );
void handleMountAction( Entity::Player& player, uint16_t mountId,
Data::ActionPtr actionData, uint64_t targetId, uint16_t sequence );
private:
void bootstrapAction( Entity::Chara& chara, Action::ActionPtr currentAction, Data::Action& actionData );
// item action handlers
void handleItemActionVFX( Entity::Player& player, uint32_t itemId, uint16_t vfxId );
};
}
#endif //SAPPHIRE_ACTIONMGR_H