Mercurial > wow > askmrrobot
comparison Core.lua @ 179:eec8032ba9df v84
addon should close automatically when entering combat now
| author | yellowfive |
|---|---|
| date | Thu, 13 Feb 2020 13:21:44 -0800 |
| parents | 3be9cc6f7d20 |
| children | a7f2ba17c39a |
comparison
equal
deleted
inserted
replaced
| 178:725fc231cde9 | 179:eec8032ba9df |
|---|---|
| 238 | 238 |
| 239 function Amr:OnDisable() | 239 function Amr:OnDisable() |
| 240 -- disabling is not supported | 240 -- disabling is not supported |
| 241 end | 241 end |
| 242 | 242 |
| 243 local function onEnterCombat() | |
| 244 Amr:Hide() | |
| 245 Amr:HideShopWindow() | |
| 246 Amr:HideJunkWindow() | |
| 247 end | |
| 248 | |
| 243 | 249 |
| 244 ---------------------------------------------------------------------------------------- | 250 ---------------------------------------------------------------------------------------- |
| 245 -- Slash Commands | 251 -- Slash Commands |
| 246 ---------------------------------------------------------------------------------------- | 252 ---------------------------------------------------------------------------------------- |
| 247 local _slashMethods = { | 253 local _slashMethods = { |
| 680 table.insert(list, methodOrName) | 686 table.insert(list, methodOrName) |
| 681 end | 687 end |
| 682 | 688 |
| 683 Amr:AddEventHandler("PLAYER_ENTERING_WORLD", onPlayerEnteringWorld) | 689 Amr:AddEventHandler("PLAYER_ENTERING_WORLD", onPlayerEnteringWorld) |
| 684 | 690 |
| 691 Amr:AddEventHandler("PLAYER_REGEN_DISABLED", onEnterCombat) | |
| 685 | 692 |
| 686 ---------------------------------------------------------------------------------------- | 693 ---------------------------------------------------------------------------------------- |
| 687 -- Debugging | 694 -- Debugging |
| 688 ---------------------------------------------------------------------------------------- | 695 ---------------------------------------------------------------------------------------- |
| 689 function Amr:dump(o) | 696 function Amr:dump(o) |
