Skip to content

Commit

Permalink
Fixed bug causing party related widgets to disappear if a player goes…
Browse files Browse the repository at this point in the history
… out of compass range
  • Loading branch information
3vcloud committed Jun 15, 2024
1 parent 0b8bcf1 commit cf1ca59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions GWToolboxdll/Widgets/SnapsToPartyWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ bool SnapsToPartyWindow::RecalculatePartyPositions() {
agent_health_bar = GW::UI::GetChildFrame(player_container, 0);
if (!agent_health_bar)
return false;
const auto player_agent = GW::Agents::GetPlayerByID(player.login_number);
if (!player_agent)
const auto agent_id = GW::PlayerMgr::GetPlayerAgentId(player.login_number);
if (!agent_id)
return false;
GetFramePosition(agent_health_bar, relative_to, &top_left, &bottom_right);
agent_health_bar_positions[player_agent->agent_id] = { top_left, bottom_right };
agent_health_bar_positions[agent_id] = { top_left, bottom_right };
for (auto& hero : party->heroes) {
if (hero.owner_player_id != player.login_number)
continue;
Expand Down

0 comments on commit cf1ca59

Please sign in to comment.