Grab some stuff from game #1

Merged
atomaka merged 3 commits from untested-1 into master 2021-01-11 21:35:31 -05:00
Showing only changes of commit 90a020f375 - Show all commits

View file

@ -9,14 +9,20 @@ StaticPopupDialogs["REPAIR_ALERT"] = {
preferredIndex = 3 preferredIndex = 3
} }
MyAddon.keyItemID = 138019 MyAddon.keyItemID = 180653
function MyAddon.OnEvent(self, event, ...) function MyAddon.OnEvent(self, event, ...)
events[event](self, ...) events[event](self, ...)
end end
function events:CHAT_MSG_PARTY_LEADER(message, ...)
if message == '!keys' then
MyAddon.announceKey()
end
end
function events:CHAT_MSG_PARTY(message, ...) function events:CHAT_MSG_PARTY(message, ...)
if text == '!keys' then if message == '!keys' then
MyAddon.announceKey() MyAddon.announceKey()
end end
end end
@ -49,6 +55,7 @@ end
function MyAddon.announceKey() function MyAddon.announceKey()
for bag = 0, NUM_BAG_SLOTS do for bag = 0, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(bag)do for slot = 1, GetContainerNumSlots(bag)do
itemID = GetContainerItemID(bag, slot)
if GetContainerItemID(bag, slot) == MyAddon.keyItemID then if GetContainerItemID(bag, slot) == MyAddon.keyItemID then
local link = GetContainerItemLink(bag, slot) local link = GetContainerItemLink(bag, slot)
SendChatMessage(link, "PARTY") SendChatMessage(link, "PARTY")
@ -112,3 +119,22 @@ f:SetScript("OnEvent", MyAddon.OnEvent)
--[[ hooksecurefunc("TalkingHeadFrame_PlayCurrent", function() --[[ hooksecurefunc("TalkingHeadFrame_PlayCurrent", function()
TalkingHeadFrame:Hide() TalkingHeadFrame:Hide()
end) ]]-- end) ]]--
function PaperDollFrame_SetMovementSpeed(statFrame, unit)
statFrame.wasSwimming = nil
statFrame.unit = unit
MovementSpeed_OnUpdate(statFrame)
statFrame.onEnterFunc = MovementSpeed_OnEnter
statFrame:SetScript("OnUpdate", MovementSpeed_OnUpdate)
statFrame:Show()
end
CharacterStatsPane.statsFramePool.resetterFunc =
function(pool, frame)
frame:SetScript("OnUpdate", nil)
frame.onEnterFunc = nil
frame.UpdateTooltip = nil
FramePool_HideAndClearAnchors(pool, frame)
end
table.insert(PAPERDOLL_STATCATEGORIES[1].stats, { stat = "MOVESPEED"})