root/GHI/Items/GHI_ItemInfo.lua

598611
16
function GHI_ItemInfo(itemTable)
16
function GHI_ItemInfo(itemTable)
17
	local class = GHClass("GHI_ItemInfo");
17
	local class = GHClass("GHI_ItemInfo");
18
18
19
	local guid, name, itemType, quality, white1, white2, comment, icon, useText, stackSize, version, authorName;
19
	local guid, name, itemType, quality, white1, white2, comment, icon, useText, stackSize, version, authorName, isAdvanced;
20
    local authorGuid, rawData, cooldown, tooltipLines, attributes,lastCastTime,simpleActions;
20
    local authorGuid, rawData, cooldown, tooltipLines, attributes,lastCastTime,simpleActions;
21
	local editableByOthers,copyableByOthers,actionVersion,isAdvancedItem,consumed;
21
	local editableByOthers,copyableByOthers,actionVersion,isAdvancedItem,consumed,dynamicActionSet;
22
	local InitializeItemData,HandleMultiLanguageInputs;
22
	local InitializeItemData,HandleMultiLanguageInputs;
23
23
24
	local errorThrower = GHI_ErrorThrower();
24
	local errorThrower = GHI_ErrorThrower();
...
...
51
		editableByOthers = false;
51
		editableByOthers = false;
52
		isAdvancedItem = false;
52
		isAdvancedItem = false;
53
		consumed = false;
53
		consumed = false;
54
		isAdvanced = false;
54
		
55
		
55
		if type(itemTable)=="table" then
56
		if type(itemTable)=="table" then
56
			local t = itemTable;
57
			local t = itemTable;
...
...
97
					end
98
					end
98
				end
99
				end
99
			end
100
			end
101
102
			isAdvanced = t.isAdvanced;
100
		end
103
		end
101
	end;
104
	end;
102
105
...
...
448
451
449
	end
452
	end
450
453
454
	class.IsAdvanced = function()
455
		return isAdvanced;
456
	end
457
458
	class.ConvertToAdvanced = function()
459
		dynamicActionSet = GHI_DynamicActionInstanceSet();
460
461
		-- todo: change actions into dynamic actions
462
463
464
		isAdvanced = true;
465
	end
466
467
	class.GetDynamicActionSet = function()
468
		if isAdvanced then
469
			return dynamicActionSet;
470
		end
471
	end
472
473
474
451
	class.SetName = function(_name) name = _name; end
475
	class.SetName = function(_name) name = _name; end
452
	class.SetWhite1 = function(_white1) white1 = _white1; end
476
	class.SetWhite1 = function(_white1) white1 = _white1; end
453
	class.SetWhite2 = function(_white2) white2 = _white2; end
477
	class.SetWhite2 = function(_white2) white2 = _white2; end