stoneharry

Untitled

Feb 11th, 2013
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. function DestinyFrame_OnEvent(self, event)
  2.     if event == 0 then
  3.         PlaySound("igSpellBookOpen");
  4.         -- does not work in 3.3.5a client
  5.         --MoveForwardStop();    -- in case the player was moving, need to check if it'll work in blizzcon build
  6.         self:Show();
  7.     elseif event == "BUTTON_PRESSED_2" then
  8.         SendChatMessage("[CU-ADDON] UpgradeNecros", "WHISPER", nil, UnitName("player"))
  9.     end
  10. end
  11.  
  12. ChatFrame_MessageEventHandler2 = ChatFrame_MessageEventHandler
  13.  
  14. function ChatFrame_MessageEventHandler(s,e,arg1,...)
  15.     if arg1 ~= nil then
  16.         if arg1 ~= "" then
  17.             if string.find(arg1, "[CU-ADDON]", 1, true) ~= nil then
  18.                 if (arg1 == "[CU-ADDON] OpenMenuFactionChoose") then
  19.                     DestinyFrame_OnEvent(DestinyFrame, 0);
  20.                 end
  21.             end
  22.         end
  23.     end
  24.     ChatFrame_MessageEventHandler2(s,e,arg1,...)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment