mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 05:57:45 +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,
|
||||
};
|
||||
|
||||
struct ServerEntry
|
||||
/*! ModelType as found in eventsystemdefine.exd */
|
||||
enum ModelType : uint8_t
|
||||
{
|
||||
uint32_t serverId;
|
||||
uint32_t flags;
|
||||
Human = 1,
|
||||
DemiHuman = 2,
|
||||
Monster = 3,
|
||||
SharedGroup = 4,
|
||||
Parts = 5
|
||||
};
|
||||
|
||||
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 */
|
||||
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 */
|
||||
bool Core::Entity::Actor::isMob() const
|
||||
{
|
||||
return m_type == ActorType::BattleNpc;
|
||||
return m_objKind == ObjKind::BattleNpc;
|
||||
}
|
||||
|
||||
/*! \return list of actors currently in range */
|
||||
|
|
|
@ -20,21 +20,23 @@ namespace Entity {
|
|||
class Actor : public boost::enable_shared_from_this< Actor >
|
||||
{
|
||||
public:
|
||||
enum ActorType : uint8_t
|
||||
enum ObjKind : uint8_t
|
||||
{
|
||||
None = 0x00,
|
||||
Player = 0x01,
|
||||
BattleNpc = 0x02,
|
||||
EventNpc = 0x03,
|
||||
unk1 = 0x04,
|
||||
AetheryteNpc = 0x05,
|
||||
ResourceNode = 0x06,
|
||||
Treasure = 0x04,
|
||||
Aetheryte = 0x05,
|
||||
GatheringPoint = 0x06,
|
||||
EventObj = 0x07,
|
||||
Mount = 0x08,
|
||||
Minion = 0x09,
|
||||
Companion = 0x09,
|
||||
Retainer = 0x0A,
|
||||
unk2 = 0x0B,
|
||||
Furniture = 0x0C,
|
||||
Area = 0x0B,
|
||||
Housing = 0x0C,
|
||||
Cutscene = 0x0D,
|
||||
CardStand = 0x0E,
|
||||
};
|
||||
|
||||
enum Stance : uint8_t
|
||||
|
@ -125,7 +127,7 @@ protected:
|
|||
/*! Id of the actor */
|
||||
uint32_t m_id;
|
||||
/*! Type of the actor */
|
||||
ActorType m_type;
|
||||
ObjKind m_objKind;
|
||||
/*! Ptr to the ZoneObj the actor belongs to */
|
||||
ZonePtr m_pCurrentZone;
|
||||
/*! Last tick time for the actor ( in ms ) */
|
||||
|
|
|
@ -29,7 +29,7 @@ uint32_t Core::Entity::BattleNpc::m_nextID = 1149241694;
|
|||
Core::Entity::BattleNpc::BattleNpc()
|
||||
{
|
||||
m_id = 0;
|
||||
m_type = ActorType::BattleNpc;
|
||||
m_objKind = ObjKind::BattleNpc;
|
||||
m_status = ActorStatus::Idle;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ Core::Entity::BattleNpc::BattleNpc( uint32_t modelId, uint32_t nameid, const Com
|
|||
m_pos = spawnPos;
|
||||
m_posOrigin = spawnPos;
|
||||
|
||||
m_type = ActorType::BattleNpc;
|
||||
m_objKind = ObjKind::BattleNpc;
|
||||
|
||||
m_mode = MODE_IDLE;
|
||||
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_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().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 );
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ Core::Entity::Player::Player() :
|
|||
m_mount( 0 )
|
||||
{
|
||||
m_id = 0;
|
||||
m_type = ActorType::Player;
|
||||
m_objKind = ObjKind::Player;
|
||||
m_currentStance = Stance::Passive;
|
||||
m_onlineStatus = 0;
|
||||
m_queuedZoneing = nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue