diff --git a/RelationshipsPVP.lua b/RelationshipsPVP.lua
index 44e8334..cf44d83 100644
--- a/RelationshipsPVP.lua
+++ b/RelationshipsPVP.lua
@@ -47,6 +47,17 @@ local ARENA_IDS = {
local MARKS_WIN = 3
local MARKS_LOSS = 1
+-- TurtleWoW / OctoWoW (Patch 1.18.1+) use an accumulative honor system.
+-- The value reported on the battleground scoreboard (honorGained from
+-- GetBattlefieldScore) is the old-style number, but only 10% of it is
+-- actually credited to the player as spendable Honor currency. Costs of
+-- gear/items were reduced to match. So spendable = floor(scoreboard * 0.10).
+local HONOR_SPEND_FACTOR = 0.10
+
+local function SpendableHonor(h)
+ return math.floor((h or 0) * HONOR_SPEND_FACTOR)
+end
+
local currentBG = nil
local endReported = {}
@@ -814,10 +825,10 @@ end
---------------------------------------------------------------
-- UI: build row FontStrings inside the stats panel
---------------------------------------------------------------
-local COL_X = { 14, 158, 208, 258, 308, 358, 408, 454, 500, 550, 604, 668 }
-local COL_W = { 140, 46, 46, 46, 46, 46, 46, 46, 46, 50, 60, 58 }
-local COL_J = { "LEFT", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER" }
-local COL_NAMES = { "bg", "games", "win", "draw", "loss", "ratio", "kb", "hk", "dth", "kd", "honor", "mk" }
+local COL_X = { 14, 158, 208, 258, 308, 358, 408, 454, 500, 550, 604, 664, 744 }
+local COL_W = { 140, 46, 46, 46, 46, 46, 46, 46, 46, 50, 56, 76, 56 }
+local COL_J = { "LEFT", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER", "CENTER" }
+local COL_NAMES = { "bg", "games", "win", "draw", "loss", "ratio", "kb", "hk", "dth", "kd", "honor", "spend", "mk" }
local ROW_HEIGHT = 22
local ROW_TOP = -34
@@ -827,7 +838,7 @@ local function MakeRow(panel, tag, yOff, striped)
if striped then
local bg = panel:CreateTexture("RPVPRowBG"..tag, "BACKGROUND")
bg:SetTexture(1, 1, 1, 0.04)
- bg:SetWidth(714); bg:SetHeight(ROW_HEIGHT - 2)
+ bg:SetWidth(786); bg:SetHeight(ROW_HEIGHT - 2)
bg:SetPoint("TOPLEFT", panel, "TOPLEFT", 14, yOff + 2)
end
for c = 1, table.getn(COL_NAMES) do
@@ -863,7 +874,7 @@ local function BuildStatsRows()
local totalY = ROW_TOP - n * ROW_HEIGHT - 4
local div = panel:CreateTexture("RPVPTotalDivider", "ARTWORK")
div:SetTexture(1, 1, 1, 0.25)
- div:SetWidth(714); div:SetHeight(1)
+ div:SetWidth(786); div:SetHeight(1)
div:SetPoint("TOPLEFT", panel, "TOPLEFT", 14, totalY + 2)
totalRow = MakeRow(panel, "TOTAL", totalY - 6, false)
@@ -919,6 +930,7 @@ local function FillRow(r, s)
r.dth:SetText(s.deaths)
r.kd:SetText(kd)
r.honor:SetText(FormatNumber(s.honor))
+ r.spend:SetText(FormatNumber(SpendableHonor(s.honor)))
r.mk:SetText(s.marks)
if games == 0 then
@@ -963,6 +975,7 @@ function RelationshipsPVP_Refresh()
"|cffffd200Best win streak:|r " .. totals.bestStreak
.. " |cffffd200Best KBs (single match):|r " .. totals.bestKB
.. " |cffffd200Total honor:|r " .. FormatNumber(totals.honor)
+ .. " |cffffd200Spendable honor:|r " .. FormatNumber(SpendableHonor(totals.honor))
)
end
diff --git a/RelationshipsPVP.toc b/RelationshipsPVP.toc
index 5c48fd8..05247af 100644
--- a/RelationshipsPVP.toc
+++ b/RelationshipsPVP.toc
@@ -2,7 +2,7 @@
## Title: Relationships PVP
## Notes: PvP panel with per-battleground and per-arena stats, marks, kills/deaths, honor, K/D, and queue controls. Supports the Battleground Finder and Arena on OctoWoW.
## Author: Relationship
-## Version: 1.2
+## Version: 1.3
## SavedVariablesPerCharacter: RelationshipsPVPCharDB
RelationshipsPVP.xml
diff --git a/RelationshipsPVP.xml b/RelationshipsPVP.xml
index 7799e34..36f8c6d 100644
--- a/RelationshipsPVP.xml
+++ b/RelationshipsPVP.xml
@@ -6,7 +6,7 @@
============================================================ -->
-
+
@@ -74,7 +74,7 @@
-
+
@@ -128,22 +128,26 @@
-
+
+
+
+
+
-
-
+
+
-
+
-
+
@@ -154,7 +158,7 @@
-
+
@@ -168,7 +172,7 @@
-
+
@@ -179,7 +183,7 @@
-
+