1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 22:17:45 +00:00

Some cleanups in preperation for bnpcs

This commit is contained in:
Mordred 2018-08-28 00:17:51 +02:00
parent 0b08f535c6
commit c3e715128f
8 changed files with 34 additions and 35 deletions

View file

@ -44,6 +44,25 @@ namespace Common {
French = 8 French = 8
}; };
enum ObjKind : uint8_t
{
None = 0x00,
Player = 0x01,
BattleNpc = 0x02,
EventNpc = 0x03,
Treasure = 0x04,
Aetheryte = 0x05,
GatheringPoint = 0x06,
EventObj = 0x07,
MountType = 0x08,
Companion = 0x09, // this probably actually means minion
Retainer = 0x0A,
Area = 0x0B,
Housing = 0x0C,
Cutscene = 0x0D,
CardStand = 0x0E,
};
enum GearSetSlot : uint8_t enum GearSetSlot : uint8_t
{ {
MainHand = 0, MainHand = 0,
@ -308,7 +327,7 @@ namespace Common {
enum MoveState : uint8_t enum MoveState : uint8_t
{ {
None = 0x00, No = 0x00,
Land = 0x02, Land = 0x02,
Fall = 0x04, Fall = 0x04,
}; };

View file

@ -421,7 +421,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket<PlayerSpawn>
uint8_t spawnIndex; uint8_t spawnIndex;
uint8_t state; uint8_t state;
uint8_t persistentEmote; uint8_t persistentEmote;
uint8_t modelType; // modelType -> eventSystemDefine uint8_t modelType;
uint8_t subtype; uint8_t subtype;
uint8_t voice; uint8_t voice;
uint16_t u25c; uint16_t u25c;

@ -1 +1 @@
Subproject commit 8c260396dde22977cbee4af537757427d2049ee2 Subproject commit 61712f8f11892d12ad6878a80b9b89b318908558

View file

@ -50,7 +50,7 @@ void Core::Entity::Actor::setId( uint32_t id )
m_id = id; m_id = id;
} }
Core::Entity::Actor::ObjKind Core::Entity::Actor::getObjKind() const Core::Common::ObjKind Core::Entity::Actor::getObjKind() const
{ {
return m_objKind; return m_objKind;
} }

View file

@ -19,26 +19,6 @@ namespace Entity {
*/ */
class Actor : public boost::enable_shared_from_this< Actor > class Actor : public boost::enable_shared_from_this< Actor >
{ {
public:
enum ObjKind : uint8_t
{
None = 0x00,
Player = 0x01,
BattleNpc = 0x02,
EventNpc = 0x03,
Treasure = 0x04,
Aetheryte = 0x05,
GatheringPoint = 0x06,
EventObj = 0x07,
Mount = 0x08,
Companion = 0x09, // this probably actually means minion
Retainer = 0x0A,
Area = 0x0B,
Housing = 0x0C,
Cutscene = 0x0D,
CardStand = 0x0E,
};
protected: protected:
/*! Position of the object */ /*! Position of the object */
@ -48,7 +28,7 @@ namespace Entity {
/*! Id of the actor */ /*! Id of the actor */
uint32_t m_id; uint32_t m_id;
/*! Type of the actor */ /*! Type of the actor */
ObjKind m_objKind; Common::ObjKind m_objKind;
/*! Id of the zone the actor currently is in */ /*! Id of the zone the actor currently is in */
uint32_t m_zoneId; uint32_t m_zoneId;
/*! Ptr to the ZoneObj the actor belongs to */ /*! Ptr to the ZoneObj the actor belongs to */
@ -62,7 +42,7 @@ namespace Entity {
Core::Cell* m_pCell; Core::Cell* m_pCell;
public: public:
explicit Actor( ObjKind type ); explicit Actor( Common::ObjKind type );
virtual ~Actor() {}; virtual ~Actor() {};
virtual void spawn( PlayerPtr pTarget ) {} virtual void spawn( PlayerPtr pTarget ) {}
@ -71,7 +51,7 @@ namespace Entity {
uint32_t getId() const; uint32_t getId() const;
void setId( uint32_t id ); void setId( uint32_t id );
ObjKind getObjKind() const; Common::ObjKind getObjKind() const;
Common::FFXIVARR_POSITION3& getPos(); Common::FFXIVARR_POSITION3& getPos();
void setPos( const Common::FFXIVARR_POSITION3& pos ); void setPos( const Common::FFXIVARR_POSITION3& pos );

View file

@ -763,7 +763,7 @@ bool Core::Entity::Chara::hasStatusEffect( uint32_t id )
return false; return false;
} }
Chara::ModelType Chara::getModelType() const Core::Common::ObjKind Chara::getModelType() const
{ {
return m_modelType; return m_modelType;
} }

View file

@ -141,7 +141,7 @@ protected:
/*! Invincibility type */ /*! Invincibility type */
Common::InvincibilityType m_invincibilityType; Common::InvincibilityType m_invincibilityType;
/*! Type of model to use, humanoid for actors that use look data */ /*! Type of model to use, humanoid for actors that use look data */
ModelType m_modelType; Common::ObjKind m_modelType;
/*! Status effects */ /*! Status effects */
const uint8_t MAX_STATUS_EFFECTS = 30; const uint8_t MAX_STATUS_EFFECTS = 30;
@ -150,7 +150,7 @@ protected:
std::map< uint8_t, StatusEffect::StatusEffectPtr > m_statusEffectMap; std::map< uint8_t, StatusEffect::StatusEffectPtr > m_statusEffectMap;
public: public:
Chara( ObjKind type ); Chara( Common::ObjKind type );
virtual ~Chara() override; virtual ~Chara() override;
@ -199,7 +199,7 @@ public:
Common::ClassJob getClass() const; Common::ClassJob getClass() const;
ModelType getModelType() const; Common::ObjKind getModelType() const;
uint8_t getClassAsInt() const; uint8_t getClassAsInt() const;

View file

@ -83,7 +83,7 @@ Core::Entity::Player::Player() :
m_queuedZoneing = nullptr; m_queuedZoneing = nullptr;
m_status = ActorStatus::Idle; m_status = ActorStatus::Idle;
m_invincibilityType = InvincibilityType::InvincibilityNone; m_invincibilityType = InvincibilityType::InvincibilityNone;
m_modelType = ModelType::Human; m_modelType = ObjKind::Player;
memset( m_questTracking, 0, sizeof( m_questTracking ) ); memset( m_questTracking, 0, sizeof( m_questTracking ) );
memset( m_name, 0, sizeof( m_name ) ); memset( m_name, 0, sizeof( m_name ) );