# HG changeset patch # User James D. Callahan III # Date 1355156844 21600 # Node ID 83fdf52f031005894073215b95cb9b10f8972620 # Parent 037e67c37222a8eec41cb10bb7b21530e736cc76 Record drops from World Bosses. diff -r 037e67c37222 -r 83fdf52f0310 Constants.lua --- 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 +} diff -r 037e67c37222 -r 83fdf52f0310 Main.lua --- 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, }