removed use of playername in parameter of function CRT_Collect_Data(playername)
His Dad [12-20-14 - 05:57]
removed use of playername in parameter of function CRT_Collect_Data(playername)
diff --git a/lua/CORE.lua b/lua/CORE.lua
index 77bb9f0..c1311f9 100644
--- a/lua/CORE.lua
+++ b/lua/CORE.lua
@@ -2,20 +2,20 @@
-- v0.4.11
-function CRT_Collect_Data(playername)
- CRT.SV.Craft_data[playername].shortest = 99999999 -- for this player find next due.
- CRT_Info_Research(CRAFTING_TYPE_BLACKSMITHING, 0, playername)
- CRT_Info_Research(CRAFTING_TYPE_CLOTHIER, 1, playername)
- CRT_Info_Research(CRAFTING_TYPE_WOODWORKING, 2, playername)
+function CRT_Collect_Data()
+ CRT.SV.Craft_data[CRT.playername].shortest = 99999999 -- for this player find next due.
+ CRT_Info_Research(CRAFTING_TYPE_BLACKSMITHING, 0)
+ CRT_Info_Research(CRAFTING_TYPE_CLOTHIER, 1)
+ CRT_Info_Research(CRAFTING_TYPE_WOODWORKING, 2)
end
-function CRT_Info_Research(craft_type,id_craft,playername)
+function CRT_Info_Research(craft_type,id_craft)
local Simu_craft = 0
local MaxResearch = GetMaxSimultaneousSmithingResearch(craft_type)
local nbtype = GetNumSmithingResearchLines(craft_type) --Nombre de item craftable pour un craft(ex couture: jambe/robe/ect)
- CRT.SV.Craft_data[playername][id_craft] = {}
+ CRT.SV.Craft_data[CRT.playername][id_craft] = {}
for ResearchLines = 1, nbtype, 1 do
@@ -33,39 +33,38 @@ function CRT_Info_Research(craft_type,id_craft,playername)
- CRT.SV.Craft_data[playername][id_craft][Simu_craft] = {}
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["PlayerName"] = playername
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Alert"] = true
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["EndTimeStamp"] = GetTimeStamp() + timeRemaining
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Item_name"] = string.sub(item_name, 1, 18)
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Item_icon"] = item_icon
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Trait_name"] = trait_name
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Trait_icon"] = trait_icon
- CRT.SV.Craft_data[playername][id_craft][Simu_craft]["Trait_description"] = trait_description
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft] = {}
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["PlayerName"] = CRT.playername
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Alert"] = true
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["EndTimeStamp"] = GetTimeStamp() + timeRemaining
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Item_name"] = string.sub(item_name, 1, 18)
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Item_icon"] = item_icon
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Trait_name"] = trait_name
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Trait_icon"] = trait_icon
+ CRT.SV.Craft_data[CRT.playername][id_craft][Simu_craft]["Trait_description"] = trait_description
- if CRT.SV.Craft_data[playername].shortest > timeRemaining
- then CRT.SV.Craft_data[playername].shortest = timeRemaining
+ if CRT.SV.Craft_data[CRT.playername].shortest > timeRemaining
+ then CRT.SV.Craft_data[CRT.playername].shortest = timeRemaining
end
-- d("Type de craft :"..id_craft.." nom de l'item :"..name.." temps restant :"..temp_timer[Simu_craft])
end
end
end
- CRT.SV.Craft_data[playername][id_craft]["MaxResearch"] = MaxResearch
- CRT.SV.Craft_data[playername][id_craft]["Simu_craft"] = Simu_craft
+ CRT.SV.Craft_data[CRT.playername][id_craft]["MaxResearch"] = MaxResearch
+ CRT.SV.Craft_data[CRT.playername][id_craft]["Simu_craft"] = Simu_craft
end
function CRT_Research_started()
- local playername = GetUnitName("player")
-- erase all data for this character
- CRT.SV.Craft_data[playername] = {}
+ CRT.SV.Craft_data[CRT.playername] = {}
-- Collect new data
- CRT_Collect_Data(playername)
+ CRT_Collect_Data()
if (CRT_GRID_TLW == nil) then
CRT_GRID_Create()
end
- if (CRT_GRID_WD[playername] == nil) then
- CRT_GRID_Create_Character(playername)
+ if (CRT_GRID_WD[CRT.playername] == nil) then
+ CRT_GRID_Create_Character(CRT.playername)
end
end
\ No newline at end of file