mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
renamed type in actors to ObjKind as thats what it is called internally, also less ambugious to modelType which i also added an enum for
This commit is contained in:
parent
86cb3ace56
commit
c65658e47b
5 changed files with 24 additions and 18 deletions
|
@ -802,10 +802,14 @@ namespace Common {
|
||||||
MountSkill = 0xD,
|
MountSkill = 0xD,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ServerEntry
|
/*! ModelType as found in eventsystemdefine.exd */
|
||||||
|
enum ModelType : uint8_t
|
||||||
{
|
{
|
||||||
uint32_t serverId;
|
Human = 1,
|
||||||
uint32_t flags;
|
DemiHuman = 2,
|
||||||
|
Monster = 3,
|
||||||
|
SharedGroup = 4,
|
||||||
|
Parts = 5
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector< PlayerStateFlag > PlayerStateFlagList;
|
typedef std::vector< PlayerStateFlag > PlayerStateFlagList;
|
||||||
|
|
|
@ -59,13 +59,13 @@ std::string Core::Entity::Actor::getName() const
|
||||||
/*! \return true if the actor is of type player */
|
/*! \return true if the actor is of type player */
|
||||||
bool Core::Entity::Actor::isPlayer() const
|
bool Core::Entity::Actor::isPlayer() const
|
||||||
{
|
{
|
||||||
return m_type == ActorType::Player;
|
return m_objKind == ObjKind::Player;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \return true if the actor is of type mob */
|
/*! \return true if the actor is of type mob */
|
||||||
bool Core::Entity::Actor::isMob() const
|
bool Core::Entity::Actor::isMob() const
|
||||||
{
|
{
|
||||||
return m_type == ActorType::BattleNpc;
|
return m_objKind == ObjKind::BattleNpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \return list of actors currently in range */
|
/*! \return list of actors currently in range */
|
||||||
|
|
|
@ -20,21 +20,23 @@ namespace Entity {
|
||||||
class Actor : public boost::enable_shared_from_this< Actor >
|
class Actor : public boost::enable_shared_from_this< Actor >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum ActorType : uint8_t
|
enum ObjKind : uint8_t
|
||||||
{
|
{
|
||||||
None = 0x00,
|
None = 0x00,
|
||||||
Player = 0x01,
|
Player = 0x01,
|
||||||
BattleNpc = 0x02,
|
BattleNpc = 0x02,
|
||||||
EventNpc = 0x03,
|
EventNpc = 0x03,
|
||||||
unk1 = 0x04,
|
Treasure = 0x04,
|
||||||
AetheryteNpc = 0x05,
|
Aetheryte = 0x05,
|
||||||
ResourceNode = 0x06,
|
GatheringPoint = 0x06,
|
||||||
EventObj = 0x07,
|
EventObj = 0x07,
|
||||||
Mount = 0x08,
|
Mount = 0x08,
|
||||||
Minion = 0x09,
|
Companion = 0x09,
|
||||||
Retainer = 0x0A,
|
Retainer = 0x0A,
|
||||||
unk2 = 0x0B,
|
Area = 0x0B,
|
||||||
Furniture = 0x0C,
|
Housing = 0x0C,
|
||||||
|
Cutscene = 0x0D,
|
||||||
|
CardStand = 0x0E,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Stance : uint8_t
|
enum Stance : uint8_t
|
||||||
|
@ -125,7 +127,7 @@ protected:
|
||||||
/*! Id of the actor */
|
/*! Id of the actor */
|
||||||
uint32_t m_id;
|
uint32_t m_id;
|
||||||
/*! Type of the actor */
|
/*! Type of the actor */
|
||||||
ActorType m_type;
|
ObjKind m_objKind;
|
||||||
/*! Ptr to the ZoneObj the actor belongs to */
|
/*! Ptr to the ZoneObj the actor belongs to */
|
||||||
ZonePtr m_pCurrentZone;
|
ZonePtr m_pCurrentZone;
|
||||||
/*! Last tick time for the actor ( in ms ) */
|
/*! Last tick time for the actor ( in ms ) */
|
||||||
|
|
|
@ -29,7 +29,7 @@ uint32_t Core::Entity::BattleNpc::m_nextID = 1149241694;
|
||||||
Core::Entity::BattleNpc::BattleNpc()
|
Core::Entity::BattleNpc::BattleNpc()
|
||||||
{
|
{
|
||||||
m_id = 0;
|
m_id = 0;
|
||||||
m_type = ActorType::BattleNpc;
|
m_objKind = ObjKind::BattleNpc;
|
||||||
m_status = ActorStatus::Idle;
|
m_status = ActorStatus::Idle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Core::Entity::BattleNpc::BattleNpc( uint32_t modelId, uint32_t nameid, const Com
|
||||||
m_pos = spawnPos;
|
m_pos = spawnPos;
|
||||||
m_posOrigin = spawnPos;
|
m_posOrigin = spawnPos;
|
||||||
|
|
||||||
m_type = ActorType::BattleNpc;
|
m_objKind = ObjKind::BattleNpc;
|
||||||
|
|
||||||
m_mode = MODE_IDLE;
|
m_mode = MODE_IDLE;
|
||||||
m_targetId = INVALID_GAME_OBJECT_ID;
|
m_targetId = INVALID_GAME_OBJECT_ID;
|
||||||
|
@ -83,7 +83,7 @@ Core::Entity::BattleNpc::BattleNpc( uint32_t modelId, uint32_t nameid, const Com
|
||||||
|
|
||||||
m_invincibilityType = InvincibilityType::InvincibilityNone;
|
m_invincibilityType = InvincibilityType::InvincibilityNone;
|
||||||
|
|
||||||
//m_type = static_cast< Common::ActorType >( type );
|
//m_type = static_cast< Common::ObjKind >( type );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ void Core::Entity::BattleNpc::spawn( Core::Entity::PlayerPtr pTarget )
|
||||||
|
|
||||||
spawnPacket.data().rotation = Math::Util::floatToUInt16Rot( getRotation() );
|
spawnPacket.data().rotation = Math::Util::floatToUInt16Rot( getRotation() );
|
||||||
|
|
||||||
spawnPacket.data().type = static_cast< uint8_t >( m_type );
|
spawnPacket.data().type = static_cast< uint8_t >( m_objKind );
|
||||||
|
|
||||||
spawnPacket.data().state = static_cast< uint8_t >( m_status );
|
spawnPacket.data().state = static_cast< uint8_t >( m_status );
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ Core::Entity::Player::Player() :
|
||||||
m_mount( 0 )
|
m_mount( 0 )
|
||||||
{
|
{
|
||||||
m_id = 0;
|
m_id = 0;
|
||||||
m_type = ActorType::Player;
|
m_objKind = ObjKind::Player;
|
||||||
m_currentStance = Stance::Passive;
|
m_currentStance = Stance::Passive;
|
||||||
m_onlineStatus = 0;
|
m_onlineStatus = 0;
|
||||||
m_queuedZoneing = nullptr;
|
m_queuedZoneing = nullptr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue