mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
Fixed an error with accessing aetheryteList and some minor refactoring
This commit is contained in:
parent
3d8acf651f
commit
86fd30b4e1
2 changed files with 17 additions and 18 deletions
|
@ -840,7 +840,7 @@ uint64_t Core::Entity::Player::getModelSystemWeapon() const
|
||||||
|
|
||||||
int8_t Core::Entity::Player::getAetheryteMaskAt( uint8_t index ) const
|
int8_t Core::Entity::Player::getAetheryteMaskAt( uint8_t index ) const
|
||||||
{
|
{
|
||||||
if( index > 11 )
|
if( index > sizeof( m_aetheryte ) )
|
||||||
return 0;
|
return 0;
|
||||||
return m_aetheryte[index];
|
return m_aetheryte[index];
|
||||||
}
|
}
|
||||||
|
@ -953,10 +953,8 @@ bool Core::Entity::Player::actionHasCastTime( uint32_t actionId ) //TODO: Add lo
|
||||||
if( actionInfoPtr->is_instant )
|
if( actionInfoPtr->is_instant )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( actionInfoPtr->cast_time == 0 )
|
return actionInfoPtr->cast_time != 0;
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Core::Entity::Player::hasStateFlag( Core::Common::PlayerStateFlag flag ) const
|
bool Core::Entity::Player::hasStateFlag( Core::Common::PlayerStateFlag flag ) const
|
||||||
|
|
|
@ -113,7 +113,8 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
|
||||||
{
|
{
|
||||||
targetActor = pPlayer;
|
targetActor = pPlayer;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
auto inRange = pPlayer->getInRangeActors();
|
auto inRange = pPlayer->getInRangeActors();
|
||||||
for( auto actor : inRange )
|
for( auto actor : inRange )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue