@@ -845,16 +845,19 @@ end
845
845
846
846
function PVP :FindPotentialAllies ()
847
847
local currentTime = GetFrameTimeMilliseconds ()
848
+ local showPlayerNotes = self .SV .showPlayerNotes
849
+ local showFriends = self .SV .showFriends
850
+ local showGuildMates = self .SV .showGuildMates
848
851
849
852
for k , v in pairs (self .idToName ) do
850
853
local playerDbRecord = self .SV .playersDB [v ]
851
854
if playerDbRecord then
852
855
local isCool = self :FindAccInCOOL (v , playerDbRecord .unitAccName )
853
856
local isPlayerGrouped = IsPlayerInGroup (v )
854
- local playerNote = self . SV . showPlayerNotes and self .SV .playerNotes [playerDbRecord .unitAccName ] or nil
855
- local hasPlayerNote = (playerNote ~= nil ) and (playerNote ~= " " )
856
- local isFriend = self . SV . showFriends and IsFriend (v ) or false
857
- local isGuildmate = self . SV . showGuildMates and IsGuildMate (v ) or false
857
+ local playerNote = showPlayerNotes and self .SV .playerNotes [playerDbRecord .unitAccName ] or nil
858
+ local hasPlayerNote = showPlayerNotes and (playerNote ~= nil ) and (playerNote ~= " " )
859
+ local isFriend = showFriends and IsFriend (v ) or false
860
+ local isGuildmate = showGuildMates and IsGuildMate (v ) or false
858
861
if hasPlayerNote or ((not isPlayerGrouped ) and (isCool or isFriend or isGuildmate )) then
859
862
self .potentialAllies [v ] = {
860
863
currentTime = currentTime ,
@@ -877,17 +880,17 @@ function PVP:FindPotentialAllies()
877
880
if playerDbRecord then
878
881
local isPlayerGrouped = IsPlayerInGroup (k )
879
882
local isCool = self :FindAccInCOOL (k , playerDbRecord .unitAccName )
880
- local playerNote = self . SV . showPlayerNotes and self .SV .playerNotes [playerDbRecord .unitAccName ] or nil
881
- local hasPlayerNote = (playerNote ~= nil ) and (playerNote ~= " " )
883
+ local playerNote = showPlayerNotes and self .SV .playerNotes [playerDbRecord .unitAccName ] or nil
884
+ local hasPlayerNote = showPlayerNotes and (playerNote ~= nil ) and (playerNote ~= " " )
882
885
local isFriend = showFriends and IsFriend (v ) or false
883
- local isGuildmate = self . SV . showGuildMates and IsGuildMate (v ) or false
886
+ local isGuildmate = showGuildMates and IsGuildMate (v ) or false
884
887
if hasPlayerNote or ((not isPlayerGrouped ) and (isCool or isFriend or isGuildmate )) then
885
888
self .potentialAllies [k ] = {
886
889
currentTime = currentTime ,
887
890
unitAccName = playerDbRecord .unitAccName ,
888
891
unitAlliance = playerDbRecord .unitAlliance ,
889
892
isPlayerGrouped = isPlayerGrouped ,
890
- isFriend = self . SV . showFriends and isFriend ,
893
+ isFriend = isFriend ,
891
894
isGuildmate = isGuildmate ,
892
895
isCool = isCool ,
893
896
playerNote = hasPlayerNote and playerNote or nil ,
0 commit comments