Mark alts clearer on Bids tablet.

Personal EPGP message that accounts for alt,main relation.
Fix alpha version.
This commit is contained in:
Road-block
2018-01-31 21:32:09 +02:00
parent 06ff00eef5
commit c097425484
4 changed files with 29 additions and 9 deletions
+14 -2
View File
@@ -180,8 +180,14 @@ function sepgp_bids:OnTooltipUpdate()
local tm = self:BuildBidsTable()
for i = 1, table.getn(tm) do
local name, class, ep, gp, pr, main = unpack(tm[i])
local namedesc
if (main) then
namedesc = string.format("%s(%s)", C:Colorize(BC:GetHexColor(class), name), L["Alt"])
else
namedesc = C:Colorize(BC:GetHexColor(class), name)
end
maincat:AddLine(
"text", C:Colorize(BC:GetHexColor(class), name),
"text", namedesc,
"text2", string.format("%.4g", ep),
"text3", string.format("%.4g", gp),
"text4", string.format("%.4g", pr),
@@ -205,8 +211,14 @@ function sepgp_bids:OnTooltipUpdate()
local _,to = self:BuildBidsTable()
for i = 1, table.getn(to) do
local name, class, ep, gp, pr, main = unpack(to[i])
local namedesc
if (main) then
namedesc = string.format("%s%(%s%)", C:Colorize(BC:GetHexColor(class), name), L["Alt"])
else
namedesc = C:Colorize(BC:GetHexColor(class), name)
end
offcat:AddLine(
"text", C:Colorize(BC:GetHexColor(class), name),
"text", namedesc,
"text2", string.format("%.4g", ep),
"text3", string.format("%.4g", gp),
"text4", string.format("%.4g", pr),
+2
View File
@@ -176,6 +176,7 @@ Results will print here when done.]],
["shootyepgp alts"] = true,
["Enable Alts"] = true,
["Main"] = true,
["Alt"] = true,
["Allow Alts to use Main\'s EPGP."] = true,
["Alts EP %"] = true,
["Set the % EP Alts can earn."] = true,
@@ -366,6 +367,7 @@ L:RegisterTranslations("zhCN", function() return {
["shootyepgp alts"] = "shootyepgp alts",
["Enable Alts"] = "Enable Alts",
["Main"] = "Main",
["Alt"] = "Alt",
["Allow Alts to use Main\'s EPGP."] = "Allow Alts to use Main\'s EPGP.",
["Alts EP %"] = "Alts EP %",
["Set the % EP Alts can earn."] = "Set the % EP Alts can earn.",
+12 -6
View File
@@ -674,7 +674,8 @@ function sepgp:addonComms(prefix,message,channel,sender)
end
if (who) and (what) and (amount) then
local msg
if (who == self._playerName) or (sepgp_main and (who == sepgp_main)) then
local for_main = (sepgp_main and (who == sepgp_main))
if (who == self._playerName) or (for_main) then
if what == "EP" then
if amount < 0 then
msg = string.format(L["You have received a %d EP penalty."],amount)
@@ -758,7 +759,7 @@ function sepgp:addonComms(prefix,message,channel,sender)
end
if msg and msg~="" then
self:defaultPrint(msg)
self:my_epgp()
self:my_epgp(for_main)
end
end
end
@@ -1090,8 +1091,13 @@ function sepgp:capcalc(ep,gp,gain)
return pr_decay, cap_ep, cap_pr
end
function sepgp:my_epgp_announce()
local ep,gp = (self:get_ep_v3(self._playerName) or 0), (self:get_gp_v3(self._playerName) or sepgp.VARS.basegp)
function sepgp:my_epgp_announce(use_main)
local ep,gp
if (use_main) then
ep,gp = (self:get_ep_v3(sepgp_main) or 0), (self:get_gp_v3(sepgp_main) or sepgp.VARS.basegp)
else
ep,gp = (self:get_ep_v3(self._playerName) or 0), (self:get_gp_v3(self._playerName) or sepgp.VARS.basegp)
end
local pr = ep/gp
local msg = string.format(L["You now have: %d EP %d GP |cffffff00%.03f|r|cffff7f00PR|r."], ep,gp,pr)
self:defaultPrint(msg)
@@ -1102,9 +1108,9 @@ function sepgp:my_epgp_announce()
end
end
function sepgp:my_epgp()
function sepgp:my_epgp(use_main)
GuildRoster()
self:ScheduleEvent("shootyepgpRosterRefresh",self.my_epgp_announce,3,self)
self:ScheduleEvent("shootyepgpRosterRefresh",self.my_epgp_announce,3,self,use_main)
end
---------
+1 -1
View File
@@ -8,7 +8,7 @@
## X-Category: Guild
## X-Credits: shooty, Qcat(zhCN)
## Version: 3.31.1
## X-Alpha: 3.4
## X-Alpha: 3.40
## OptionalDeps: Ace2
## SavedVariables: sepgp_saychannel, sepgp_groupbyclass, sepgp_raidonly, sepgp_dbver, sepgp_debug
## SavedVariablesPerCharacter: sepgp_main, sepgp_log, sepgp_looted, sepgp_decay, sepgp_reservechannel, sepgp_progress, sepgp_discount, sepgp_altspool, sepgp_altpercent