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

33 lines
1,013 B
C
Raw Normal View History

#ifndef SAPPHIRE_ACTIONMGR_H
#define SAPPHIRE_ACTIONMGR_H
#include "BaseManager.h"
#include "ForwardsZone.h"
namespace Sapphire::Data
{
struct Action;
using ActionPtr = std::shared_ptr< Action >;
}
namespace Sapphire::World::Manager
{
class ActionMgr : public Manager::BaseManager
{
public:
explicit ActionMgr( FrameworkPtr pFw );
~ActionMgr() = default;
void handleTargetedPlayerAction( Entity::Player& player, uint8_t type, uint32_t actionId,
Data::ActionPtr actionData, uint64_t targetId );
void handleAoEPlayerAction( Entity::Player& player, uint8_t type, uint32_t actionId,
Data::ActionPtr actionData, Common::FFXIVARR_POSITION3 pos );
private:
void bootstrapAction( Entity::Player& player, Action::ActionPtr currentAction, Data::Action& actionData );
bool canPlayerUseAction( Entity::Player& player, Action::Action& currentAction, Data::Action& actionData );
};
}
#endif //SAPPHIRE_ACTIONMGR_H