Skip to content

Commit

Permalink
Merge pull request #518 from NotAdam/develop
Browse files Browse the repository at this point in the history
#472 - fix gc ranks being read incorrectly in examine packet
  • Loading branch information
SapphireMordred authored Feb 1, 2019
2 parents 412202c + 3161579 commit 7db1d54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/world/Network/PacketWrappers/ExaminePacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7db1d54

Please sign in to comment.