Quantcast

- TitanClassicLootType cleanup needed as DungeonDifficulty and RaidDifficulty are no longer used.

HonorGoG [08-11-19 - 22:27]
- TitanClassicLootType cleanup needed as DungeonDifficulty and RaidDifficulty are no longer used.
Filename
TitanClassicLootType/TitanClassicLootType.lua
diff --git a/TitanClassicLootType/TitanClassicLootType.lua b/TitanClassicLootType/TitanClassicLootType.lua
index 8c78a0c..ec2fc70 100644
--- a/TitanClassicLootType/TitanClassicLootType.lua
+++ b/TitanClassicLootType/TitanClassicLootType.lua
@@ -47,8 +47,8 @@ function TitanPanelLootTypeButton_OnLoad(self)
 			ShowIcon = 1,
 			ShowLabelText = 1,
 			RandomRoll = 100,
-			ShowDungeonDiff = false,
-			DungeonDiffType = "AUTO",
+--			ShowDungeonDiff = false,
+--			DungeonDiffType = "AUTO",
 		}
 	};

@@ -58,6 +58,7 @@ function TitanPanelLootTypeButton_OnLoad(self)
 	self:RegisterEvent("CHAT_MSG_SYSTEM");
 end

+--[[
 function TitanPanelLootTypeButton_GetDungeonDifficultyIDText(isRaid, withpar)
 	local par1, par2 = "", ""
 	if withpar then par1, par2 = "(", ")" end
@@ -101,13 +102,15 @@ function TitanPanelLootTypeButton_GetDungeonDifficultyIDText(isRaid, withpar)
 	end
 	return diffstr
 end
+]]--

 -- **************************************************************************
 -- NAME : TitanPanelLootTypeButton_OnEvent()
 -- DESC : Parse events registered to plugin and act on them
 -- **************************************************************************
 function TitanPanelLootTypeButton_OnEvent(self, event, ...)
-	local arg1 = ...;
+--[[
+  	local arg1 = ...;
 	if event == "CHAT_MSG_SYSTEM" then
 		-- Match difficulty system message to alert addon for possible update
 		-- dungeons
@@ -140,6 +143,7 @@ function TitanPanelLootTypeButton_OnEvent(self, event, ...)
 		end
 		return;
 	end
+]]--
 	TitanPanelPluginHandle_OnUpdate(updateTable)
 end

@@ -159,6 +163,7 @@ function TitanPanelLootTypeButton_GetButtonText(id)
 		lootTypeText = _G["SOLO"];
 		color = _G["GRAY_FONT_COLOR"];
 	end
+--[[
 	if TitanGetVar(TITAN_LOOTTYPE_ID, "ShowDungeonDiff") then
 		if TitanGetVar(TITAN_LOOTTYPE_ID, "DungeonDiffType") == "DUNGEON" then
 			-- Dungeon
@@ -173,6 +178,8 @@ function TitanPanelLootTypeButton_GetButtonText(id)
 		end
 	end
 	return L["TITAN_LOOTTYPE_BUTTON_LABEL"], TitanUtils_GetColoredText(lootTypeText, color)..dungeondiff;
+]]--
+	return L["TITAN_LOOTTYPE_BUTTON_LABEL"], TitanUtils_GetColoredText(lootTypeText, color);
 end

 -- **************************************************************************
@@ -186,16 +193,16 @@ function TitanPanelLootTypeButton_GetTooltipText()
 		local itemQualityDesc = _G["ITEM_QUALITY"..lootThreshold.."_DESC"];
 		local color = _G["ITEM_QUALITY_COLORS"][lootThreshold];
 		return ""..
-			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText().."\n"..
-			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL2"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText(true).."\n"..
+--			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText().."\n"..
+--			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL2"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText(true).."\n"..
 			_G["LOOT_METHOD"]..": \t"..TitanUtils_GetHighlightText(lootTypeText).."\n"..
 			_G["LOOT_THRESHOLD"]..": \t"..TitanUtils_GetColoredText(itemQualityDesc, color).."\n"..
 			TitanUtils_GetGreenText(L["TITAN_LOOTTYPE_TOOLTIP_HINT1"]).."\n"..
 			TitanUtils_GetGreenText(L["TITAN_LOOTTYPE_TOOLTIP_HINT2"]);
 	else
-		return L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText().."\n"..
-			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL2"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText(true).."\n"..
-			TitanUtils_GetNormalText(_G["ERR_NOT_IN_GROUP"]).."\n"..
+--		return L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText().."\n"..
+--			L["TITAN_LOOTTYPE_DUNGEONDIFF_LABEL2"]..": \t"..TitanPanelLootTypeButton_GetDungeonDifficultyIDText(true).."\n"..
+		return TitanUtils_GetNormalText(_G["ERR_NOT_IN_GROUP"]).."\n"..
 			TitanUtils_GetGreenText(L["TITAN_LOOTTYPE_TOOLTIP_HINT1"]).."\n"..
 			TitanUtils_GetGreenText(L["TITAN_LOOTTYPE_TOOLTIP_HINT2"]);
 	end
@@ -248,6 +255,7 @@ function TitanPanelRightClickMenu_PrepareLootTypeMenu()
 		info.func = TitanPanelLootType_Random1000;
 		info.checked = TitanPanelLootType_GetRoll(info.value);
 		L_UIDropDownMenu_AddButton(info,_G["L_UIDROPDOWNMENU_MENU_LEVEL"]);
+--[[
 	elseif _G["L_UIDROPDOWNMENU_MENU_LEVEL"] == 2 and _G["L_UIDROPDOWNMENU_MENU_VALUE"] == "ShowDungeonDiffMenu" then
 		info = {};
 		info.text = _G["LFG_TYPE_DUNGEON"];
@@ -413,31 +421,10 @@ function TitanPanelRightClickMenu_PrepareLootTypeMenu()
 			info.disabled = false
 		end
 		L_UIDropDownMenu_AddButton(info,_G["L_UIDROPDOWNMENU_MENU_LEVEL"]);
-
---[[		info = {};
-		info.text = _G["RED_FONT_COLOR_CODE"].._G["RAID_DIFFICULTY4"].."|r";
-		info.func = function() SetRaidDifficultyID(4) end
-		info.checked = function() if GetRaidDifficultyID() == 4 then return true end return false end
-		local inParty = 0;
-		if (UnitExists("party1") or GetNumGroupMembers() > 0) then
-			inParty = 1;
-		end
-		local isLeader = 0;
-		if (UnitIsGroupLeader("player")) then
-			isLeader = 1;
-		end
-		local inInstance = IsInInstance()
-		local playerlevel = UnitLevel("player")
-		if inInstance or (inParty == 1 and isLeader == 0) or (playerlevel < 65 and GetRaidDifficultyID() == 1) then
-			info.disabled = 1
-		else
-			info.disabled = false
-		end
-		L_UIDropDownMenu_AddButton(info,_G["L_UIDROPDOWNMENU_MENU_LEVEL"]);
---]]
-
+]]--
 	else
 		TitanPanelRightClickMenu_AddTitle(TitanPlugins[TITAN_LOOTTYPE_ID].menuText);
+--[[
 		info = {};
 		info.notCheckable = true
 		info.text = L["TITAN_LOOTTYPE_SHOWDUNGEONDIFF_LABEL"]
@@ -459,6 +446,7 @@ function TitanPanelRightClickMenu_PrepareLootTypeMenu()
 		info.value = "SetRaidDiff";
 		info.hasArrow = 1;
 		L_UIDropDownMenu_AddButton(info);
+]]--
 		info = {};
 		info.notCheckable = true
 		info.text = L["TITAN_LOOTTYPE_RANDOM_ROLL_LABEL"];