-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGearHelper.lua
More file actions
executable file
·70 lines (62 loc) · 2.29 KB
/
GearHelper.lua
File metadata and controls
executable file
·70 lines (62 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
-- Remove unused localization
-- Localize all plain text found in code
-- Cleanup settings
-- Make bosses killed icons update when reopening LFG panel
-- Check why kill a mob trigger a bunch of "OnTooltipSetItem"
-- Fix version messages ask/answer
-- Remove Gearhelper.lua and split remaining function in appropriate folders/files
-- Fix TODOs in GH_QuestReward.lua
-- Fix TODOs in GH_RaidFinder.lua
-- Fix TODOs in GH_Slash.lua
-- Fix TODOs in GH_Group.lua
-- Fix TODOs in GH_Player.lua
-- Fix TODOs in GH_Quest.lua
-- Fix TODOs in GH_AutoEquip.lua
-- Fix TODOs in GH_Items.lua
-- Fix TODOs in GH_Messages.lua
-- Fix error when deactivating Bosses Killed option
function GearHelper:setInviteMessage(newMessage)
if newMessage == nil then
return
end
self.db.profile.inviteMessage = tostring(newMessage)
print(self.locals["InviteMessage"] .. tostring(self.db.profile.inviteMessage))
end
function GearHelper:showMessageSMN(channel, sender, msg)
if not self.db.profile.sayMyName or not msg then
return
end
local stop = false
local arrayNames = GHToolbox:MySplit(self.db.global.myNames, ",")
if arrayNames[1] == nil then
return
end
local i = 1
while (not stop and arrayNames[i]) do
if (string.match(msg:lower(), arrayNames[i]:lower())) then
UIErrorsFrame:AddMessage(channel .. " [" .. sender .. "]: " .. msg, 0.0, 1.0, 0.0)
PlaySound(5275, "Master")
stop = true
return
end
i = i + 1
end
end
function GearHelper:ScanCharacter()
for slotID, itemCached in pairs(GearHelperVars.charInventory) do
local item = Item:CreateFromEquipmentSlot(slotID)
if item:IsItemEmpty() then
GearHelperVars.charInventory[slotID] = GHItem:CreateEmpty()
elseif not (itemCached.itemLink == item:GetItemLink()) then
if (item:IsItemDataCached() == false) then
self:Print("Item in slot " .. slotID .. " not in cache")
end
item:ContinueOnItemLoad(
function()
-- self:Print("Scanning character slot " .. slotID .. " = " .. item:GetItemLink())
GearHelperVars.charInventory[slotID] = GHItem:Create(item:GetItemLink())
end
)
end
end
end