2018-02-10 02:47:32 +11:00
|
|
|
#ifndef SAPPHIRE_INSTANCEOBJECT_H
|
|
|
|
#define SAPPHIRE_INSTANCEOBJECT_H
|
|
|
|
|
2018-02-20 22:46:44 +01:00
|
|
|
#include "Actor.h"
|
2018-02-10 02:47:32 +11:00
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
namespace Entity
|
|
|
|
{
|
2018-02-20 23:42:09 +01:00
|
|
|
class EventObject : public Actor
|
2018-02-10 02:47:32 +11:00
|
|
|
{
|
|
|
|
public:
|
2018-02-28 00:03:26 +01:00
|
|
|
EventObject( uint32_t actorId, uint32_t objectId, uint32_t mapLinkId, uint8_t initialState, Common::FFXIVARR_POSITION3 pos,
|
2018-03-04 17:41:17 +11:00
|
|
|
float rotation, const std::string& givenName = "none" );
|
2018-02-10 02:47:32 +11:00
|
|
|
|
2018-02-27 23:05:42 +11:00
|
|
|
using OnTalkEventHandler = std::function< void( Entity::Player&, Entity::EventObjectPtr, InstanceContentPtr, uint64_t ) >;
|
2018-02-27 02:13:01 +11:00
|
|
|
|
2018-02-22 18:12:36 +01:00
|
|
|
uint32_t getMapLinkId() const;
|
|
|
|
void setMapLinkId( uint32_t mapLinkId );
|
2018-02-10 02:47:32 +11:00
|
|
|
|
|
|
|
uint8_t getState() const;
|
|
|
|
void setState( uint8_t state );
|
|
|
|
|
2018-02-27 02:13:01 +11:00
|
|
|
float getScale() const;
|
|
|
|
void setScale( float scale );
|
|
|
|
|
|
|
|
void setOnTalkHandler( OnTalkEventHandler handler );
|
|
|
|
OnTalkEventHandler getOnTalkHandler() const;
|
|
|
|
|
2018-02-23 23:47:21 +01:00
|
|
|
uint32_t getObjectId() const;
|
|
|
|
|
2018-02-24 00:07:07 +01:00
|
|
|
const std::string& getName() const;
|
|
|
|
|
2018-02-10 02:47:32 +11:00
|
|
|
InstanceContentPtr getParentInstance() const;
|
|
|
|
void setParentInstance( InstanceContentPtr instance );
|
|
|
|
|
2018-02-23 23:47:21 +01:00
|
|
|
void spawn( PlayerPtr pTarget ) override;
|
|
|
|
void despawn( PlayerPtr pTarget ) override;
|
|
|
|
|
2018-02-10 02:47:32 +11:00
|
|
|
protected:
|
2018-02-11 22:57:00 +01:00
|
|
|
uint32_t m_mapLinkId;
|
2018-02-23 23:47:21 +01:00
|
|
|
uint32_t m_objectId;
|
2018-02-10 02:47:32 +11:00
|
|
|
uint8_t m_state;
|
2018-02-27 02:13:01 +11:00
|
|
|
float m_scale;
|
2018-02-24 00:07:07 +01:00
|
|
|
std::string m_name;
|
2018-02-10 02:47:32 +11:00
|
|
|
InstanceContentPtr m_parentInstance;
|
2018-02-27 02:13:01 +11:00
|
|
|
OnTalkEventHandler m_onTalkEventHandler;
|
2018-02-10 02:47:32 +11:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SAPPHIRE_INSTANCEOBJECT_H
|