comparison Main.lua @ 94:75751f08d9f5

Account for sub headers in the TradeSkill window.
author James D. Callahan III <jcallahan@curse.com>
date Wed, 29 Aug 2012 11:17:15 -0500
parents 526e78d7ce51
children c4172766561f
comparison
equal deleted inserted replaced
93:526e78d7ce51 94:75751f08d9f5
1361 1361
1362 -- Expand all headers so we can see all the recipes there are 1362 -- Expand all headers so we can see all the recipes there are
1363 for tradeskill_index = 1, _G.GetNumTradeSkills() do 1363 for tradeskill_index = 1, _G.GetNumTradeSkills() do
1364 local name, tradeskill_type, _, is_expanded = _G.GetTradeSkillInfo(tradeskill_index) 1364 local name, tradeskill_type, _, is_expanded = _G.GetTradeSkillInfo(tradeskill_index)
1365 1365
1366 if tradeskill_type == "header" then 1366 if tradeskill_type == "header" or tradeskill_type == "subheader" then
1367 if not is_expanded then 1367 if not is_expanded then
1368 header_list[name] = true 1368 header_list[name] = true
1369 _G.ExpandTradeSkillSubClass(tradeskill_index) 1369 _G.ExpandTradeSkillSubClass(tradeskill_index)
1370 end 1370 end
1371 else 1371 else
1519 end 1519 end
1520 end 1520 end
1521 private.tracked_line = spell_line 1521 private.tracked_line = spell_line
1522 end 1522 end
1523 1523
1524
1524 function WDP:UNIT_SPELLCAST_SUCCEEDED(event_name, unit_id, spell_name, spell_rank, spell_line, spell_id) 1525 function WDP:UNIT_SPELLCAST_SUCCEEDED(event_name, unit_id, spell_name, spell_rank, spell_line, spell_id)
1525 if unit_id ~= "player" then 1526 if unit_id ~= "player" then
1526 return 1527 return
1527 end 1528 end
1528 private.tracked_line = nil 1529 private.tracked_line = nil