Compatibility with GetSpellInfoVanilla (#1)
Co-authored-by: Lexie <6937574+Lexiebean@users.noreply.github.com>
This commit is contained in:
+66
-66
@@ -1226,7 +1226,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
||||||
quantityFrame:SetText("")
|
quantityFrame:SetText("")
|
||||||
elseif isEnchant then
|
elseif isEnchant then
|
||||||
spellName = GetSpellInfoVanillaDB["enchants"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["name"]
|
spellName = GetSpellInfoAtlasLootDB["enchants"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["name"]
|
||||||
spellIcon = dataSource[dataID][i][2]
|
spellIcon = dataSource[dataID][i][2]
|
||||||
text = AtlasLoot_FixText(string.sub(dataSource[dataID][i][3], 1, 4)..spellName)
|
text = AtlasLoot_FixText(string.sub(dataSource[dataID][i][3], 1, 4)..spellName)
|
||||||
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
||||||
@@ -1235,8 +1235,8 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
spellName = dataSource[dataID][i][3]
|
spellName = dataSource[dataID][i][3]
|
||||||
spellIcon = dataSource[dataID][i][2]
|
spellIcon = dataSource[dataID][i][2]
|
||||||
text = AtlasLoot_FixText(spellName)
|
text = AtlasLoot_FixText(spellName)
|
||||||
local qtyMin = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["craftQuantityMin"];
|
local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["craftQuantityMin"];
|
||||||
local qtyMax = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["craftQuantityMax"];
|
local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(dataSource[dataID][i][1], 2))]["craftQuantityMax"];
|
||||||
if qtyMin and qtyMin ~= "" then
|
if qtyMin and qtyMin ~= "" then
|
||||||
if qtyMax and qtyMax ~= "" then
|
if qtyMax and qtyMax ~= "" then
|
||||||
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
quantityFrame = getglobal("AtlasLootItem_"..i.."_Quantity");
|
||||||
@@ -1432,15 +1432,15 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
itemButton.iteminfo.idcore = dataSource[dataID][i][2];
|
itemButton.iteminfo.idcore = dataSource[dataID][i][2];
|
||||||
_, _, _, _, _, _, _, _, itemButton.iteminfo.icontexture = GetItemInfo(dataSource[dataID][i][2]);
|
_, _, _, _, _, _, _, _, itemButton.iteminfo.icontexture = GetItemInfo(dataSource[dataID][i][2]);
|
||||||
itemButton.storeID = dataSource[dataID][i][2];
|
itemButton.storeID = dataSource[dataID][i][2];
|
||||||
if GetSpellInfoVanillaDB["enchants"][spellID]["item"] and GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= "" then
|
if GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] and GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= "" then
|
||||||
itemButton.dressingroomID = GetSpellInfoVanillaDB["enchants"][spellID]["item"];
|
itemButton.dressingroomID = GetSpellInfoAtlasLootDB["enchants"][spellID]["item"];
|
||||||
else
|
else
|
||||||
itemButton.dressingroomID = spellID;
|
itemButton.dressingroomID = spellID;
|
||||||
end
|
end
|
||||||
itemButton.extraText = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
|
itemButton.extraText = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
|
||||||
if GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= "" then
|
if GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= "" then
|
||||||
if not GetItemInfo(GetSpellInfoVanillaDB["enchants"][spellID]["item"]) then
|
if not GetItemInfo(GetSpellInfoAtlasLootDB["enchants"][spellID]["item"]) then
|
||||||
GameTooltip:SetHyperlink("item:"..GetSpellInfoVanillaDB["enchants"][spellID]["item"]..":0:0:0");
|
GameTooltip:SetHyperlink("item:"..GetSpellInfoAtlasLootDB["enchants"][spellID]["item"]..":0:0:0");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif isSpell then
|
elseif isSpell then
|
||||||
@@ -1448,25 +1448,25 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
itemButton.iteminfo.idcore = dataSource[dataID][i][1];
|
itemButton.iteminfo.idcore = dataSource[dataID][i][1];
|
||||||
_, _, _, _, _, _, _, _, itemButton.iteminfo.icontexture = GetItemInfo(dataSource[dataID][i][1]);
|
_, _, _, _, _, _, _, _, itemButton.iteminfo.icontexture = GetItemInfo(dataSource[dataID][i][1]);
|
||||||
itemButton.storeID = dataSource[dataID][i][1];
|
itemButton.storeID = dataSource[dataID][i][1];
|
||||||
itemButton.dressingroomID = GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"];
|
itemButton.dressingroomID = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"];
|
||||||
itemButton.extraText = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
|
itemButton.extraText = getglobal("AtlasLootItem_"..i.."_Extra"):GetText()
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"] ~= "" then
|
||||||
if not GetItemInfo(GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"]) then
|
if not GetItemInfo(GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"]) then
|
||||||
GameTooltip:SetHyperlink("item:"..GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"]..":0:0:0");
|
GameTooltip:SetHyperlink("item:"..GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"]..":0:0:0");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"] ~= "" then
|
||||||
for i = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"]) do
|
for i = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"]) do
|
||||||
local reagent = GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"][i]
|
local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][i]
|
||||||
if not GetItemInfo(reagent[1]) then
|
if not GetItemInfo(reagent[1]) then
|
||||||
GameTooltip:SetHyperlink("item:"..reagent[1]..":0:0:0");
|
GameTooltip:SetHyperlink("item:"..reagent[1]..":0:0:0");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["tools"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"] ~= "" then
|
||||||
for i = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][spellID]["tools"]) do
|
for i = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"]) do
|
||||||
if not GetItemInfo(GetSpellInfoVanillaDB["craftspells"][spellID]["tools"][i]) then
|
if not GetItemInfo(GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"][i]) then
|
||||||
GameTooltip:SetHyperlink("item:"..GetSpellInfoVanillaDB["craftspells"][spellID]["tools"][i]..":0:0:0");
|
GameTooltip:SetHyperlink("item:"..GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"][i]..":0:0:0");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3375,41 +3375,41 @@ function AtlasLootItem_OnEnter()
|
|||||||
AtlasLootTooltip:AddLine(BLUE..AL["SpellID:"].." "..spellID, nil, nil, nil, 1);
|
AtlasLootTooltip:AddLine(BLUE..AL["SpellID:"].." "..spellID, nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
AtlasLootTooltip:Show();
|
AtlasLootTooltip:Show();
|
||||||
if GetSpellInfoVanillaDB["enchants"][spellID]["item"] and GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoVanillaDB["enchants"][spellID]["item"] ~= "" then
|
if GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] and GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= nil and GetSpellInfoAtlasLootDB["enchants"][spellID]["item"] ~= "" then
|
||||||
AtlasLootTooltip2:SetOwner(AtlasLootTooltip, "ANCHOR_BOTTOMRIGHT", -(AtlasLootTooltip:GetWidth()), 0);
|
AtlasLootTooltip2:SetOwner(AtlasLootTooltip, "ANCHOR_BOTTOMRIGHT", -(AtlasLootTooltip:GetWidth()), 0);
|
||||||
AtlasLootTooltip2:ClearLines();
|
AtlasLootTooltip2:ClearLines();
|
||||||
AtlasLootTooltip2:SetHyperlink("item:"..GetSpellInfoVanillaDB["enchants"][spellID]["item"]..":0:0:0");
|
AtlasLootTooltip2:SetHyperlink("item:"..GetSpellInfoAtlasLootDB["enchants"][spellID]["item"]..":0:0:0");
|
||||||
if GetSpellInfoVanillaDB["enchants"][spellID]["extra"] and GetSpellInfoVanillaDB["enchants"][spellID]["extra"] ~= nil and GetSpellInfoVanillaDB["enchants"][spellID]["extra"] ~= "" then
|
if GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"] and GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"] ~= nil and GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"] ~= "" then
|
||||||
AtlasLootTooltip2:AddLine(GetSpellInfoVanillaDB["enchants"][spellID]["extra"], nil, nil, nil, 1);
|
AtlasLootTooltip2:AddLine(GetSpellInfoAtlasLootDB["enchants"][spellID]["extra"], nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
if ( AtlasLootCharDB.ItemIDs ) then
|
if ( AtlasLootCharDB.ItemIDs ) then
|
||||||
AtlasLootTooltip2:AddLine(BLUE..AL["ItemID:"].." "..GetSpellInfoVanillaDB["enchants"][spellID]["item"], nil, nil, nil, 1);
|
AtlasLootTooltip2:AddLine(BLUE..AL["ItemID:"].." "..GetSpellInfoAtlasLootDB["enchants"][spellID]["item"], nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
AtlasLootTooltip2:Show();
|
AtlasLootTooltip2:Show();
|
||||||
end
|
end
|
||||||
elseif isSpell then
|
elseif isSpell then
|
||||||
spellID = tonumber(string.sub(this.itemID, 2));
|
spellID = tonumber(string.sub(this.itemID, 2));
|
||||||
local TooltipTools, TooltipReagents = "", "";
|
local TooltipTools, TooltipReagents = "", "";
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["tools"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"] ~= "" then
|
||||||
for i = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][spellID]["tools"]) do
|
for i = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"]) do
|
||||||
AtlasLoot_CheckBagsForItems(GetSpellInfoVanillaDB["craftspells"][spellID]["tools"][i])
|
AtlasLoot_CheckBagsForItems(GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"][i])
|
||||||
TooltipTools = TooltipTools..AtlasLoot_CheckBagsForItems(GetSpellInfoVanillaDB["craftspells"][spellID]["tools"][i])..WHITE..", "
|
TooltipTools = TooltipTools..AtlasLoot_CheckBagsForItems(GetSpellInfoAtlasLootDB["craftspells"][spellID]["tools"][i])..WHITE..", "
|
||||||
end
|
end
|
||||||
TooltipTools = string.sub(TooltipTools, 1, -3)
|
TooltipTools = string.sub(TooltipTools, 1, -3)
|
||||||
end
|
end
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"] ~= "" then
|
||||||
for i = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"]) do
|
for i = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"]) do
|
||||||
local reagent = GetSpellInfoVanillaDB["craftspells"][spellID]["reagents"][i]
|
local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][i]
|
||||||
TooltipReagents = TooltipReagents..AtlasLoot_CheckBagsForItems(reagent[1], reagent[2])..WHITE..", "
|
TooltipReagents = TooltipReagents..AtlasLoot_CheckBagsForItems(reagent[1], reagent[2])..WHITE..", "
|
||||||
end
|
end
|
||||||
TooltipReagents = string.sub(TooltipReagents, 1, -3)
|
TooltipReagents = string.sub(TooltipReagents, 1, -3)
|
||||||
end
|
end
|
||||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||||
AtlasLootTooltip:ClearLines();
|
AtlasLootTooltip:ClearLines();
|
||||||
AtlasLootTooltip:AddLine(GetSpellInfoVanillaDB["craftspells"][spellID]["name"]);
|
AtlasLootTooltip:AddLine(GetSpellInfoAtlasLootDB["craftspells"][spellID]["name"]);
|
||||||
AtlasLootTooltip:AddLine(WHITE..GetSpellInfoVanillaDB["craftspells"][spellID]["castTime"].." sec cast");
|
AtlasLootTooltip:AddLine(WHITE..GetSpellInfoAtlasLootDB["craftspells"][spellID]["castTime"].." sec cast");
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["requires"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["requires"] ~= "" then
|
||||||
AtlasLootTooltip:AddLine(WHITE.."Requires: "..GetSpellInfoVanillaDB["craftspells"][spellID]["requires"]);
|
AtlasLootTooltip:AddLine(WHITE.."Requires: "..GetSpellInfoAtlasLootDB["craftspells"][spellID]["requires"]);
|
||||||
end
|
end
|
||||||
if TooltipTools ~= "" then
|
if TooltipTools ~= "" then
|
||||||
AtlasLootTooltip:AddLine(WHITE.."Tools: "..TooltipTools, nil, nil, nil, 1);
|
AtlasLootTooltip:AddLine(WHITE.."Tools: "..TooltipTools, nil, nil, nil, 1);
|
||||||
@@ -3417,8 +3417,8 @@ function AtlasLootItem_OnEnter()
|
|||||||
if TooltipReagents ~= "" then
|
if TooltipReagents ~= "" then
|
||||||
AtlasLootTooltip:AddLine(WHITE.."Reagents: "..TooltipReagents, nil, nil, nil, 1);
|
AtlasLootTooltip:AddLine(WHITE.."Reagents: "..TooltipReagents, nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["text"] ~= "" then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["text"] ~= "" then
|
||||||
AtlasLootTooltip:AddLine(GetSpellInfoVanillaDB["craftspells"][spellID]["text"], nil, nil, nil, 1);
|
AtlasLootTooltip:AddLine(GetSpellInfoAtlasLootDB["craftspells"][spellID]["text"], nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
if ( AtlasLootCharDB.ItemIDs ) then
|
if ( AtlasLootCharDB.ItemIDs ) then
|
||||||
if spellID < 100000 then
|
if spellID < 100000 then
|
||||||
@@ -3434,16 +3434,16 @@ function AtlasLootItem_OnEnter()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
AtlasLootTooltip:Show();
|
AtlasLootTooltip:Show();
|
||||||
local craftitem2 = GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"]
|
local craftitem2 = GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"]
|
||||||
if craftitem2 ~= nil and craftitem2 ~= "" then
|
if craftitem2 ~= nil and craftitem2 ~= "" then
|
||||||
AtlasLootTooltip2:SetOwner(AtlasLootTooltip, "ANCHOR_BOTTOMRIGHT", -(AtlasLootTooltip:GetWidth()), 0);
|
AtlasLootTooltip2:SetOwner(AtlasLootTooltip, "ANCHOR_BOTTOMRIGHT", -(AtlasLootTooltip:GetWidth()), 0);
|
||||||
AtlasLootTooltip2:ClearLines();
|
AtlasLootTooltip2:ClearLines();
|
||||||
AtlasLootTooltip2:SetHyperlink("item:"..GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"]..":0:0:0");
|
AtlasLootTooltip2:SetHyperlink("item:"..GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"]..":0:0:0");
|
||||||
if GetSpellInfoVanillaDB["craftspells"][spellID]["extra"] and GetSpellInfoVanillaDB["craftspells"][spellID]["extra"] ~= nil then
|
if GetSpellInfoAtlasLootDB["craftspells"][spellID]["extra"] and GetSpellInfoAtlasLootDB["craftspells"][spellID]["extra"] ~= nil then
|
||||||
AtlasLootTooltip2:AddLine(GetSpellInfoVanillaDB["craftspells"][spellID]["extra"], nil, nil, nil, 1);
|
AtlasLootTooltip2:AddLine(GetSpellInfoAtlasLootDB["craftspells"][spellID]["extra"], nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
if ( AtlasLootCharDB.ItemIDs ) then
|
if ( AtlasLootCharDB.ItemIDs ) then
|
||||||
AtlasLootTooltip2:AddLine(BLUE..AL["ItemID:"].." "..GetSpellInfoVanillaDB["craftspells"][spellID]["craftItem"], nil, nil, nil, 1);
|
AtlasLootTooltip2:AddLine(BLUE..AL["ItemID:"].." "..GetSpellInfoAtlasLootDB["craftspells"][spellID]["craftItem"], nil, nil, nil, 1);
|
||||||
end
|
end
|
||||||
AtlasLootTooltip2:Show();
|
AtlasLootTooltip2:Show();
|
||||||
end
|
end
|
||||||
@@ -3587,7 +3587,7 @@ function AtlasLootItem_OnClick(arg1)
|
|||||||
if IsShiftKeyDown() then
|
if IsShiftKeyDown() then
|
||||||
if tonumber(string.sub(this.itemID, 2)) < 100000 then
|
if tonumber(string.sub(this.itemID, 2)) < 100000 then
|
||||||
if WIM_EditBoxInFocus then
|
if WIM_EditBoxInFocus then
|
||||||
local craftitem = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
||||||
if craftitem ~= nil and craftitem ~= "" then
|
if craftitem ~= nil and craftitem ~= "" then
|
||||||
local craftname = GetItemInfo(craftitem)
|
local craftname = GetItemInfo(craftitem)
|
||||||
WIM_EditBoxInFocus:Insert("\124"..string.sub(color, 2).."|Hitem:"..craftitem.."\124h["..craftname.."]|h|r");
|
WIM_EditBoxInFocus:Insert("\124"..string.sub(color, 2).."|Hitem:"..craftitem.."\124h["..craftname.."]|h|r");
|
||||||
@@ -3595,7 +3595,7 @@ function AtlasLootItem_OnClick(arg1)
|
|||||||
WIM_EditBoxInFocus:Insert(name);
|
WIM_EditBoxInFocus:Insert(name);
|
||||||
end
|
end
|
||||||
elseif ChatFrameEditBox:IsVisible() then
|
elseif ChatFrameEditBox:IsVisible() then
|
||||||
local craftitem = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
||||||
if craftitem ~= nil and craftitem ~= "" then
|
if craftitem ~= nil and craftitem ~= "" then
|
||||||
local craftname = GetItemInfo(craftitem)
|
local craftname = GetItemInfo(craftitem)
|
||||||
--ChatFrameEditBox:Insert("\124"..string.sub(color, 2).."|Hitem:"..craftitem.."\124h["..craftname.."]|h|r");
|
--ChatFrameEditBox:Insert("\124"..string.sub(color, 2).."|Hitem:"..craftitem.."\124h["..craftname.."]|h|r");
|
||||||
@@ -3608,18 +3608,18 @@ function AtlasLootItem_OnClick(arg1)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
if WIM_EditBoxInFocus then
|
if WIM_EditBoxInFocus then
|
||||||
local craftitem = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
||||||
if craftitem ~= nil and craftitem ~= "" then
|
if craftitem ~= nil and craftitem ~= "" then
|
||||||
local craftname = GetItemInfo(craftitem)
|
local craftname = GetItemInfo(craftitem)
|
||||||
WIM_EditBoxInFocus:Insert(AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]));
|
WIM_EditBoxInFocus:Insert(AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]));
|
||||||
else
|
else
|
||||||
WIM_EditBoxInFocus:Insert(name);
|
WIM_EditBoxInFocus:Insert(name);
|
||||||
end
|
end
|
||||||
elseif ChatFrameEditBox:IsVisible() then
|
elseif ChatFrameEditBox:IsVisible() then
|
||||||
local craftitem = GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]
|
||||||
if craftitem ~= nil and craftitem ~= "" then
|
if craftitem ~= nil and craftitem ~= "" then
|
||||||
local craftname = GetItemInfo(craftitem)
|
local craftname = GetItemInfo(craftitem)
|
||||||
ChatFrameEditBox:Insert(AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]));
|
ChatFrameEditBox:Insert(AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]));
|
||||||
else
|
else
|
||||||
ChatFrameEditBox:Insert(name);
|
ChatFrameEditBox:Insert(name);
|
||||||
end
|
end
|
||||||
@@ -3629,7 +3629,7 @@ function AtlasLootItem_OnClick(arg1)
|
|||||||
elseif channel == "CHANNEL" then
|
elseif channel == "CHANNEL" then
|
||||||
chatnumber = ChatFrameEditBox.channelTarget
|
chatnumber = ChatFrameEditBox.channelTarget
|
||||||
end
|
end
|
||||||
SendChatMessage(AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]),channel,nil,chatnumber);
|
SendChatMessage(AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["craftspells"][tonumber(string.sub(this.itemID, 2))]["craftItem"]),channel,nil,chatnumber);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif(IsAltKeyDown() and (this.itemID ~= 0)) then
|
elseif(IsAltKeyDown() and (this.itemID ~= 0)) then
|
||||||
@@ -3735,11 +3735,11 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
|
|||||||
end
|
end
|
||||||
if string.sub( id, 1, 1 ) == "s" then
|
if string.sub( id, 1, 1 ) == "s" then
|
||||||
local spellid = string.sub( id, 2 )
|
local spellid = string.sub( id, 2 )
|
||||||
local craftitem = GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["craftItem"]
|
local craftitem = GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["craftItem"]
|
||||||
if craftitem ~= nil and craftitem ~= "" then
|
if craftitem ~= nil and craftitem ~= "" then
|
||||||
local craftnumber = "";
|
local craftnumber = "";
|
||||||
local qtyMin = GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["craftQuantityMin"];
|
local qtyMin = GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["craftQuantityMin"];
|
||||||
local qtyMax = GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["craftQuantityMax"];
|
local qtyMax = GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["craftQuantityMax"];
|
||||||
if qtyMin and qtyMin ~= "" then
|
if qtyMin and qtyMin ~= "" then
|
||||||
if qtyMax and qtyMax ~= "" then
|
if qtyMax and qtyMax ~= "" then
|
||||||
craftnumber = craftnumber..qtyMin.. "-"..qtyMax.."x"
|
craftnumber = craftnumber..qtyMin.. "-"..qtyMax.."x"
|
||||||
@@ -3748,12 +3748,12 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
SendChatMessage(AL["To craft "]..craftnumber..AtlasLoot_GetChatLink(craftitem)..AL[" the following reagents are needed:"],channel,nil,chatnumber);
|
SendChatMessage(AL["To craft "]..craftnumber..AtlasLoot_GetChatLink(craftitem)..AL[" the following reagents are needed:"],channel,nil,chatnumber);
|
||||||
for j = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"]) do
|
for j = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"]) do
|
||||||
local tempnumber = GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"][j][2]
|
local tempnumber = GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"][j][2]
|
||||||
if not tempnumber or tempnumber == nil or tempnumber == "" then
|
if not tempnumber or tempnumber == nil or tempnumber == "" then
|
||||||
tempnumber = 1;
|
tempnumber = 1;
|
||||||
end
|
end
|
||||||
chatline = chatline..tempnumber.."x"..AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"][j][1]).." ";
|
chatline = chatline..tempnumber.."x"..AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"][j][1]).." ";
|
||||||
itemCount = itemCount + 1;
|
itemCount = itemCount + 1;
|
||||||
if itemCount == 4 then
|
if itemCount == 4 then
|
||||||
SendChatMessage(chatline, channel, nil, chatnumber);
|
SendChatMessage(chatline, channel, nil, chatnumber);
|
||||||
@@ -3765,13 +3765,13 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
|
|||||||
SendChatMessage(chatline, channel, nil, chatnumber);
|
SendChatMessage(chatline, channel, nil, chatnumber);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
SendChatMessage(AL["To cast "]..GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["name"]..AL[" the following items are needed:"],channel,nil,chatnumber);
|
SendChatMessage(AL["To cast "]..GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["name"]..AL[" the following items are needed:"],channel,nil,chatnumber);
|
||||||
for j = 1, table.getn(GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"]) do
|
for j = 1, table.getn(GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"]) do
|
||||||
local tempnumber = GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"][j][2]
|
local tempnumber = GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"][j][2]
|
||||||
if not tempnumber or tempnumber == nil or tempnumber == "" then
|
if not tempnumber or tempnumber == nil or tempnumber == "" then
|
||||||
tempnumber = 1;
|
tempnumber = 1;
|
||||||
end
|
end
|
||||||
chatline = chatline..tempnumber.."x"..AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["craftspells"][tonumber(spellid)]["reagents"][j][1]).." ";
|
chatline = chatline..tempnumber.."x"..AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["craftspells"][tonumber(spellid)]["reagents"][j][1]).." ";
|
||||||
itemCount = itemCount + 1;
|
itemCount = itemCount + 1;
|
||||||
if itemCount == 4 then
|
if itemCount == 4 then
|
||||||
SendChatMessage(chatline, channel, nil, chatnumber);
|
SendChatMessage(chatline, channel, nil, chatnumber);
|
||||||
@@ -3785,25 +3785,25 @@ function AtlasLoot_SayItemReagents(id, color, name, safe)
|
|||||||
end
|
end
|
||||||
elseif string.sub( id,1 ,1 ) == "e" then
|
elseif string.sub( id,1 ,1 ) == "e" then
|
||||||
local spellid = string.sub( id, 2 )
|
local spellid = string.sub( id, 2 )
|
||||||
local name = GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["name"]
|
local name = GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["name"]
|
||||||
if tListActivity[1] and WIM_Windows[tListActivity[1]].is_visible then
|
if tListActivity[1] and WIM_Windows[tListActivity[1]].is_visible then
|
||||||
if not GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"] then
|
if not GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"] then
|
||||||
SendChatMessage("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
SendChatMessage("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
||||||
else
|
else
|
||||||
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif ChatFrameEditBox:IsVisible() then
|
elseif ChatFrameEditBox:IsVisible() then
|
||||||
if not GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"] then
|
if not GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"] then
|
||||||
ChatFrameEditBox:Insert("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
ChatFrameEditBox:Insert("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
||||||
else
|
else
|
||||||
ChatFrameEditBox:Insert(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
ChatFrameEditBox:Insert(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if not GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"] then
|
if not GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"] then
|
||||||
SendChatMessage("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
SendChatMessage("|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r", channel, nil, chatnumber);
|
||||||
else
|
else
|
||||||
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoVanillaDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
SendChatMessage(AL["To craft "]..AtlasLoot_GetChatLink(GetSpellInfoAtlasLootDB["enchants"][tonumber(spellid)]["item"])..AL[" you need this: "].."|cffFFd200|Henchant:"..spellid..":0:0:0|h["..name.."]|h|r",channel,nil,chatnumber);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
||||||
|
|
||||||
GetSpellInfoVanillaDB = {
|
GetSpellInfoAtlasLootDB = {
|
||||||
["enchants"] = {
|
["enchants"] = {
|
||||||
[7418] = {
|
[7418] = {
|
||||||
["name"] = "Enchant Bracer - Minor Health",
|
["name"] = "Enchant Bracer - Minor Health",
|
||||||
|
|||||||
Reference in New Issue
Block a user