Skip to content

Commit

Permalink
SapphireServer#472 - fix gc ranks being read incorrectly in examine p…
Browse files Browse the repository at this point in the history
…acket
  • Loading branch information
NotAdam committed Feb 1, 2019
1 parent 412202c commit 3161579
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 3161579

Please sign in to comment.