Mercurial > wow > ouroloot
comparison core.lua @ 23:8664134bba4f
Add '/ouroloot ping' command, same functionality as button in options panel.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 09 Sep 2011 00:56:13 +0000 |
parents | 33ce273687ab |
children | 61d932f0e8f2 |
comparison
equal
deleted
inserted
replaced
22:33ce273687ab | 23:8664134bba4f |
---|---|
767 | 767 |
768 elseif cmd == "on" then self:Activate(arg) | 768 elseif cmd == "on" then self:Activate(arg) |
769 elseif cmd == "off" then self:Deactivate() | 769 elseif cmd == "off" then self:Deactivate() |
770 elseif cmd == "broadcast" or cmd == "bcast" then self:Activate(nil,true) | 770 elseif cmd == "broadcast" or cmd == "bcast" then self:Activate(nil,true) |
771 | 771 |
772 elseif cmd == "toggle" then | |
773 if self.display then | |
774 self.display:Hide() | |
775 else | |
776 return self:BuildMainDisplay() | |
777 end | |
778 | |
772 elseif cmd == "fake" then -- maybe comment this out for real users | 779 elseif cmd == "fake" then -- maybe comment this out for real users |
773 self:_mark_boss_kill (self._addLootEntry{ | 780 self:_mark_boss_kill (self._addLootEntry{ |
774 kind='boss',reason='kill',bosskill="Baron Steamroller",instance=instance_tag(),duration=0 | 781 kind='boss',reason='kill',bosskill="Baron Steamroller",instance=instance_tag(),duration=0 |
775 }) | 782 }) |
776 self:CHAT_MSG_LOOT ('manual', my_name, 54797) | 783 self:CHAT_MSG_LOOT ('manual', my_name, 54797) |
797 elseif cmd == "delete" and arg and arg:len() > 0 then | 804 elseif cmd == "delete" and arg and arg:len() > 0 then |
798 self:save_delete(tonumber(arg)) | 805 self:save_delete(tonumber(arg)) |
799 | 806 |
800 elseif cmd == "help" then | 807 elseif cmd == "help" then |
801 self:BuildMainDisplay('help') | 808 self:BuildMainDisplay('help') |
802 elseif cmd == "toggle" then | 809 elseif cmd == "ping" then |
803 if self.display then | 810 self:DoPing() |
804 self.display:Hide() | |
805 else | |
806 return self:BuildMainDisplay() | |
807 end | |
808 | 811 |
809 elseif cmd == "fixcache" then | 812 elseif cmd == "fixcache" then |
810 self:do_item_cache_fixup() | 813 self:do_item_cache_fixup() |
811 | 814 |
812 else | 815 else |
969 function addon:whispercast(to,...) | 972 function addon:whispercast(to,...) |
970 local msg = assemble(...) | 973 local msg = assemble(...) |
971 self.dprint('comm', "<whispercast>@", to, ":", msg) | 974 self.dprint('comm', "<whispercast>@", to, ":", msg) |
972 self:SendCommMessage(self.identTg, msg, "WHISPER", to) | 975 self:SendCommMessage(self.identTg, msg, "WHISPER", to) |
973 end | 976 end |
977 end | |
978 | |
979 function addon:DoPing() | |
980 self:Print("Give me a ping, Vasili. One ping only, please.") | |
981 self.sender_list.active = {} | |
982 self.sender_list.names = {} | |
983 self:broadcast('ping') | |
974 end | 984 end |
975 | 985 |
976 -- Generic helpers | 986 -- Generic helpers |
977 function addon._find_next_after (kind, index) | 987 function addon._find_next_after (kind, index) |
978 index = index + 1 | 988 index = index + 1 |