comparison Main.lua @ 518:0635db205d44

Trim excess spaces.
author MMOSimca <mmosimca@gmail.com>
date Tue, 08 Nov 2016 19:03:54 -0500
parents 0ca9202b8d7d
children 2325dbe5c10a
comparison
equal deleted inserted replaced
517:0ca9202b8d7d 518:0635db205d44
566 -- We might want to use some of this new information later, but leaving the returns alone for now 566 -- We might want to use some of this new information later, but leaving the returns alone for now
567 local guid_pieces = { ("-"):split(guid) } 567 local guid_pieces = { ("-"):split(guid) }
568 local unit_type_name, unk_field, server_id, instance_id, zone_uid, unit_id, spawn_uid, player_uid = guid_pieces[1] 568 local unit_type_name, unk_field, server_id, instance_id, zone_uid, unit_id, spawn_uid, player_uid = guid_pieces[1]
569 569
570 local unit_type = MatchUnitTypes(unit_type_name) 570 local unit_type = MatchUnitTypes(unit_type_name)
571 571
572 -- Creatures, GameObjects, Vehicles, and Vignettes 572 -- Creatures, GameObjects, Vehicles, and Vignettes
573 if unit_type ~= UNIT_TYPES.PLAYER and unit_type ~= UNIT_TYPES.PET and unit_type ~= UNIT_TYPES.ITEM then 573 if unit_type ~= UNIT_TYPES.PLAYER and unit_type ~= UNIT_TYPES.PET and unit_type ~= UNIT_TYPES.ITEM then
574 unk_field, server_id, instance_id, zone_uid, unit_id, spawn_uid = guid_pieces[2], guid_pieces[3], guid_pieces[4], guid_pieces[5], guid_pieces[6], guid_pieces[7] 574 unk_field, server_id, instance_id, zone_uid, unit_id, spawn_uid = guid_pieces[2], guid_pieces[3], guid_pieces[4], guid_pieces[5], guid_pieces[6], guid_pieces[7]
575 575
576 local id_mapping = NPC_ID_MAPPING[unit_id] 576 local id_mapping = NPC_ID_MAPPING[unit_id]
585 585
586 -- Items 586 -- Items
587 elseif unit_type == UNIT_TYPES.ITEM then 587 elseif unit_type == UNIT_TYPES.ITEM then
588 server_id, unk_field, spawn_uid = guid_pieces[2], guid_pieces[3], guid_pieces[4] 588 server_id, unk_field, spawn_uid = guid_pieces[2], guid_pieces[3], guid_pieces[4]
589 end 589 end
590 590
591 -- Pets and other (i.e. do nothing) 591 -- Pets and other (i.e. do nothing)
592 return unit_type, unit_id 592 return unit_type, unit_id
593 end 593 end
594 594
595 private.ParseGUID = ParseGUID 595 private.ParseGUID = ParseGUID
976 976
977 -- Gather known languages 977 -- Gather known languages
978 for index = 1, _G.GetNumLanguages() do 978 for index = 1, _G.GetNumLanguages() do
979 languages_known[_G.GetLanguageByIndex(index)] = true 979 languages_known[_G.GetLanguageByIndex(index)] = true
980 end 980 end
981 981
982 -- Populate currency data from known currency information 982 -- Populate currency data from known currency information
983 PopulateCurrencyInfoLookup() 983 PopulateCurrencyInfoLookup()
984 984
985 -- These timers loop indefinitely using Lua's infinity constant 985 -- These timers loop indefinitely using Lua's infinity constant
986 item_process_timer_handle = C_Timer.NewTicker(DELAY_PROCESS_ITEMS, WDP.ProcessItems, math.huge) 986 item_process_timer_handle = C_Timer.NewTicker(DELAY_PROCESS_ITEMS, WDP.ProcessItems, math.huge)
2547 end 2547 end
2548 end 2548 end
2549 local currency_list = {} 2549 local currency_list = {}
2550 local item_count = _G.GetMerchantItemCostInfo(item_index) 2550 local item_count = _G.GetMerchantItemCostInfo(item_index)
2551 2551
2552 -- Keeping this around in case Blizzard makes the two points diverge at some point. 2552 -- Keeping this around in case Blizzard makes the two ratings (personal and battleground) diverge at some point
2553 -- price_string = ("%s:%s:%s:%s"):format(price_string, battleground_rating, personal_rating, required_season_amount or 0) 2553 --price_string = ("%s:%s:%s:%s"):format(price_string, battleground_rating, personal_rating, required_season_amount or 0)
2554 price_string = ("%s:%s:%s"):format(price_string, personal_rating, required_season_amount or 0) 2554 price_string = ("%s:%s:%s"):format(price_string, personal_rating, required_season_amount or 0)
2555 2555
2556 for cost_index = 1, item_count do 2556 for cost_index = 1, item_count do
2557 -- The third return (Blizz calls "currency_link") of GetMerchantItemCostItem only returns item links as of Patch 5.3.0. 2557 -- The third return (Blizz calls "currency_link") of GetMerchantItemCostItem only returns item links as of Patch 5.3.0.
2558 local texture_path, amount_required, item_link, name = _G.GetMerchantItemCostItem(item_index, cost_index) 2558 local texture_path, amount_required, item_link, name = _G.GetMerchantItemCostItem(item_index, cost_index)