comparison Main.lua @ 332:5ef583564381 WoD

Merge
author James D. Callahan III <jcallahan@curse.com>
date Tue, 26 Aug 2014 10:45:49 -0500
parents 998f3264b482 267e7100407c
children 601d3e517460
comparison
equal deleted inserted replaced
331:998f3264b482 332:5ef583564381
215 215
216 if have_skillup then 216 if have_skillup then
217 _G.TradeSkillFrame.filterTbl.hasSkillUp = false 217 _G.TradeSkillFrame.filterTbl.hasSkillUp = false
218 _G.TradeSkillOnlyShowSkillUps(false) 218 _G.TradeSkillOnlyShowSkillUps(false)
219 end 219 end
220 _G.SetTradeSkillInvSlotFilter(0, 1, 1) 220 _G.SetTradeSkillInvSlotFilter(0, true, true)
221 _G.TradeSkillUpdateFilterBar() 221 _G.TradeSkillUpdateFilterBar()
222 _G.TradeSkillFrame_Update() 222 _G.TradeSkillFrame_Update()
223 223
224 -- Expand all headers so we can see all the recipes there are 224 -- Expand all headers so we can see all the recipes there are
225 for tradeskill_index = 1, _G.GetNumTradeSkills() do 225 for tradeskill_index = 1, _G.GetNumTradeSkills() do
290 return math.floor(copper_cost / modifier) 290 return math.floor(copper_cost / modifier)
291 end 291 end
292 end -- do-block 292 end -- do-block
293 293
294 294
295 -- constant for duplicate boss data; a dirty hack to get around world bosses that cannot be identified individually and cannot be linked on wowdb because they are not in a raid 295 -- Constant for duplicate boss data; a dirty hack to get around world bosses that cannot be identified individually and cannot be linked on wowdb because they are not in a raid
296 local DUPLICATE_WORLD_BOSS_IDS = { 296 local DUPLICATE_WORLD_BOSS_IDS = {
297 [71952] = { 71953, 71954, 71955, }, 297 [71952] = { 71953, 71954, 71955, },
298 } 298 }
299 299
300 300
869 for entry in pairs(DATABASE_DEFAULTS.global) do 869 for entry in pairs(DATABASE_DEFAULTS.global) do
870 global_db[entry] = {} 870 global_db[entry] = {}
871 end 871 end
872 end 872 end
873 raw_db.build_num = build_num 873 raw_db.build_num = build_num
874 raw_db.region = private.region
874 raw_db.version = DB_VERSION 875 raw_db.version = DB_VERSION
875 876
876 private.InitializeCommentSystem() 877 private.InitializeCommentSystem()
877 self:RegisterChatCommand("comment", private.ProcessCommentCommand) 878 self:RegisterChatCommand("comment", private.ProcessCommentCommand)
878 end 879 end
987 local _, _, _, _, _, _, _, _, _, _, _, _, _, bonus_ids = (":"):split(item_string) 988 local _, _, _, _, _, _, _, _, _, _, _, _, _, bonus_ids = (":"):split(item_string)
988 989
989 upgrade_id = tonumber(upgrade_id) 990 upgrade_id = tonumber(upgrade_id)
990 instance_difficulty_id = tonumber(instance_difficulty_id) 991 instance_difficulty_id = tonumber(instance_difficulty_id)
991 num_bonus_ids = tonumber(num_bonus_ids) 992 num_bonus_ids = tonumber(num_bonus_ids)
992 993 suffix_id = tonumber(suffix_id)
993 if not num_bonus_ids or num_bonus_ids == 0 then 994 if (not num_bonus_ids) or (num_bonus_ids == 0) then
994 if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then 995 if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then
995 item = DBEntry("items", item_id) 996 item = DBEntry("items", item_id)
996 item.unique_id = bit.band(unique_id, 0xFFFF) 997 item.unique_id = bit.band(unique_id, 0xFFFF)
997 998
998 if suffix_id and suffix_id ~= 0 then 999 if suffix_id and suffix_id ~= 0 then
1012 if not item.bonus_ids then 1013 if not item.bonus_ids then
1013 item.bonus_ids = {} 1014 item.bonus_ids = {}
1014 end 1015 end
1015 1016
1016 for bonus_index = 1, num_bonus_ids do 1017 for bonus_index = 1, num_bonus_ids do
1017 item.bonus_ids[bonus_ids[bonus_index]] = true 1018 item.bonus_ids[tonumber(bonus_ids[bonus_index])] = true
1018 end 1019 end
1019 else 1020 else
1020 Debug("RecordItemData: Item_system is supposed to be 0 or positive, instead it was %s.", item_system) 1021 Debug("RecordItemData: Item_system is supposed to be 0 or positive, instead it was %s.", item_system)
1021 end 1022 end
1022 if upgrade_id and upgrade_id ~= 0 then 1023 if upgrade_id and upgrade_id ~= 0 then
2400 local available = _G.GetTrainerServiceTypeFilter("available") 2401 local available = _G.GetTrainerServiceTypeFilter("available")
2401 local unavailable = _G.GetTrainerServiceTypeFilter("unavailable") 2402 local unavailable = _G.GetTrainerServiceTypeFilter("unavailable")
2402 local used = _G.GetTrainerServiceTypeFilter("used") 2403 local used = _G.GetTrainerServiceTypeFilter("used")
2403 2404
2404 -- Clear the trainer filters 2405 -- Clear the trainer filters
2405 _G.SetTrainerServiceTypeFilter("available", 1) 2406 _G.SetTrainerServiceTypeFilter("available", true)
2406 _G.SetTrainerServiceTypeFilter("unavailable", 1) 2407 _G.SetTrainerServiceTypeFilter("unavailable", true)
2407 _G.SetTrainerServiceTypeFilter("used", 1) 2408 _G.SetTrainerServiceTypeFilter("used", true)
2408 2409
2409 for index = 1, _G.GetNumTrainerServices(), 1 do 2410 for index = 1, _G.GetNumTrainerServices(), 1 do
2410 local spell_name, rank_name, _, _, required_level = _G.GetTrainerServiceInfo(index) 2411 local spell_name, rank_name, _, _, required_level = _G.GetTrainerServiceInfo(index)
2411 2412
2412 if spell_name then 2413 if spell_name then
2434 profession_skills[spell_id] = ("%d:%d:%d"):format(required_level, min_skill, _G.GetTrainerServiceCost(index)) 2435 profession_skills[spell_id] = ("%d:%d:%d"):format(required_level, min_skill, _G.GetTrainerServiceCost(index))
2435 end 2436 end
2436 end 2437 end
2437 end 2438 end
2438 -- Reset the filters to what they were before 2439 -- Reset the filters to what they were before
2439 _G.SetTrainerServiceTypeFilter("available", available or 0) 2440 _G.SetTrainerServiceTypeFilter("available", available or false)
2440 _G.SetTrainerServiceTypeFilter("unavailable", unavailable or 0) 2441 _G.SetTrainerServiceTypeFilter("unavailable", unavailable or false)
2441 _G.SetTrainerServiceTypeFilter("used", used or 0) 2442 _G.SetTrainerServiceTypeFilter("used", used or false)
2442 end 2443 end
2443 2444
2444 2445
2445 function WDP:UNIT_SPELLCAST_SENT(event_name, unit_id, spell_name, spell_rank, target_name, spell_line) 2446 function WDP:UNIT_SPELLCAST_SENT(event_name, unit_id, spell_name, spell_rank, target_name, spell_line)
2446 if private.tracked_line or unit_id ~= "player" then 2447 if private.tracked_line or unit_id ~= "player" then