Mercurial > wow > degaine
comparison Degaine.lua @ 19:03f50393cd9c
Add notes to .toc
| author | contrebasse |
|---|---|
| date | Fri, 10 Dec 2010 19:31:02 +0100 |
| parents | 57e83c900a08 |
| children | 4da97c12564f |
comparison
equal
deleted
inserted
replaced
| 18:57e83c900a08 | 19:03f50393cd9c |
|---|---|
| 63 -- Events config | 63 -- Events config |
| 64 --------------------------------------------------------------- | 64 --------------------------------------------------------------- |
| 65 -- Events to watch | 65 -- Events to watch |
| 66 local events = { -- no args to watch | 66 local events = { -- no args to watch |
| 67 GOSSIP_SHOW = function() | 67 GOSSIP_SHOW = function() |
| 68 -- isGossipClosed : | |
| 69 -- if the gossip is already opened, no need to draw weapon | |
| 70 -- UnitName("npc")==UnitName("target") : | |
| 71 -- hack gossips again because there's no emote with non npc | |
| 72 -- you have to target the npc to interact with it | |
| 73 -- things such as boards can't be targeted and start no emote | |
| 68 local returnvalue = isGossipClosed and UnitName("npc")==UnitName("target") | 74 local returnvalue = isGossipClosed and UnitName("npc")==UnitName("target") |
| 69 isGossipClosed = false | 75 isGossipClosed = false |
| 70 return returnvalue | 76 return returnvalue |
| 71 end, | 77 end, |
| 72 MERCHANT_SHOW = function() | 78 MERCHANT_SHOW = function() |
| 73 -- hack for the cases where the merchant's frame is opened from a gossip frame | 79 -- hack for the cases where the merchant's frame is opened from a gossip frame : |
| 80 -- the gossip is closed and the merchant opened but the weapon is not stealthed | |
| 74 if (GetTime() - t_lastGossipClosed) < 0.5 then | 81 if (GetTime() - t_lastGossipClosed) < 0.5 then |
| 75 return not wasGossipOpened | 82 return not wasGossipOpened |
| 76 else | 83 else |
| 77 return isGossipClosed | 84 return isGossipClosed |
| 78 end | 85 end |
