Don't like ads? PRO users don't see any ads ;-)

Untitled

By: stoneharry on Aug 3rd, 2012  |  syntax: Lua  |  size: 1.05 KB  |  hits: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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