2019-02-03 19:38:04 +11:00
|
|
|
#ifndef SAPPHIRE_ACTIONMGR_H
|
|
|
|
#define SAPPHIRE_ACTIONMGR_H
|
|
|
|
|
|
|
|
#include "BaseManager.h"
|
2019-02-03 19:57:04 +11:00
|
|
|
#include "ForwardsZone.h"
|
2019-02-03 19:38:04 +11:00
|
|
|
|
2019-02-09 14:45:22 +11:00
|
|
|
namespace Sapphire::Data
|
|
|
|
{
|
2019-02-09 15:39:05 +11:00
|
|
|
struct Action;
|
2019-02-09 14:45:22 +11:00
|
|
|
using ActionPtr = std::shared_ptr< Action >;
|
2019-02-09 21:48:42 +11:00
|
|
|
|
|
|
|
struct ItemAction;
|
|
|
|
using ItemActionPtr = std::shared_ptr< ItemAction >;
|
2019-02-09 14:45:22 +11:00
|
|
|
}
|
|
|
|
|
2019-02-03 19:38:04 +11:00
|
|
|
namespace Sapphire::World::Manager
|
|
|
|
{
|
|
|
|
class ActionMgr : public Manager::BaseManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit ActionMgr( FrameworkPtr pFw );
|
|
|
|
~ActionMgr() = default;
|
|
|
|
|
2019-02-09 19:26:31 +11:00
|
|
|
void handleTargetedPlayerAction( Entity::Player& player, uint32_t actionId,
|
2019-07-26 20:28:01 +10:00
|
|
|
Data::ActionPtr actionData, uint64_t targetId, uint16_t sequence );
|
2019-04-28 23:34:43 +02:00
|
|
|
void handlePlacedPlayerAction( Entity::Player& player, uint32_t actionId,
|
2019-07-26 20:28:01 +10:00
|
|
|
Data::ActionPtr actionData, Common::FFXIVARR_POSITION3 pos, uint16_t sequence );
|
2019-02-09 15:39:05 +11:00
|
|
|
|
2019-02-10 19:50:28 +11:00
|
|
|
void handleItemAction( Entity::Player& player, uint32_t itemId, Data::ItemActionPtr itemActionData,
|
|
|
|
uint16_t itemSourceSlot, uint16_t itemSourceContainer );
|
2019-02-09 19:26:31 +11:00
|
|
|
|
2019-02-09 15:39:05 +11:00
|
|
|
private:
|
|
|
|
void bootstrapAction( Entity::Player& player, Action::ActionPtr currentAction, Data::Action& actionData );
|
2019-02-09 21:48:42 +11:00
|
|
|
|
|
|
|
// item action handlers
|
|
|
|
void handleItemActionVFX( Entity::Player& player, uint32_t itemId, uint16_t vfxId );
|
2019-02-03 19:38:04 +11:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SAPPHIRE_ACTIONMGR_H
|