Grab some stuff from game #1

Merged
atomaka merged 3 commits from untested-1 into master 2021-01-11 21:35:31 -05:00
2 changed files with 48 additions and 1 deletions

View file

@ -9,10 +9,24 @@ StaticPopupDialogs["REPAIR_ALERT"] = {
preferredIndex = 3
}
MyAddon.keyItemID = 180653
function MyAddon.OnEvent(self, event, ...)
events[event](self, ...)
end
function events:CHAT_MSG_PARTY_LEADER(message, ...)
if message == '!keys' then
MyAddon.announceKey()
end
end
function events:CHAT_MSG_PARTY(message, ...)
if message == '!keys' then
MyAddon.announceKey()
end
end
function events:PLAYER_LOGIN(...)
-- found from some forums
local b=ActionButton8 _MH=_MH or(b:SetAttribute("*type5","macro")or SecureHandlerWrapScript(b,"PreClick",b,'Z=IsAltKeyDown()and 0 or(Z or 0)%8+1 self:SetAttribute("macrotext5","/wm [nomod]"..Z)'))or 1
@ -38,6 +52,20 @@ function events:PLAYER_ROLES_ASSIGNED(...)
if MyAddon.amTankInParty() then MyAddon.markSelfSquare() end
end
function MyAddon.announceKey()
for bag = 0, NUM_BAG_SLOTS do
for slot = 1, GetContainerNumSlots(bag)do
itemID = GetContainerItemID(bag, slot)
if GetContainerItemID(bag, slot) == MyAddon.keyItemID then
local link = GetContainerItemLink(bag, slot)
SendChatMessage(link, "PARTY")
return
end
end
end
end
function MyAddon.needsRepair()
local slots = {
"HeadSlot", "ShoulderSlot", "ChestSlot", "WristSlot", "HandsSlot",
@ -91,3 +119,22 @@ f:SetScript("OnEvent", MyAddon.OnEvent)
--[[ hooksecurefunc("TalkingHeadFrame_PlayCurrent", function()
TalkingHeadFrame:Hide()
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"})

View file

@ -1,4 +1,4 @@
## Interface: 80100
## Interface: 90002
## Title: MyAddon
## Author: Andrew Tomaka
## Version: 0.1