1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-14 14:37:45 +00:00
sapphire/src/world/Manager/ActionMgr.h

48 lines
1.8 KiB
C
Raw Normal View History

#pragma once
#include "ForwardsZone.h"
#include <Exd/Structs.h>
namespace Sapphire::Data
{
struct Action;
using ActionPtr = std::shared_ptr< Action >;
2019-02-09 21:48:42 +11:00
struct ItemAction;
using ItemActionPtr = std::shared_ptr< ItemAction >;
}
namespace Sapphire::World::Manager
{
2020-03-01 01:00:57 +11:00
class ActionMgr
{
public:
2020-03-01 01:00:57 +11:00
ActionMgr() = default;
~ActionMgr() = default;
2023-01-27 05:23:13 +01:00
bool cacheActionLut();
2019-02-09 19:26:31 +11:00
void handleTargetedPlayerAction( Entity::Player& player, uint32_t actionId,
2022-01-27 21:24:54 +01:00
std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData, uint64_t targetId, uint16_t sequence );
2019-04-28 23:34:43 +02:00
void handlePlacedPlayerAction( Entity::Player& player, uint32_t actionId,
2022-01-27 21:24:54 +01:00
std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData, Common::FFXIVARR_POSITION3 pos, uint16_t sequence );
void handleItemAction( Entity::Player& player, uint32_t itemId,
2022-01-27 21:24:54 +01:00
std::shared_ptr< Excel::ExcelStruct< Excel::ItemAction > > itemActionData,
uint16_t itemSourceSlot, uint16_t itemSourceContainer );
2019-02-09 19:26:31 +11:00
void handleEventItemAction( Entity::Player& player, uint32_t itemId,
2022-01-27 21:24:54 +01:00
std::shared_ptr< Excel::ExcelStruct< Excel::EventItem > > itemActionData, uint32_t sequence, uint64_t targetId );
2020-01-23 22:43:16 +09:00
void handleMountAction( Entity::Player& player, uint16_t mountId,
2022-01-27 21:24:54 +01:00
std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData, uint64_t targetId, uint16_t sequence );
2020-01-23 22:36:01 +09:00
bool actionHasCastTime( uint32_t actionId );
private:
2022-01-27 21:24:54 +01:00
void bootstrapAction( Entity::Player& player, Action::ActionPtr currentAction, std::shared_ptr< Excel::ExcelStruct< Excel::Action > > actionData );
2019-02-09 21:48:42 +11:00
// item action handlers
void handleItemActionVFX( Entity::Player& player, uint32_t itemId, uint16_t vfxId );
};
2023-01-27 05:23:13 +01:00
}