comparison Degaine.lua @ 43:3fbe79addc87

Talking while moving now draw weapons
author contrebasse
date Sun, 27 Feb 2011 20:03:10 +0100
parents a478b8a44b9e
children 1967c9a3c5c2
comparison
equal deleted inserted replaced
42:50c865dd6563 43:3fbe79addc87
1 local AddonName = ... 1 local AddonName, T = ...
2 -- Draw your weapons automagically 2 -- Draw your weapons automagically
3 3
4 4
5 --------------------------------------------------------------- 5 ---------------------------------------------------------------
6 -- Known bugs 6 -- Known bugs
78 ToggleSheath() 78 ToggleSheath()
79 DegaineFrame:SetScript("OnUpdate", nil) 79 DegaineFrame:SetScript("OnUpdate", nil)
80 end 80 end
81 end 81 end
82 local start = function(arg_delay) 82 local start = function(arg_delay)
83
84 --@debug@
85 --DEFAULT_CHAT_FRAME:AddMessage("Go !")
86 --@end-debug@
87
83 if Degaine_isAuto and not InCombatLockdown() then 88 if Degaine_isAuto and not InCombatLockdown() then
84 t_left = arg_delay or delay 89 t_left = arg_delay or delay
85 DegaineFrame:SetScript("OnUpdate", Degaine_OnUpdate) 90 DegaineFrame:SetScript("OnUpdate", Degaine_OnUpdate)
86 end 91 end
87 end 92 end
166 [3273] = true, -- First Aid 171 [3273] = true, -- First Aid
167 [53428] = true -- Runeforge 172 [53428] = true -- Runeforge
168 -- Archaeology ? 173 -- Archaeology ?
169 } 174 }
170 175
176 --[[
177 -- Was used when moving prevented to play the emote when talking
178 -- Was needed for CHAT_MSG_SAY and CHAT_MSG_YELL
171 local function playerIsNotMoving() 179 local function playerIsNotMoving()
172 return GetUnitSpeed("player") == 0 180 return GetUnitSpeed("player") == 0
173 end 181 end
182 --]]
174 local events2playername = { -- the 2nd arg is playername 183 local events2playername = { -- the 2nd arg is playername
175 CHAT_MSG_SAY = playerIsNotMoving, 184 CHAT_MSG_SAY = true,
176 CHAT_MSG_YELL = playerIsNotMoving, 185 CHAT_MSG_YELL = true,
177 CHAT_MSG_TEXT_EMOTE = true, -- the emote is not shown, but the weapon is stealthed 186 CHAT_MSG_TEXT_EMOTE = true, -- the emote is not shown, but the weapon is stealthed
178 } 187 }
179 188
180 189
181 --------------------------------------------------------------- 190 ---------------------------------------------------------------
372 DegaineFrame:RegisterEvent("PLAYER_REGEN_ENABLED") 381 DegaineFrame:RegisterEvent("PLAYER_REGEN_ENABLED")
373 DegaineFrame:RegisterEvent("PLAYER_REGEN_DISABLED") 382 DegaineFrame:RegisterEvent("PLAYER_REGEN_DISABLED")
374 DegaineFrame:RegisterEvent("ADDON_LOADED") 383 DegaineFrame:RegisterEvent("ADDON_LOADED")
375 DegaineFrame:RegisterEvent("PLAYER_LOGIN") 384 DegaineFrame:RegisterEvent("PLAYER_LOGIN")
376 activate() 385 activate()
377