Mercurial > wow > wowdb-profiler
comparison Main.lua @ 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 | df1cdcd46fe1 |
children | 6cac044fd0f9 |
comparison
equal
deleted
inserted
replaced
202:037e67c37222 | 203:83fdf52f0310 |
---|---|
281 local function ClearKilledNPC() | 281 local function ClearKilledNPC() |
282 killed_npc_id = nil | 282 killed_npc_id = nil |
283 end | 283 end |
284 | 284 |
285 | 285 |
286 local function ClearKilledBossID() | |
287 private.raid_finder_boss_id = nil | |
288 private.world_boss_id = nil | |
289 end | |
290 | |
291 | |
286 local function IsRaidFinderInstance(instance_type, instance_difficulty) | 292 local function IsRaidFinderInstance(instance_type, instance_difficulty) |
287 return instance_type == "raid" and instance_difficulty == 2 and _G.IsPartyLFG() and _G.IsInLFGDungeon() | 293 return instance_type == "raid" and instance_difficulty == 2 and _G.IsPartyLFG() and _G.IsInLFGDungeon() |
288 end | 294 end |
289 | 295 |
290 | 296 |
988 function WDP:SHOW_LOOT_TOAST(event_name, loot_type, item_link, quantity) | 994 function WDP:SHOW_LOOT_TOAST(event_name, loot_type, item_link, quantity) |
989 if loot_type ~= "item" then | 995 if loot_type ~= "item" then |
990 Debug(("%s: loot_type is '%s'"):format(event_name, loot_type)) | 996 Debug(("%s: loot_type is '%s'"):format(event_name, loot_type)) |
991 return | 997 return |
992 end | 998 end |
993 local npc = NPCEntry(private.raid_finder_boss_id) | 999 local npc = NPCEntry(private.raid_finder_boss_id or private.world_boss_id) |
994 private.raid_finder_boss_id = nil | 1000 private.raid_finder_boss_id = nil |
1001 private.world_boss_id = nil | |
995 | 1002 |
996 if not npc then | 1003 if not npc then |
997 Debug(("%s: NPC is nil."):format(event_name)) | 1004 Debug(("%s: NPC is nil."):format(event_name)) |
998 return | 1005 return |
999 end | 1006 end |
1196 end | 1203 end |
1197 | 1204 |
1198 if private.RAID_FINDER_BOSS_IDS[unit_idnum] then | 1205 if private.RAID_FINDER_BOSS_IDS[unit_idnum] then |
1199 Debug(("%s: Matching boss %s."):format(sub_event, dest_name)) | 1206 Debug(("%s: Matching boss %s."):format(sub_event, dest_name)) |
1200 private.raid_finder_boss_id = unit_idnum | 1207 private.raid_finder_boss_id = unit_idnum |
1208 private.world_boss_id = nil | |
1209 elseif private.WORLD_BOSS_IDS[unit_idnum] then | |
1210 Debug(("%s: Matching world boss %s."):format(sub_event, dest_name)) | |
1211 private.raid_finder_boss_id = nil | |
1212 private.world_boss_id = unit_idnum | |
1201 else | 1213 else |
1202 Debug(("%s: Killed NPC %s (ID: %d) is not in boss list."):format(sub_event, dest_name, unit_idnum)) | 1214 Debug(("%s: Killed NPC %s (ID: %d) is not in LFG or World boss list."):format(sub_event, dest_name, unit_idnum)) |
1203 end | 1215 end |
1204 | 1216 |
1205 if dest_guid ~= _G.UnitGUID("target") then | 1217 if dest_guid ~= _G.UnitGUID("target") then |
1206 ClearKilledNPC() | 1218 ClearKilledNPC() |
1207 return | 1219 return |
1208 end | 1220 end |
1209 killed_npc_id = unit_idnum | 1221 killed_npc_id = unit_idnum |
1210 WDP:ScheduleTimer(ClearKilledNPC, 0.1) | 1222 WDP:ScheduleTimer(ClearKilledNPC, 0.1) |
1223 WDP:ScheduleTimer(ClearKilledBossID, 1) | |
1211 end, | 1224 end, |
1212 } | 1225 } |
1213 | 1226 |
1214 | 1227 |
1215 function WDP:COMBAT_LOG_EVENT_UNFILTERED(event_name, time_stamp, sub_event, hide_caster, source_guid, source_name, source_flags, source_raid_flags, dest_guid, dest_name, dest_flags, dest_raid_flags, ...) | 1228 function WDP:COMBAT_LOG_EVENT_UNFILTERED(event_name, time_stamp, sub_event, hide_caster, source_guid, source_name, source_flags, source_raid_flags, dest_guid, dest_name, dest_flags, dest_raid_flags, ...) |