stoneharry

Untitled

Aug 3rd, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.62 KB | None | 0 0
  1. GlueParent.lua
  2.  
  3.     elseif ( event == "ACCOUNT_MESSAGES_AVAILABLE" ) then
  4. --      ACCOUNT_MSG_NUM_AVAILABLE = arg1;
  5.  
  6.         ACCOUNT_MESSAGE_BODY_NO_READ_URL = "http://www.chaoticunited.com/wow/accountmessaging/getMessageBody.xml";
  7.         ACCOUNT_MESSAGE_BODY_URL = "http://www.chaoticunited.com/wow/accountmessaging/getMessageBodyUnread.xml"; -- not sure what this is for
  8.         ACCOUNT_MESSAGE_BUTTON_READ = "Mark as read";
  9.         ACCOUNT_MESSAGE_HEADERS_URL = "http://www.chaoticunited.com/wow/accountmessaging/getMessageHeaders.xml";
  10.         ACCOUNT_MESSAGE_READ_URL = "http://www.chaoticunited.com/wow/accountmessaging/markMessageAsRead.xml";
  11.        
  12.         ACCOUNT_MSG_HEADERS_LOADED = false;
  13.         ACCOUNT_MSG_BODY_LOADED = false;
  14.         ACCOUNT_MSG_CURRENT_INDEX = nil;
  15.         AccountMsg_LoadHeaders();
  16.     elseif ( event == "ACCOUNT_MESSAGES_HEADERS_LOADED" ) then
  17.         ACCOUNT_MSG_HEADERS_LOADED = true;
  18.         ACCOUNT_MSG_NUM_AVAILABLE = AccountMsg_GetNumUnreadMsgs();
  19.         ACCOUNT_MSG_CURRENT_INDEX = AccountMsg_GetIndexNextUnreadMsg();
  20.         if ( ACCOUNT_MSG_NUM_AVAILABLE > 0 ) then
  21.             AccountMsg_LoadBody( ACCOUNT_MSG_CURRENT_INDEX );
  22.         end
  23.     elseif ( event == "ACCOUNT_MESSAGES_BODY_LOADED" ) then
  24.         ACCOUNT_MSG_BODY_LOADED = true;
  25.     end
  26.  
  27. CharacterSelect.lua
  28.  
  29.     --GlueDialog_Show("ACCOUNT_MSG", tostring(ACCOUNT_MSG_NUM_AVAILABLE));
  30.     -- Account Msg stuff
  31.     if ( (ACCOUNT_MSG_NUM_AVAILABLE > 0) and not GlueDialog:IsShown() ) then
  32.         if ( ACCOUNT_MSG_HEADERS_LOADED ) then
  33.             if ( ACCOUNT_MSG_BODY_LOADED ) then
  34.                 local dialogString = AccountMsg_GetHeaderSubject( ACCOUNT_MSG_CURRENT_INDEX ).."\n\n"..AccountMsg_GetBody();
  35.                 GlueDialog_Show("ACCOUNT_MSG", dialogString);
  36.             end
  37.         end
  38.     end
Advertisement
Add Comment
Please, Sign In to add comment