Thread Tools Display Modes
03-11-16, 01:03 PM   #1
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Getting defeated bosses

I'm trying to figure out how to determine if a specific boss in the current instance has been killed, but the api functions I've found only operate from a lockout.
__________________
Knowledge = Power; Be OP

  Reply With Quote
03-11-16, 01:57 PM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
I don't think there is any other way without the addon actually seeing the death of said boss.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
01-27-17, 10:34 AM   #3
MrGneissGuy
A Kobold Labourer
Join Date: Jan 2017
Posts: 1
I know this is late, but for those who might want it in the future:


Code:
function IsBossDefeated(instanceName, bossName)

	for instanceIndex=1,GetNumSavedInstances() do

		instName,_,_,_,locked,_,_,_,_,_,maxBosses,_ = GetSavedInstanceInfo(instanceIndex);
		
		if (instanceName == instName and locked) then
			-- player is saved to specified instance.
			
			for bossNum = 1, maxBosses do

				name,_,defeated,_ = GetSavedInstanceEncounterInfo(instanceIndex, bossNum)
			
				if (name == bossName) then
					return defeated;
				end
			end
			return false;
		end
	end	
end

Last edited by MrGneissGuy : 01-27-17 at 02:05 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Getting defeated bosses


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off