1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 10:17:46 +00:00

#472 - fix gc ranks being read incorrectly in examine packet

This commit is contained in:
NotAdam 2019-02-01 14:01:33 +11:00
parent 412202cc0b
commit 3161579a56

View file

@ -40,7 +40,11 @@ namespace Sapphire::Network::Packets::Server
m_data.titleId = pTarget->getTitle(); m_data.titleId = pTarget->getTitle();
m_data.grandCompany = pTarget->getGc(); m_data.grandCompany = pTarget->getGc();
m_data.grandCompanyRank = pTarget->getGcRankArray()[m_data.grandCompany];
// gc id 0 is no gc, but we only store ranks for 3
// gc id 3 is immortal flames, but they're at index 2 not 3, so we need to correct for that if we have a gc set
if( m_data.grandCompany > 0 )
m_data.grandCompanyRank = pTarget->getGcRankArray()[ m_data.grandCompany - 1 ];
m_data.mainWeaponModel = pTarget->getModelMainWeapon(); m_data.mainWeaponModel = pTarget->getModelMainWeapon();
m_data.secWeaponModel = pTarget->getModelSubWeapon(); m_data.secWeaponModel = pTarget->getModelSubWeapon();