Skip to content

Commit

Permalink
Decreased a chance to accidentally send the estimator report
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed May 11, 2021
1 parent be91fec commit 448283e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions REPorter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ RE.BlinkPOIValue = 0.3
RE.BlinkPOIUp = true

RE.FoundNewVersion = false
RE.AddonVersionCheck = 283
RE.AddonVersionCheck = 284
RE.ScreenHeight, RE.ScreenWidth = _G.UIParent:GetCenter()

RE.MapSettings = {
Expand Down Expand Up @@ -1462,12 +1462,14 @@ function RE:BigButton(isHelp, otherNode)
end

function RE:ReportEstimator()
if TIMER:TimeLeft(RE.EstimatorTimer) > 0 then
SendChatMessage(RE.IsWinning.." victory: "..RE:ShortTime(RE:Round(TIMER:TimeLeft(RE.EstimatorTimer), 0)), "INSTANCE_CHAT")
elseif RE.CurrentMap == SM and RE.SMEstimatorReport ~= "" then
SendChatMessage(RE.SMEstimatorReport, "INSTANCE_CHAT")
elseif RE.CurrentMap == IOC and RE.PlayedFromStart then
SendChatMessage("Alliance gate: "..RE:Round((RE.IoCGateEstimator[_G.FACTION_ALLIANCE] / RE.IoCGateHealth) * 100, 0).."% - Horde gate: "..RE:Round((RE.IoCGateEstimator[_G.FACTION_HORDE] / RE.IoCGateHealth) * 100, 0).."%", "INSTANCE_CHAT")
if IsShiftKeyDown() then
if TIMER:TimeLeft(RE.EstimatorTimer) > 0 then
SendChatMessage(RE.IsWinning.." victory: "..RE:ShortTime(RE:Round(TIMER:TimeLeft(RE.EstimatorTimer), 0)), "INSTANCE_CHAT")
elseif RE.CurrentMap == SM and RE.SMEstimatorReport ~= "" then
SendChatMessage(RE.SMEstimatorReport, "INSTANCE_CHAT")
elseif RE.CurrentMap == IOC and RE.PlayedFromStart then
SendChatMessage("Alliance gate: "..RE:Round((RE.IoCGateEstimator[_G.FACTION_ALLIANCE] / RE.IoCGateHealth) * 100, 0).."% - Horde gate: "..RE:Round((RE.IoCGateEstimator[_G.FACTION_HORDE] / RE.IoCGateHealth) * 100, 0).."%", "INSTANCE_CHAT")
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion REPorter.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 90005
## Title: |cFF74D06CRE|rPorter
## Notes: Provide battleground map.
## Version: 2.8.3
## Version: 2.8.4
## Author: AcidWeb
## SavedVariables: REPorterSettings
## X-Website: https://www.curseforge.com/wow/addons/reporter-battleground-map
Expand Down
2 changes: 1 addition & 1 deletion REPorter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
</Scripts>
</Frame>

<Frame name="REPorterFrameEstimator" parent="UIWidgetTopCenterContainerFrame" hidden="true">
<Frame name="REPorterFrameEstimator" parent="UIWidgetTopCenterContainerFrame" hidden="true" frameStrata="BACKGROUND">
<Size>
<AbsDimension x="100" y="40"/>
</Size>
Expand Down

0 comments on commit 448283e

Please sign in to comment.