Mercurial > wow > wowdb-profiler
changeset 203:83fdf52f0310 1.0.32
Record drops from World Bosses.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Mon, 10 Dec 2012 10:27:24 -0600 |
parents | 037e67c37222 |
children | c68b7c7b6b92 |
files | Constants.lua Main.lua |
diffstat | 2 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Constants.lua Wed Dec 05 08:45:08 2012 -0600 +++ b/Constants.lua Mon Dec 10 10:27:24 2012 -0600 @@ -119,3 +119,8 @@ [62980] = true, -- Imperial Vizier Zor'lok [62983] = true, -- Lei Shi } + +private.WORLD_BOSS_IDS = { + [60491] = true, -- Sha of Anger + [62346] = true, -- Galleon +}
--- a/Main.lua Wed Dec 05 08:45:08 2012 -0600 +++ b/Main.lua Mon Dec 10 10:27:24 2012 -0600 @@ -283,6 +283,12 @@ end +local function ClearKilledBossID() + private.raid_finder_boss_id = nil + private.world_boss_id = nil +end + + local function IsRaidFinderInstance(instance_type, instance_difficulty) return instance_type == "raid" and instance_difficulty == 2 and _G.IsPartyLFG() and _G.IsInLFGDungeon() end @@ -990,8 +996,9 @@ Debug(("%s: loot_type is '%s'"):format(event_name, loot_type)) return end - local npc = NPCEntry(private.raid_finder_boss_id) + local npc = NPCEntry(private.raid_finder_boss_id or private.world_boss_id) private.raid_finder_boss_id = nil + private.world_boss_id = nil if not npc then Debug(("%s: NPC is nil."):format(event_name)) @@ -1198,8 +1205,13 @@ if private.RAID_FINDER_BOSS_IDS[unit_idnum] then Debug(("%s: Matching boss %s."):format(sub_event, dest_name)) private.raid_finder_boss_id = unit_idnum + private.world_boss_id = nil + elseif private.WORLD_BOSS_IDS[unit_idnum] then + Debug(("%s: Matching world boss %s."):format(sub_event, dest_name)) + private.raid_finder_boss_id = nil + private.world_boss_id = unit_idnum else - Debug(("%s: Killed NPC %s (ID: %d) is not in boss list."):format(sub_event, dest_name, unit_idnum)) + Debug(("%s: Killed NPC %s (ID: %d) is not in LFG or World boss list."):format(sub_event, dest_name, unit_idnum)) end if dest_guid ~= _G.UnitGUID("target") then @@ -1208,6 +1220,7 @@ end killed_npc_id = unit_idnum WDP:ScheduleTimer(ClearKilledNPC, 0.1) + WDP:ScheduleTimer(ClearKilledBossID, 1) end, }