1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 06:47:45 +00:00

Fixed an error with accessing aetheryteList and some minor refactoring

This commit is contained in:
Mordred 2017-12-07 23:59:03 +01:00
parent 3d8acf651f
commit 86fd30b4e1
2 changed files with 17 additions and 18 deletions

View file

@ -840,7 +840,7 @@ uint64_t Core::Entity::Player::getModelSystemWeapon() const
int8_t Core::Entity::Player::getAetheryteMaskAt( uint8_t index ) const
{
if( index > 11 )
if( index > sizeof( m_aetheryte ) )
return 0;
return m_aetheryte[index];
}
@ -953,10 +953,8 @@ bool Core::Entity::Player::actionHasCastTime( uint32_t actionId ) //TODO: Add lo
if( actionInfoPtr->is_instant )
return false;
if( actionInfoPtr->cast_time == 0 )
return false;
return actionInfoPtr->cast_time != 0;
return true;
}
bool Core::Entity::Player::hasStateFlag( Core::Common::PlayerStateFlag flag ) const

View file

@ -113,7 +113,8 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
{
targetActor = pPlayer;
}
else {
else
{
auto inRange = pPlayer->getInRangeActors();
for( auto actor : inRange )
{