stoneharry

Untitled

Aug 3rd, 2012
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. GlueParent.lua
  2.  
  3.     elseif ( event == "ACCOUNT_MESSAGES_AVAILABLE" ) then
  4. --      ACCOUNT_MSG_NUM_AVAILABLE = arg1;
  5.         ACCOUNT_MSG_HEADERS_LOADED = false;
  6.         ACCOUNT_MSG_BODY_LOADED = false;
  7.         ACCOUNT_MSG_CURRENT_INDEX = nil;
  8.         AccountMsg_LoadHeaders();
  9.     elseif ( event == "ACCOUNT_MESSAGES_HEADERS_LOADED" ) then
  10.         ACCOUNT_MSG_HEADERS_LOADED = true;
  11.         ACCOUNT_MSG_NUM_AVAILABLE = AccountMsg_GetNumUnreadMsgs();
  12.         ACCOUNT_MSG_CURRENT_INDEX = AccountMsg_GetIndexNextUnreadMsg();
  13.         if ( ACCOUNT_MSG_NUM_AVAILABLE > 0 ) then
  14.             AccountMsg_LoadBody( ACCOUNT_MSG_CURRENT_INDEX );
  15.         end
  16.     elseif ( event == "ACCOUNT_MESSAGES_BODY_LOADED" ) then
  17.         ACCOUNT_MSG_BODY_LOADED = true;
  18.     end
  19.  
  20. CharacterSelect.lua
  21.  
  22.     -- Account Msg stuff
  23.     if ( (ACCOUNT_MSG_NUM_AVAILABLE > 0) and not GlueDialog:IsShown() ) then
  24.         if ( ACCOUNT_MSG_HEADERS_LOADED ) then
  25.             if ( ACCOUNT_MSG_BODY_LOADED ) then
  26.                 local dialogString = AccountMsg_GetHeaderSubject( ACCOUNT_MSG_CURRENT_INDEX ).."\n\n"..AccountMsg_GetBody();
  27.                 GlueDialog_Show("ACCOUNT_MSG", dialogString);
  28.             end
  29.         end
  30.     end
Advertisement
Add Comment
Please, Sign In to add comment