1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-04 01:37:47 +00:00

Merge pull request #518 from NotAdam/develop

#472 - fix gc ranks being read incorrectly in examine packet
This commit is contained in:
Mordred 2019-02-01 15:15:14 +01:00 committed by GitHub
commit 7db1d54fcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,11 @@ namespace Sapphire::Network::Packets::Server
m_data.titleId = pTarget->getTitle();
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.secWeaponModel = pTarget->getModelSubWeapon();