From 3161579a56ad2ebcc7e80b232aeb2551ca42c189 Mon Sep 17 00:00:00 2001 From: NotAdam Date: Fri, 1 Feb 2019 14:01:33 +1100 Subject: [PATCH] #472 - fix gc ranks being read incorrectly in examine packet --- src/world/Network/PacketWrappers/ExaminePacket.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/world/Network/PacketWrappers/ExaminePacket.h b/src/world/Network/PacketWrappers/ExaminePacket.h index 463b884d3..4bf4645b7 100644 --- a/src/world/Network/PacketWrappers/ExaminePacket.h +++ b/src/world/Network/PacketWrappers/ExaminePacket.h @@ -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();