Mercurial > wow > wowdb-profiler
comparison Main.lua @ 183:1078a6d1c4c9
Move GUID check to after RAID_FINDER_BOSS_IDS check; we only care about targeting for reputation gains - Raid Finder bosses should be recorded regardless.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Sun, 11 Nov 2012 16:43:15 -0600 |
parents | 5d166590440e |
children | 5117c75a47cb |
comparison
equal
deleted
inserted
replaced
182:5d166590440e | 183:1078a6d1c4c9 |
---|---|
1171 end | 1171 end |
1172 end | 1172 end |
1173 RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) | 1173 RecordNPCSpell(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) |
1174 end, | 1174 end, |
1175 UNIT_DIED = function(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) | 1175 UNIT_DIED = function(sub_event, source_guid, source_name, source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name) |
1176 if dest_guid ~= _G.UnitGUID("target") then | |
1177 Debug("Killed unit was not player target.") | |
1178 return | |
1179 end | |
1180 local unit_type, unit_idnum = ParseGUID(dest_guid) | 1176 local unit_type, unit_idnum = ParseGUID(dest_guid) |
1181 | 1177 |
1182 if not unit_idnum or not UnitTypeIsNPC(unit_type) then | 1178 if not unit_idnum or not UnitTypeIsNPC(unit_type) then |
1183 Debug(("%s: %s is not an NPC, or has no ID."):format(sub_event, dest_name)) | 1179 Debug(("%s: %s is not an NPC, or has no ID."):format(sub_event, dest_name)) |
1184 ClearKilledNPC() | 1180 ClearKilledNPC() |
1195 else | 1191 else |
1196 Debug(("%s: Matching boss %s; NOT in raid finder instance."):format(sub_event, dest_name)) | 1192 Debug(("%s: Matching boss %s; NOT in raid finder instance."):format(sub_event, dest_name)) |
1197 end | 1193 end |
1198 else | 1194 else |
1199 Debug(("%s: Killed NPC %s (ID: %d) is not in boss list."):format(sub_event, dest_name, unit_idnum)) | 1195 Debug(("%s: Killed NPC %s (ID: %d) is not in boss list."):format(sub_event, dest_name, unit_idnum)) |
1196 end | |
1197 | |
1198 if dest_guid ~= _G.UnitGUID("target") then | |
1199 ClearKilledNPC() | |
1200 return | |
1200 end | 1201 end |
1201 killed_npc_id = unit_idnum | 1202 killed_npc_id = unit_idnum |
1202 WDP:ScheduleTimer(ClearKilledNPC, 0.1) | 1203 WDP:ScheduleTimer(ClearKilledNPC, 0.1) |
1203 end, | 1204 end, |
1204 } | 1205 } |