diff --git a/src/common/Common.h b/src/common/Common.h index 9cdffed8..d48aeec3 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -44,6 +44,25 @@ namespace Common { 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 { MainHand = 0, @@ -308,7 +327,7 @@ namespace Common { enum MoveState : uint8_t { - None = 0x00, + No = 0x00, Land = 0x02, Fall = 0x04, }; diff --git a/src/common/Network/PacketDef/Zone/ServerZoneDef.h b/src/common/Network/PacketDef/Zone/ServerZoneDef.h index bf145740..7e158c2d 100644 --- a/src/common/Network/PacketDef/Zone/ServerZoneDef.h +++ b/src/common/Network/PacketDef/Zone/ServerZoneDef.h @@ -421,7 +421,7 @@ struct FFXIVIpcPlayerSpawn : FFXIVIpcBasePacket uint8_t spawnIndex; uint8_t state; uint8_t persistentEmote; - uint8_t modelType; // modelType -> eventSystemDefine + uint8_t modelType; uint8_t subtype; uint8_t voice; uint16_t u25c; diff --git a/src/libraries b/src/libraries index 8c260396..61712f8f 160000 --- a/src/libraries +++ b/src/libraries @@ -1 +1 @@ -Subproject commit 8c260396dde22977cbee4af537757427d2049ee2 +Subproject commit 61712f8f11892d12ad6878a80b9b89b318908558 diff --git a/src/servers/sapphire_zone/Actor/Actor.cpp b/src/servers/sapphire_zone/Actor/Actor.cpp index 505fa68e..dd436423 100644 --- a/src/servers/sapphire_zone/Actor/Actor.cpp +++ b/src/servers/sapphire_zone/Actor/Actor.cpp @@ -50,7 +50,7 @@ void Core::Entity::Actor::setId( uint32_t id ) m_id = id; } -Core::Entity::Actor::ObjKind Core::Entity::Actor::getObjKind() const +Core::Common::ObjKind Core::Entity::Actor::getObjKind() const { return m_objKind; } diff --git a/src/servers/sapphire_zone/Actor/Actor.h b/src/servers/sapphire_zone/Actor/Actor.h index 96fc10f8..33bc690e 100644 --- a/src/servers/sapphire_zone/Actor/Actor.h +++ b/src/servers/sapphire_zone/Actor/Actor.h @@ -19,26 +19,6 @@ namespace Entity { */ 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: /*! Position of the object */ @@ -46,13 +26,13 @@ namespace Entity { /*! Rotation of the object */ float m_rot; /*! Id of the actor */ - uint32_t m_id; + uint32_t m_id; /*! Type of the actor */ - ObjKind m_objKind; + Common::ObjKind m_objKind; /*! 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 */ - ZonePtr m_pCurrentZone; + ZonePtr m_pCurrentZone; /*! list of various actors in range */ std::set< ActorPtr > m_inRangeActor; @@ -62,7 +42,7 @@ namespace Entity { Core::Cell* m_pCell; public: - explicit Actor( ObjKind type ); + explicit Actor( Common::ObjKind type ); virtual ~Actor() {}; virtual void spawn( PlayerPtr pTarget ) {} @@ -71,7 +51,7 @@ namespace Entity { uint32_t getId() const; void setId( uint32_t id ); - ObjKind getObjKind() const; + Common::ObjKind getObjKind() const; Common::FFXIVARR_POSITION3& getPos(); void setPos( const Common::FFXIVARR_POSITION3& pos ); diff --git a/src/servers/sapphire_zone/Actor/Chara.cpp b/src/servers/sapphire_zone/Actor/Chara.cpp index b0b22153..b6407e8c 100644 --- a/src/servers/sapphire_zone/Actor/Chara.cpp +++ b/src/servers/sapphire_zone/Actor/Chara.cpp @@ -763,7 +763,7 @@ bool Core::Entity::Chara::hasStatusEffect( uint32_t id ) return false; } -Chara::ModelType Chara::getModelType() const +Core::Common::ObjKind Chara::getModelType() const { return m_modelType; } diff --git a/src/servers/sapphire_zone/Actor/Chara.h b/src/servers/sapphire_zone/Actor/Chara.h index 63abfe8b..4eba3873 100644 --- a/src/servers/sapphire_zone/Actor/Chara.h +++ b/src/servers/sapphire_zone/Actor/Chara.h @@ -141,7 +141,7 @@ protected: /*! Invincibility type */ Common::InvincibilityType m_invincibilityType; /*! Type of model to use, humanoid for actors that use look data */ - ModelType m_modelType; + Common::ObjKind m_modelType; /*! Status effects */ const uint8_t MAX_STATUS_EFFECTS = 30; @@ -150,7 +150,7 @@ protected: std::map< uint8_t, StatusEffect::StatusEffectPtr > m_statusEffectMap; public: - Chara( ObjKind type ); + Chara( Common::ObjKind type ); virtual ~Chara() override; @@ -199,7 +199,7 @@ public: Common::ClassJob getClass() const; - ModelType getModelType() const; + Common::ObjKind getModelType() const; uint8_t getClassAsInt() const; diff --git a/src/servers/sapphire_zone/Actor/Player.cpp b/src/servers/sapphire_zone/Actor/Player.cpp index 095b4990..9ff6632d 100644 --- a/src/servers/sapphire_zone/Actor/Player.cpp +++ b/src/servers/sapphire_zone/Actor/Player.cpp @@ -83,7 +83,7 @@ Core::Entity::Player::Player() : m_queuedZoneing = nullptr; m_status = ActorStatus::Idle; m_invincibilityType = InvincibilityType::InvincibilityNone; - m_modelType = ModelType::Human; + m_modelType = ObjKind::Player; memset( m_questTracking, 0, sizeof( m_questTracking ) ); memset( m_name, 0, sizeof( m_name ) );