Mercurial > wow > wowdb-profiler
comparison Main.lua @ 46:786292c0bcc8
Protection against nil in a couple of places.
author | James D. Callahan III <jcallahan@curse.com> |
---|---|
date | Wed, 20 Jun 2012 12:29:02 -0500 |
parents | 5d5a490724ec |
children | 768c5f3587c2 |
comparison
equal
deleted
inserted
replaced
45:5d5a490724ec | 46:786292c0bcc8 |
---|---|
626 if message_type ~= "FACTION" then | 626 if message_type ~= "FACTION" then |
627 return | 627 return |
628 end | 628 end |
629 UpdateFactionData() | 629 UpdateFactionData() |
630 | 630 |
631 if not faction_name or not faction_standings[faction_name] then | |
632 return | |
633 end | |
631 local npc = NPCEntry(action_data.identifier) | 634 local npc = NPCEntry(action_data.identifier) |
635 | |
632 if not npc then | 636 if not npc then |
633 return | 637 return |
634 end | 638 end |
635 local encounter_data = npc.encounter_data[InstanceDifficultyToken()].stats | 639 local encounter_data = npc.encounter_data[InstanceDifficultyToken()].stats |
636 local reputation_data = encounter_data[action_data.npc_level].reputations | 640 local reputation_data = encounter_data[action_data.npc_level].reputations |
1059 | 1063 |
1060 | 1064 |
1061 function WDP:QUEST_DETAIL() | 1065 function WDP:QUEST_DETAIL() |
1062 local quest = UpdateQuestJuncture("begin") | 1066 local quest = UpdateQuestJuncture("begin") |
1063 | 1067 |
1068 if not quest then | |
1069 return | |
1070 end | |
1064 quest.classes = quest.classes or {} | 1071 quest.classes = quest.classes or {} |
1065 quest.classes[PLAYER_CLASS] = true | 1072 quest.classes[PLAYER_CLASS] = true |
1066 | 1073 |
1067 local _, race = _G.UnitRace("player") | 1074 local _, race = _G.UnitRace("player") |
1068 quest.races = quest.races or {} | 1075 quest.races = quest.races or {} |