From 62ded5af58e36fa6071ea948b62e742f14ac9ce2 Mon Sep 17 00:00:00 2001 From: AconiteX <63141077+AconiteX@users.noreply.github.com> Date: Fri, 13 Aug 2021 23:39:00 -0400 Subject: [PATCH] Fix #11 - GU 18.4 - Character - GCW Tab Display #412 --- .../shared/core/CuiStringIdsCharacterSheet.h | 4 ++ .../src/shared/page/SwgCuiCharacterSheet.cpp | 52 ++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIdsCharacterSheet.h b/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIdsCharacterSheet.h index 7b6c74126..c4fb72a83 100644 --- a/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIdsCharacterSheet.h +++ b/src/engine/client/library/clientUserInterface/src/shared/core/CuiStringIdsCharacterSheet.h @@ -23,6 +23,10 @@ namespace CuiStringIdsCharacterSheet MAKE_STRING_ID(ui_charsheet, unmarried); MAKE_STRING_ID(ui_charsheet, unknown); MAKE_STRING_ID(ui_charsheet, faction_neutral); + MAKE_STRING_ID(ui_charsheet, faction_neutral_imperialhelpercovert); + MAKE_STRING_ID(ui_charsheet, faction_neutral_imperialhelperdeclared); + MAKE_STRING_ID(ui_charsheet, faction_neutral_rebelhelpercovert); + MAKE_STRING_ID(ui_charsheet, faction_neutral_rebelhelperdeclared); MAKE_STRING_ID(ui_charsheet, faction_rebelcovert); MAKE_STRING_ID(ui_charsheet, faction_rebeldeclared); MAKE_STRING_ID(ui_charsheet, faction_rebelonleave); diff --git a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiCharacterSheet.cpp b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiCharacterSheet.cpp index f8124d52a..b77121925 100644 --- a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiCharacterSheet.cpp +++ b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiCharacterSheet.cpp @@ -1514,8 +1514,58 @@ void SwgCuiCharacterSheet::updateGcwPage() //neutral else if (PvpData::isNeutralFactionId(pvpFaction)) { - m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral.localize()); + // GU 18.4 - Display Mercenary Status on Character Sheet for Self Only + if(isExaminingSelf()) + { + const PlayerObject* po = Game::getPlayerObject(); + if(po) + { + unsigned long slotVal = 0; + const char *slots[4] = { + "covert_imperial_mercenary", + "overt_imperial_mercenary", + "covert_rebel_mercenary", + "overt_rebel_mercenary" + }; + for (unsigned i = 0; i < 4; i++) + { + po->getCollectionSlotValue(slots[i], slotVal); + if(slotVal > 0) + { + slotVal = i+1; + break; + } + } + switch(slotVal) + { + case 1: + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral_imperialhelpercovert.localize()); + break; + case 2: + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral_imperialhelperdeclared.localize()); + break; + case 3: + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral_rebelhelpercovert.localize()); + break; + case 4: + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral_rebelhelperdeclared.localize()); + break; + default: + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral.localize()); + break; + } + } + else + { + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral.localize()); + } + } + else + { + m_pvpStatus->SetText(CuiStringIdsCharacterSheet::faction_neutral.localize()); + } + // format high rank text: put highest rank at top. if ranks are equal, just put rebel at top if (highRebelRank >= highImperialRank) {