Corpse Arrow in Battlegrounds is Broken
ThiconZ opened this issue ยท 26 comments
When dead in a Battleground, the Corpse arrow will spam flash and always say "19 yards" and 6 seconds away from the corpse. The arrow should just be disabled in Battlegrounds as you really never go to your corpse to revive anyways.
Ahhh interesting. I never thought about that. Battlegrounds is the only "instance" based zone where you aren't ejected from it when you die. If you're running a dungeon and you die and release you're ejected to the nearest grave yard outside the instance. Your "corpse marker" is the dungeon entrance. So yeah, I'll have to add a special check for Battlegrounds to keep that arrow off.
I haven't had time to login to test it. Maybe someone can test it for me. I have to go to one of my kids concerts right now. Change the attachment from *.txt to *.lua and drop it in your ../!Questie/Modules directory.
My previous code fix had some bugs in it pertaining to certain scenarios. Correctly tested code is in and it should detect if a player is in a BG. It's a widely used block of code in vanilla for determining the status of a player inside, outside(queued), which BG etc. I only key'd in on "status = active" which means a player is physically in a BG and not simply queued up and doing some quests outside. So... as long as the BGACTIVE flag returns false (outside) then the arrow will show. I've tested everything outside a BG but haven't checked to see if it will work in a BG. No reason why it shouldn't. It's not throwing any errors outside.
All checked in. You'll have to manually install this build until I can put together a Release Package.
b408bac
New release with fix:
https://github.com/AeroScripts/QuestieDev/releases/latest
Is this hotfixed in the current 3.67 release? Because I can not reproduce the error with it.
If both posX and posY are 0, then the player is not dead, the corpse position is unknown, or not valid for the current map.
They are indeed 0 while dead in a BG. I checked.
This isn't in yet. However the test build I created for ThiconZ attached in the other thread does have the above fixes.
That might indicate that this is a server specific issue. I used 3.67 for the battleground tests.
Retested with version 3.67, corpse arrow no longer displays while dead in battlegrounds regardless of enabled/disabled setting for it.
@Dyaxler it seems I have spoken too soon. After multiple deaths some form of corruption appears and the text "My Dead Corpse" shows up while dead and in place of the arrow is an image that looks like a tiny white box tiled across the area that should contain the arrow. There did not appear to be a distance of estimated time section displayed.
I attempted to screenshot the issue but the screenshot was unable to capture the corrupted image for some reason. If I do manage to get a screenshot with it, I'll reply here with it.
Hmmm... that was happening with me too when I disabled the CorpseArrow while dead outside an instance/BG but I inserted some redundant checks elsewhere in another OnUpdate function to make sure it stays off. I'll have to go back over my Logic and check the code again.
I should also say that this might also be related to your issues with dying in Stockades and your arrow not indicting distance. I'd be willing to bet they are related to another AddOn you're running. Any chance I can see a dump of your:
..\WTF\Account\%ACCOUNTNAME%\%SERVER%\%CHARACTER%\AddOns.txt
It could possibly have something to do with having your Insignia taken from you in a Battleground once killed. It doesn't seem like many people do it which would explain why it doesn't happen often.
AddOns.txt does not appear to be listing all the addons it should but:
QuestHelper: disabled
EQCompare: disabled
FlightTime: enabled
!Questie: enabled
Auctioneer: enabled
AuctionFilterPlus: enabled
Atlas: enabled
AtlasLoot: enabled
AtlasQuest: enabled
WEIRD. Might be some kind of timing issue where one function is firing much quicker than another compared to my computer. I think maybe your computer is faster than mine. :D
Always possible, I capped the game to 60FPS and allotted 500mb to scripts if that's of any help.
Worldmap ?!?!?
Bah! OK, that gives me an idea of what is firing that might be causing this. You aren't using Metamap or Cartographer. I'm using Cartographer so I'll disable mine and run over my functions again.
Is your Worldmap full screen when you open it?
@Dyaxler like I said about the AddOns.txt file, it isn't listing all my Addons. I am using Cartographer.
Here is a more complete addons list:
And my WorldMap is not fullscreen.
Looked through the QuestieArrow file a bit and it seems bgactive will never be true due to bgstatus == active instead of bgstatus == "active" and since you loop through all queues, 3, if any were to be false which if the user is in a bg 1 will be true and 2 will be false, it'll result in it being false again. The following code block should make it be true whenever the player is in a bg:
local bgactive = false
for i=1, MAX_BATTLEFIELD_QUEUES do
bgstatus = GetBattlefieldStatus(i);
if (bgstatus == "active") then
bgactive = true
end
end
Should? Did you test it? :D Otherwise, nice catch! Small typo as I was in a hurry to finish writing the function. That is supposed to be a string value surrounded by quotes. Doh!
Actually it would be better to do it like this to avoid any nil errors.
local bgactive = false
for i=1, MAX_BATTLEFIELD_QUEUES do
bgstatus = GetBattlefieldStatus(i);
if (bgstatus and bgstatus == "active") then
bgactive = true
end
end
Oh and don't forget to change the "backup function" in Questie.lua too... line 488'ish or there about.
I ran the follow questie command in a bg while dead with the following screenshot output (top was cutoff due to amount of lines) to make sure it worked correctly:
["bgs"] = function()
local bgactive = false;
DEFAULT_CHAT_FRAME:AddMessage("BGS:"..MAX_BATTLEFIELD_QUEUES, 1, 1, 1);
for i=1, MAX_BATTLEFIELD_QUEUES do
bgstatus = GetBattlefieldStatus(i);
DEFAULT_CHAT_FRAME:AddMessage(bgstatus, 1, 1, 1);
if (bgstatus and bgstatus == "active") then
bgactive = true;
DEFAULT_CHAT_FRAME:AddMessage("active", 0, 1, 0);
else
DEFAULT_CHAT_FRAME:AddMessage("inactive", 1, 0, 0);
end
end
DEFAULT_CHAT_FRAME:AddMessage(tostring(bgactive), 1, 1, 1);
if UnitIsDeadOrGhost("player") and (bgactive == true) then
DEFAULT_CHAT_FRAME:AddMessage("DO NOT SHOW ARROW", 1, 1, 1);
end
end,
This however does not fix the corrupted image from showing but it does fix the first part of the overall issue. Will change the backup function and see if that fixes it entirely
NICE. Thank you for testing that. Personally... I hate BG's. Shhhh... don't tell anyone.
Tested it with one (two if counting the backup function) changes to ensure the arrow is hidden and it works perfect it seems.
if UnitIsDeadOrGhost("player") and (bgactive == false) then
if (QuestieConfig.corpseArrow == true) and (QuestieConfig.arrowEnabled == true) then
local deadmyx, deadmyy = GetCorpseMapPosition();
if deadmyx and deadmyy and deadmyx ~= 0 and deadmyy ~= 0 then
local mycon, myzone, x, y = Astrolabe:GetCurrentPlayerPosition()
local ddist, xDelta, yDelta = Astrolabe:ComputeDistance(mycont, myzone, X, Y, continent, zone, xNote, yNote)
local dtitle = "My Dead Corpse"
local dpoint = {c = mycon, z = myzone, x = deadmyx, y = deadmyy}
SetCrazyArrow(dpoint, ddist, dtitle);
end
end
if (QuestieConfig.corpseArrow == true) and (QuestieConfig.arrowEnabled == false) then
local deadmyx, deadmyy = GetCorpseMapPosition();
if deadmyx and deadmyy and deadmyx ~= 0 and deadmyy ~= 0 then
local mycon, myzone, x, y = Astrolabe:GetCurrentPlayerPosition()
local ddist, xDelta, yDelta = Astrolabe:ComputeDistance(mycont, myzone, X, Y, continent, zone, xNote, yNote)
local dtitle = "My Dead Corpse"
local dpoint = {c = mycon, z = myzone, x = deadmyx, y = deadmyy}
SetCrazyArrow(dpoint, ddist, dtitle);
end
end
if (QuestieConfig.arrowEnabled == false) and (QuestieConfig.corpseArrow == false) then
TomTomCrazyArrow:Hide()
end
elseif UnitIsDeadOrGhost("player") and (bgactive == true) then
TomTomCrazyArrow:Hide()
end
The above is the new code block for dealing with showing the arrow. Only added the last elseif to it.
Since I had hit level 30 people hate me when I join BGs to test this, I get tons of hate whispers telling me to leave and how I bring down the team - even though I still do better in them than most of the team, makes me almost want to hate BG's as well.
This has been fixed in the latest release:
https://github.com/AeroScripts/QuestieDev/releases/latest