1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
manager . scoreSections =
{
}
manager . campaignId = 0
manager . shown = false
control : RegisterForEvent ( EVENT_CAMPAIGN_SCORE_DATA_CHANGED , function ( ) if manager . shown then manager : UpdateScores ( ) end end )
control : RegisterForEvent ( EVENT_CAMPAIGN_LEADERBOARD_DATA_RECEIVED , function ( ) if manager . shown then manager : UpdateRewardTier ( ) end end )
control : RegisterForEvent ( EVENT_KEEP_ALLIANCE_OWNER_CHANGED , function ( ) if manager . shown then manager : UpdateScores ( ) end end )
control : RegisterForEvent ( EVENT_OBJECTIVES_UPDATED , function ( ) if manager . shown then manager : UpdateScores ( ) end end )
return manager
end
end
return ( scoreInfo1 . score > scoreInfo2 . score )
end
local scoreInfos = { }
local keepScore , resourceValue , outpostValue , defensiveScrollValue , offensiveScrollValue = GetCampaignHoldingScoreValues ( self . campaignId )
for i = 1 , NUM_ALLIANCES do
local numDefensiveScrolls = GetTotalCampaignHoldings ( self . campaignId , HOLDINGTYPE_DEFENSIVE_ARTIFACT , i )
local numOffensiveScrolls = GetTotalCampaignHoldings ( self . campaignId , HOLDINGTYPE_OFFENSIVE_ARTIFACT , i )
scoreInfos [ i ] =
{
alliance = i ,
score = score ,
numKeeps = numKeeps ,
numResources = numResources ,
numOutposts = numOutposts ,
numScrolls = numDefensiveScrolls + numOffensiveScrolls ,
potentialScore = potentialScore ,
isUnderdog = underdogLeaderAlliance ~= 0 and underdogLeaderAlliance ~= i ,
isUnderpop = isUnderpop ,
}
end
for i = 1 , # scoreInfos do
end
end
local currentTier , nextTierProgress , nextTierTotal = GetPlayerCampaignRewardTierInfo ( self . campaignId )
end
local ALLIANCE_SCORING_INFO =
{
[ ALLIANCE_ALDMERI_DOMINION ] =
{
bgLeft = "EsoUI/Art/Campaign/overview_scoringBG_aldmeri_left.dds" ,
bgRight = "EsoUI/Art/Campaign/overview_scoringBG_aldmeri_right.dds" ,
keepIcon = "EsoUI/Art/Campaign/overview_keepIcon_aldmeri.dds" ,
outpostIcon = "EsoUI/Art/Campaign/overview_outpostIcon_aldmeri.dds" ,
resourcesIcon = "EsoUI/Art/Campaign/overview_resourcesIcon_aldmeri.dds" ,
scrollIcon = "EsoUI/Art/Campaign/overview_scrollIcon_aldmeri.dds" ,
} ,
[ ALLIANCE_DAGGERFALL_COVENANT ] =
{
bgLeft = "EsoUI/Art/Campaign/overview_scoringBG_daggerfall_left.dds" ,
bgRight = "EsoUI/Art/Campaign/overview_scoringBG_daggerfall_right.dds" ,
keepIcon = "EsoUI/Art/Campaign/overview_keepIcon_daggefall.dds" ,
outpostIcon = "EsoUI/Art/Campaign/overview_outpostIcon_daggefall.dds" ,
resourcesIcon = "EsoUI/Art/Campaign/overview_resourcesIcon_daggefall.dds" ,
scrollIcon = "EsoUI/Art/Campaign/overview_scrollIcon_daggefall.dds" ,
} ,
[ ALLIANCE_EBONHEART_PACT ] =
{
bgLeft = "EsoUI/Art/Campaign/overview_scoringBG_ebonheart_left.dds" ,
bgRight = "EsoUI/Art/Campaign/overview_scoringBG_ebonheart_right.dds" ,
keepIcon = "EsoUI/Art/Campaign/overview_keepIcon_ebonheart.dds" ,
outpostIcon = "EsoUI/Art/Campaign/overview_outpostIcon_ebonheart.dds" ,
resourcesIcon = "EsoUI/Art/Campaign/overview_resourcesIcon_ebonheart.dds" ,
scrollIcon = "EsoUI/Art/Campaign/overview_scrollIcon_ebonheart.dds" ,
} ,
}
function ZO_CampaignScoringManager_Shared : UpdateBonusIconVisibilities ( initialControlAnchor , lowScoreIcon , isLowScoring , lowPopIcon , isLowPop )
if isLowScoring and isLowPop then
elseif isLowScoring then
elseif isLowPop then
end
end
local allianceInfo = ALLIANCE_SCORING_INFO [ scoreInfo . alliance ]
scoreSection . potentialPoints : SetText ( zo_strformat ( SI_CAMPAIGN_SCORING_POTENTIAL_POINTS , scoreInfo . potentialScore ) )
self : UpdateBonusIconVisibilities ( scoreSection . potentialPoints , scoreSection . underdogScoreIcon , scoreInfo . isUnderdog , scoreSection . underdogPopIcon , scoreInfo . isUnderpop )
scoreSection . numResources : SetText ( zo_strformat ( SI_CAMPAIGN_SCORING_HOLDING , scoreInfo . numResources ) )
end
control : SetText ( ZO_FormatTime ( timeLeft , TIME_FORMAT_STYLE_COLONS , TIME_FORMAT_PRECISION_TWELVE_HOUR ) )
end
--Global XML
end |