Mercurial > wow > wowdb-profiler
comparison Main.lua @ 575:89fab01eaba0
Fixed WoWDBProfiler for Patch 8.1.0.
author | Caleb Atherton <atcaleb@twitch.tv> |
---|---|
date | Tue, 11 Dec 2018 18:13:33 -0500 |
parents | 444d15b2091e |
children | 78e9cbbf3d58 |
comparison
equal
deleted
inserted
replaced
574:6b4afad83515 | 575:89fab01eaba0 |
---|---|
985 | 985 |
986 | 986 |
987 -- Record data for a specific quest ID; reward data must be available or nothing will be recorded | 987 -- Record data for a specific quest ID; reward data must be available or nothing will be recorded |
988 -- When we reach this point, we've already checked for a valid mapID, questID, quest data, and worldQuestType | 988 -- When we reach this point, we've already checked for a valid mapID, questID, quest data, and worldQuestType |
989 local function RecordWorldQuestData(quest_id, api_data_table) | 989 local function RecordWorldQuestData(quest_id, api_data_table) |
990 local xp, _ = _G.GetQuestLogRewardXP(quest_id) | |
991 | |
990 -- Ensure we have location data and rewards (barely readable so putting it on multiple lines) | 992 -- Ensure we have location data and rewards (barely readable so putting it on multiple lines) |
991 -- (Honor is built in to the quest; it is not a sign rewards have been loaded) | 993 -- (Honor is built in to the quest; it is not a sign rewards have been loaded) |
992 if not api_data_table or not api_data_table.x or not api_data_table.y or not api_data_table.mapID or not | 994 if not api_data_table or not api_data_table.x or not api_data_table.y or not api_data_table.mapID or not |
993 (_G.GetQuestLogRewardXP(quest_id) > 0 or _G.GetNumQuestLogRewardCurrencies(quest_id) > 0 | 995 (xp > 0 or _G.GetNumQuestLogRewardCurrencies(quest_id) > 0 |
994 or _G.GetNumQuestLogRewards(quest_id) > 0 or _G.GetQuestLogRewardMoney(quest_id) > 0) then | 996 or _G.GetNumQuestLogRewards(quest_id) > 0 or _G.GetQuestLogRewardMoney(quest_id) > 0) then |
995 --or _G.GetQuestLogRewardArtifactXP(quest_id) > 0) | 997 --or _G.GetQuestLogRewardArtifactXP(quest_id) > 0) |
996 return | 998 return |
997 end | 999 end |
998 | 1000 |
1005 entry["location"]["x"] = api_data_table.x * 100 | 1007 entry["location"]["x"] = api_data_table.x * 100 |
1006 entry["location"]["y"] = api_data_table.y * 100 | 1008 entry["location"]["y"] = api_data_table.y * 100 |
1007 | 1009 |
1008 -- Record simple rewards (XP, money, artifact XP, honor) | 1010 -- Record simple rewards (XP, money, artifact XP, honor) |
1009 entry["rewards"] = {} | 1011 entry["rewards"] = {} |
1010 entry["rewards"]["xp"] = tonumber(_G.GetQuestLogRewardXP(quest_id)) or 0 | 1012 entry["rewards"]["xp"] = tonumber(xp) or 0 |
1011 entry["rewards"]["money"] = tonumber(_G.GetQuestLogRewardMoney(quest_id)) or 0 | 1013 entry["rewards"]["money"] = tonumber(_G.GetQuestLogRewardMoney(quest_id)) or 0 |
1012 --local actualXP, scaling = _G.GetQuestLogRewardArtifactXP(quest_id) | 1014 --local actualXP, scaling = _G.GetQuestLogRewardArtifactXP(quest_id) |
1013 --entry["rewards"]["artifact_xp"] = ("%d:%d"):format(tonumber(actualXP) or 0, tonumber(scaling) or 0) | 1015 --entry["rewards"]["artifact_xp"] = ("%d:%d"):format(tonumber(actualXP) or 0, tonumber(scaling) or 0) |
1014 entry["rewards"]["honor"] = tonumber(_G.GetQuestLogRewardHonor(quest_id)) or 0 | 1016 entry["rewards"]["honor"] = tonumber(_G.GetQuestLogRewardHonor(quest_id)) or 0 |
1015 | 1017 |