Skip to content

Commit

Permalink
Fix Edge Case in GetNumKillLocationAllianceKills
Browse files Browse the repository at this point in the history
  • Loading branch information
ACastanza committed Aug 24, 2023
1 parent b5ed3fc commit 24b345e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions PvpAlerts_3D_System.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3785,9 +3785,14 @@ local function FindNearbyPOIs()
if distance <= adjusted_POI_MAX_DISTANCE and pinType ~= MAP_PIN_TYPE_INVALID and distance > scaleAdjustment * PVP_POI_MIN_DISTANCE then
local allianceKills = {}
for a = 1, ALLIANCE_MAX_VALUE do
allianceKills[a] = GetNumKillLocationAllianceKills(i, a)
local kills = GetNumKillLocationAllianceKills(i, a)
if kills then
allianceKills[a] = kills
else
allianceKills[a] = 0 -- or any other default value you want
end
end
local name = PVP.killLocationPintypeToName[pinType]
local name = PVP.killLocationPintypeToName[pinType]
local name_long = name ..
"\nBattle Victories:\n|cEFD13CAD " ..
allianceKills[ALLIANCE_ALDMERI_DOMINION] ..
Expand Down

0 comments on commit 24b345e

Please sign in to comment.