Add files via upload
This commit is contained in:
+19
-6
@@ -47,6 +47,17 @@ local ARENA_IDS = {
|
|||||||
local MARKS_WIN = 3
|
local MARKS_WIN = 3
|
||||||
local MARKS_LOSS = 1
|
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 currentBG = nil
|
||||||
local endReported = {}
|
local endReported = {}
|
||||||
|
|
||||||
@@ -814,10 +825,10 @@ end
|
|||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
-- UI: build row FontStrings inside the stats panel
|
-- 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_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, 60, 58 }
|
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" }
|
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", "mk" }
|
local COL_NAMES = { "bg", "games", "win", "draw", "loss", "ratio", "kb", "hk", "dth", "kd", "honor", "spend", "mk" }
|
||||||
|
|
||||||
local ROW_HEIGHT = 22
|
local ROW_HEIGHT = 22
|
||||||
local ROW_TOP = -34
|
local ROW_TOP = -34
|
||||||
@@ -827,7 +838,7 @@ local function MakeRow(panel, tag, yOff, striped)
|
|||||||
if striped then
|
if striped then
|
||||||
local bg = panel:CreateTexture("RPVPRowBG"..tag, "BACKGROUND")
|
local bg = panel:CreateTexture("RPVPRowBG"..tag, "BACKGROUND")
|
||||||
bg:SetTexture(1, 1, 1, 0.04)
|
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)
|
bg:SetPoint("TOPLEFT", panel, "TOPLEFT", 14, yOff + 2)
|
||||||
end
|
end
|
||||||
for c = 1, table.getn(COL_NAMES) do
|
for c = 1, table.getn(COL_NAMES) do
|
||||||
@@ -863,7 +874,7 @@ local function BuildStatsRows()
|
|||||||
local totalY = ROW_TOP - n * ROW_HEIGHT - 4
|
local totalY = ROW_TOP - n * ROW_HEIGHT - 4
|
||||||
local div = panel:CreateTexture("RPVPTotalDivider", "ARTWORK")
|
local div = panel:CreateTexture("RPVPTotalDivider", "ARTWORK")
|
||||||
div:SetTexture(1, 1, 1, 0.25)
|
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)
|
div:SetPoint("TOPLEFT", panel, "TOPLEFT", 14, totalY + 2)
|
||||||
|
|
||||||
totalRow = MakeRow(panel, "TOTAL", totalY - 6, false)
|
totalRow = MakeRow(panel, "TOTAL", totalY - 6, false)
|
||||||
@@ -919,6 +930,7 @@ local function FillRow(r, s)
|
|||||||
r.dth:SetText(s.deaths)
|
r.dth:SetText(s.deaths)
|
||||||
r.kd:SetText(kd)
|
r.kd:SetText(kd)
|
||||||
r.honor:SetText(FormatNumber(s.honor))
|
r.honor:SetText(FormatNumber(s.honor))
|
||||||
|
r.spend:SetText(FormatNumber(SpendableHonor(s.honor)))
|
||||||
r.mk:SetText(s.marks)
|
r.mk:SetText(s.marks)
|
||||||
|
|
||||||
if games == 0 then
|
if games == 0 then
|
||||||
@@ -963,6 +975,7 @@ function RelationshipsPVP_Refresh()
|
|||||||
"|cffffd200Best win streak:|r " .. totals.bestStreak
|
"|cffffd200Best win streak:|r " .. totals.bestStreak
|
||||||
.. " |cffffd200Best KBs (single match):|r " .. totals.bestKB
|
.. " |cffffd200Best KBs (single match):|r " .. totals.bestKB
|
||||||
.. " |cffffd200Total honor:|r " .. FormatNumber(totals.honor)
|
.. " |cffffd200Total honor:|r " .. FormatNumber(totals.honor)
|
||||||
|
.. " |cffffd200Spendable honor:|r " .. FormatNumber(SpendableHonor(totals.honor))
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
## Title: Relationships PVP
|
## 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.
|
## 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
|
## Author: Relationship
|
||||||
## Version: 1.2
|
## Version: 1.3
|
||||||
## SavedVariablesPerCharacter: RelationshipsPVPCharDB
|
## SavedVariablesPerCharacter: RelationshipsPVPCharDB
|
||||||
|
|
||||||
RelationshipsPVP.xml
|
RelationshipsPVP.xml
|
||||||
|
|||||||
+14
-10
@@ -6,7 +6,7 @@
|
|||||||
============================================================ -->
|
============================================================ -->
|
||||||
<Frame name="RelationshipsPVPFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true" hidden="true" frameStrata="HIGH">
|
<Frame name="RelationshipsPVPFrame" parent="UIParent" toplevel="true" movable="true" enableMouse="true" hidden="true" frameStrata="HIGH">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="790" y="740"/>
|
<AbsDimension x="864" y="740"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER"/>
|
<Anchor point="CENTER"/>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<!-- ================= Stats Panel ================= -->
|
<!-- ================= Stats Panel ================= -->
|
||||||
<Frame name="RelationshipsPVPStatsPanel">
|
<Frame name="RelationshipsPVPStatsPanel">
|
||||||
<Size><AbsDimension x="742" y="266"/></Size>
|
<Size><AbsDimension x="816" y="266"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
<Offset><AbsDimension x="24" y="-72"/></Offset>
|
<Offset><AbsDimension x="24" y="-72"/></Offset>
|
||||||
@@ -128,22 +128,26 @@
|
|||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="550" y="-10"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="550" y="-10"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
<FontString name="RPVPHdrHonor" inherits="GameFontNormalSmall" text="Honor" justifyH="CENTER">
|
<FontString name="RPVPHdrHonor" inherits="GameFontNormalSmall" text="Honor" justifyH="CENTER">
|
||||||
<Size><AbsDimension x="60" y="14"/></Size>
|
<Size><AbsDimension x="56" y="14"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="604" y="-10"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="604" y="-10"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
|
<FontString name="RPVPHdrSpend" inherits="GameFontNormalSmall" text="Spendable" justifyH="CENTER">
|
||||||
|
<Size><AbsDimension x="76" y="14"/></Size>
|
||||||
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="664" y="-10"/></Offset></Anchor></Anchors>
|
||||||
|
</FontString>
|
||||||
<FontString name="RPVPHdrMk" inherits="GameFontNormalSmall" text="Marks" justifyH="CENTER">
|
<FontString name="RPVPHdrMk" inherits="GameFontNormalSmall" text="Marks" justifyH="CENTER">
|
||||||
<Size><AbsDimension x="58" y="14"/></Size>
|
<Size><AbsDimension x="56" y="14"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="668" y="-10"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="744" y="-10"/></Offset></Anchor></Anchors>
|
||||||
</FontString>
|
</FontString>
|
||||||
|
|
||||||
<Texture name="RPVPHdrDivider" file="Interface\Tooltips\UI-Tooltip-Background">
|
<Texture name="RPVPHdrDivider" file="Interface\Tooltips\UI-Tooltip-Background">
|
||||||
<Size><AbsDimension x="714" y="1"/></Size>
|
<Size><AbsDimension x="786" y="1"/></Size>
|
||||||
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="14" y="-28"/></Offset></Anchor></Anchors>
|
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="14" y="-28"/></Offset></Anchor></Anchors>
|
||||||
<Color r="0.6" g="0.6" b="0.6" a="0.6"/>
|
<Color r="0.6" g="0.6" b="0.6" a="0.6"/>
|
||||||
</Texture>
|
</Texture>
|
||||||
|
|
||||||
<FontString name="RelationshipsPVPExtrasText" inherits="GameFontHighlightSmall" justifyH="LEFT">
|
<FontString name="RelationshipsPVPExtrasText" inherits="GameFontHighlightSmall" justifyH="LEFT">
|
||||||
<Size><AbsDimension x="714" y="16"/></Size>
|
<Size><AbsDimension x="786" y="16"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="14" y="10"/></Offset></Anchor>
|
<Anchor point="BOTTOMLEFT"><Offset><AbsDimension x="14" y="10"/></Offset></Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -154,7 +158,7 @@
|
|||||||
|
|
||||||
<!-- ================= Queue Status Panel ================= -->
|
<!-- ================= Queue Status Panel ================= -->
|
||||||
<Frame name="RelationshipsPVPQueuePanel">
|
<Frame name="RelationshipsPVPQueuePanel">
|
||||||
<Size><AbsDimension x="742" y="84"/></Size>
|
<Size><AbsDimension x="816" y="84"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
<Offset><AbsDimension x="24" y="-368"/></Offset>
|
<Offset><AbsDimension x="24" y="-368"/></Offset>
|
||||||
@@ -168,7 +172,7 @@
|
|||||||
<Layers>
|
<Layers>
|
||||||
<Layer level="ARTWORK">
|
<Layer level="ARTWORK">
|
||||||
<FontString name="RelationshipsPVPQueueText" inherits="GameFontHighlightSmall" justifyH="LEFT" justifyV="TOP">
|
<FontString name="RelationshipsPVPQueueText" inherits="GameFontHighlightSmall" justifyH="LEFT" justifyV="TOP">
|
||||||
<Size><AbsDimension x="714" y="70"/></Size>
|
<Size><AbsDimension x="786" y="70"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT"><Offset><AbsDimension x="14" y="-10"/></Offset></Anchor>
|
<Anchor point="TOPLEFT"><Offset><AbsDimension x="14" y="-10"/></Offset></Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -179,7 +183,7 @@
|
|||||||
|
|
||||||
<!-- ================= Action Panel ================= -->
|
<!-- ================= Action Panel ================= -->
|
||||||
<Frame name="RelationshipsPVPActionPanel">
|
<Frame name="RelationshipsPVPActionPanel">
|
||||||
<Size><AbsDimension x="742" y="230"/></Size>
|
<Size><AbsDimension x="816" y="230"/></Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPLEFT">
|
<Anchor point="TOPLEFT">
|
||||||
<Offset><AbsDimension x="24" y="-472"/></Offset>
|
<Offset><AbsDimension x="24" y="-472"/></Offset>
|
||||||
|
|||||||
Reference in New Issue
Block a user