Capping Battleground Timers

Capping Battleground Timers

8M Downloads

Needs massive classic overhaul

Litvan opened this issue ยท 11 comments

commented

Playing as alliance on classic server (US) and doing a lot of Alterac Valley, the only thing I've noticed that works with this addon is showing the health of Galv and Drek, nothing else works (I don't quest in there, so haven't tested auto handin ect)
No cap timers for GY's
No cap timers for Towers/Bunkers

commented

Yes, sadly, we don't see any timer on AV for the GY/Tower/etc.

Could be nice to have it. Anything planned to see that in WoW classic?

commented

here's a quick fix for classic AV

diff --git a/battlegrounds.lua b/tmp/battlegrounds.lua
old mode 100755
new mode 100644
index 9144566..1317c5c
--- a/battlegrounds.lua
+++ b/tmp/battlegrounds.lua
@@ -66,11 +66,11 @@ do -- POI handling
 
 	local iconDataConflict = {
 		-- Graveyard
-		[3] = "colorAlliance",
-		[13] = "colorHorde",
+		[4] = "colorAlliance",
+		[14] = "colorHorde",
 		-- Tower
-		[8] = "colorAlliance",
-		[11] = "colorHorde",
+		[9] = "colorAlliance",
+		[12] = "colorHorde",
 		-- Mine/Stone
 		[17] = "colorAlliance",
 		[19] = "colorHorde",
@@ -121,7 +121,7 @@ do -- POI handling
 			local atlasName = tbl.atlasName
 			if icon then
 				landmarkCache[tbl.name] = icon
-                                if icon == 2 or icon == 0 then
+				if icon == 2 or icon == 3 or icon == 151 or icon == 153 or icon == 18 or icon == 20 then
 					-- Horde mine, Alliance mine, Alliance Refinery, Horde Refinery, Alliance Quarry, Horde Quarry
 					local _, _, _, id = UnitPosition("player")
 					if id == 30 or id == 628 then -- Alterac Valley, IoC
@@ -169,7 +169,7 @@ do -- POI handling
 						self:StopBar(name)
 						if icon == 136 or icon == 138 then -- Workshop in IoC
 							self:StartBar(GetSpellInfo(56661), 181, 252187, icon == 136 and "colorAlliance" or "colorHorde") -- Build Siege Engine, 252187 = ability_vehicle_siegeengineram
-						elseif icon == 2 or icon == 0 then
+						elseif icon == 2 or icon == 3 or icon == 151 or icon == 153 or icon == 18 or icon == 20 then
 							-- Horde mine, Alliance mine, Alliance Refinery, Horde Refinery, Alliance Quarry, Horde Quarry
 							local _, _, _, id = UnitPosition("player")
 							if id == 30 or id == 628 then -- Alterac Valley, IoC
@@ -674,7 +674,7 @@ do
 			GetQuestReward(0)
 		end
 
-		SetupAssault(300, 1459)
+		SetupAssault(242, 91)
 		SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male
 		SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 236444, "colorHorde") -- Interface/Icons/Achievement_Character_Dwarf_Male
 		SetupHealthCheck("11947", L.galvangar, "Galvangar", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male

So I checked my battlegrounds.lua and it looks like your fix was applied/I already downloaded the newest version. But sadly i dont see any changes in World of Warcraft Classic. The timers for GY and Bunkers/Towers are still missing.

commented

sorry, my diff is inverse. minus are my actual changes

commented

Ty for the quick response.

Edit: I applied the fixes - but I still don't notice any changes. Timers are still missing :(

commented

here's a quick fix for classic AV

diff --git a/battlegrounds.lua b/tmp/battlegrounds.lua
old mode 100755
new mode 100644
index 9144566..1317c5c
--- a/battlegrounds.lua
+++ b/tmp/battlegrounds.lua
@@ -66,11 +66,11 @@ do -- POI handling
 
 	local iconDataConflict = {
 		-- Graveyard
-		[3] = "colorAlliance",
-		[13] = "colorHorde",
+		[4] = "colorAlliance",
+		[14] = "colorHorde",
 		-- Tower
-		[8] = "colorAlliance",
-		[11] = "colorHorde",
+		[9] = "colorAlliance",
+		[12] = "colorHorde",
 		-- Mine/Stone
 		[17] = "colorAlliance",
 		[19] = "colorHorde",
@@ -121,7 +121,7 @@ do -- POI handling
 			local atlasName = tbl.atlasName
 			if icon then
 				landmarkCache[tbl.name] = icon
-                                if icon == 2 or icon == 0 then
+				if icon == 2 or icon == 3 or icon == 151 or icon == 153 or icon == 18 or icon == 20 then
 					-- Horde mine, Alliance mine, Alliance Refinery, Horde Refinery, Alliance Quarry, Horde Quarry
 					local _, _, _, id = UnitPosition("player")
 					if id == 30 or id == 628 then -- Alterac Valley, IoC
@@ -169,7 +169,7 @@ do -- POI handling
 						self:StopBar(name)
 						if icon == 136 or icon == 138 then -- Workshop in IoC
 							self:StartBar(GetSpellInfo(56661), 181, 252187, icon == 136 and "colorAlliance" or "colorHorde") -- Build Siege Engine, 252187 = ability_vehicle_siegeengineram
-						elseif icon == 2 or icon == 0 then
+						elseif icon == 2 or icon == 3 or icon == 151 or icon == 153 or icon == 18 or icon == 20 then
 							-- Horde mine, Alliance mine, Alliance Refinery, Horde Refinery, Alliance Quarry, Horde Quarry
 							local _, _, _, id = UnitPosition("player")
 							if id == 30 or id == 628 then -- Alterac Valley, IoC
@@ -674,7 +674,7 @@ do
 			GetQuestReward(0)
 		end
 
-		SetupAssault(300, 1459)
+		SetupAssault(242, 91)
 		SetupHealthCheck("11946", L.hordeBoss, "Horde Boss", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male
 		SetupHealthCheck("11948", L.allianceBoss, "Alliance Boss", 236444, "colorHorde") -- Interface/Icons/Achievement_Character_Dwarf_Male
 		SetupHealthCheck("11947", L.galvangar, "Galvangar", 236452, "colorAlliance") -- Interface/Icons/Achievement_Character_Orc_Male
commented

here's a quick fix for classic AV

Hmm, hard to see what changes you did. Went through all the lines. And I can't see any changes.
I take it that "+" sign means added lines and "-" sign means removed lines?

commented

The modifications above worked for me. Thank you!

commented

I uploaded the modified file here:

https://github.com/Nomar111/Public

Will delete as soon as the original author fixes it.

commented

I don't know where I have to put this file, in my current version there is no battlegrounds.lua file. :s

Do you have a explanation on how to apply this "quick fix"?

commented

I don't know where I have to put this file, in my current version there is no battlegrounds.lua file. :s

Do you have a explanation on how to apply this "quick fix"?

the classic version has battlegrounds.lua. you probably have the retail version installed

commented

Thanks, it work, I don't remember why I didn't see this file. And now I can see the timer in AV. Great job.