@@ -520,16 +520,29 @@ void CSquadMgr::Render()
520520 ImGui::TableNextColumn ();
521521 if (player.KPMEInfo != nullptr )
522522 {
523- std::string reqs = CheckRequirements (*player.KPMEInfo , this ->KPRequirement ).c_str ();
524-
525- if (!reqs.empty ())
523+ if (player.KPMEInfo ->IsInvalid == true )
526524 {
527- ImGui::TextColored (ImColor (warnCol), reqs.c_str ());
525+ ImGui::Text (" -" );
526+ if (ImGui::IsItemHovered ())
527+ {
528+ ImGui::BeginTooltip ();
529+ ImGui::Text (" This player does not have a killproof.me account or does not share it." );
530+ ImGui::EndTooltip ();
531+ }
528532 }
529533 else
530534 {
531- ImGui::RenderCheckMark (dl, ImGui::GetCursorPos () + ImGui::GetWindowPos () - ImVec2 (ImGui::GetScrollX (), ImGui::GetScrollY ()), successCol, sz);
532- ImGui::Dummy (ImVec2 (sz, sz));
535+ std::string reqs = CheckRequirements (*player.KPMEInfo , this ->KPRequirement ).c_str ();
536+
537+ if (!reqs.empty ())
538+ {
539+ ImGui::TextColored (ImColor (warnCol), reqs.c_str ());
540+ }
541+ else
542+ {
543+ ImGui::RenderCheckMark (dl, ImGui::GetCursorPos () + ImGui::GetWindowPos () - ImVec2 (ImGui::GetScrollX (), ImGui::GetScrollY ()), successCol, sz);
544+ ImGui::Dummy (ImVec2 (sz, sz));
545+ }
533546 }
534547 }
535548 else
@@ -768,6 +781,11 @@ void CSquadMgr::GetKPData(PlayerInfo_t& aPlayer)
768781 {
769782 json response = json::parse (result);
770783
784+ if (!response.is_null () && !response[" error" ].is_null ())
785+ {
786+ kpmeInfo->IsInvalid = response[" error" ].get <std::string>() == " Account not found" ;
787+ }
788+
771789 if (!response.is_null () && !response[" linked_totals" ].is_null ())
772790 {
773791 response = response[" linked_totals" ];
@@ -823,9 +841,9 @@ void CSquadMgr::GetKPData(PlayerInfo_t& aPlayer)
823841 {
824842 case 88485 : kpmeInfo->Raids .LI += kp[" amount" ].get <int >(); break ;
825843 case 77302 : kpmeInfo->Raids .LI += kp[" amount" ].get <int >(); break ;
826- case 94020 : kpmeInfo->Fractals .UFE = kp[" amount" ].get <int >(); break ;
827- case 81743 : kpmeInfo->Fractals .UFE = kp[" amount" ].get <int >(); break ;
828- case 93781 : kpmeInfo->Strikes .IBS_BoneskinnerVial = kp[" amount" ].get <int >(); break ;
844+ case 94020 : kpmeInfo->Fractals .UFE + = kp[" amount" ].get <int >(); break ;
845+ case 81743 : kpmeInfo->Fractals .UFE + = kp[" amount" ].get <int >() * 5 ; break ;
846+ case 93781 : kpmeInfo->Strikes .IBS_BoneskinnerVial + = kp[" amount" ].get <int >(); break ;
829847 }
830848 }
831849 }
0 commit comments