mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 00:27:44 +00:00
Merge pull request #288 from NotAdam/actor_rewrite
fix OnlineStatus so it'll return the one with the highest priority
This commit is contained in:
commit
b3a1254077
2 changed files with 5 additions and 4 deletions
|
@ -174,7 +174,7 @@ Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus()
|
|||
return OnlineStatus::Online;
|
||||
|
||||
uint32_t statusDisplayOrder = 0xFF14;
|
||||
uint32_t applicableStatus = 0;
|
||||
uint32_t applicableStatus = static_cast< uint32_t >( OnlineStatus::Online );
|
||||
|
||||
for( uint32_t i = 0; i < std::numeric_limits< decltype( m_onlineStatus ) >::digits; i++ )
|
||||
{
|
||||
|
@ -192,9 +192,10 @@ Core::Common::OnlineStatus Core::Entity::Player::getOnlineStatus()
|
|||
// todo: also check that the status can actually be set here, otherwise we need to ignore it (and ban the player obv)
|
||||
statusDisplayOrder = pOnlineStatus->priority;
|
||||
applicableStatus = i;
|
||||
return static_cast< OnlineStatus >( applicableStatus );
|
||||
}
|
||||
}
|
||||
|
||||
return static_cast< OnlineStatus >( applicableStatus );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setOnlineStatusMask( uint64_t status )
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <winbase.h>
|
||||
typedef HMODULE ModuleHandle;
|
||||
using ModuleHandle = HMODULE;
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
typedef void* ModuleHandle;
|
||||
using ModuleHandle = void*;
|
||||
#endif
|
||||
|
||||
namespace Core {
|
||||
|
|
Loading…
Add table
Reference in a new issue