1. int __cdecl Script_Screenshot()
  2. {
  3. ClientStamp *wData = ClientServices::GetClientStamp();
  4. ScrnScreenshot(CGlueMgr::HandleScreenshot, wData, sizeof(ClientStamp), 0, 0, 0);
  5. return 0;
  6. }
  7. void __cdecl ScrnScreenshot(int callback, ClientStamp *wdata, int wdataLen, char *folder, char *nameOverride, char *depthNameOverride)
  8. {
  9. s_captureScreen = callback;
  10. s_pWatermarkData = wdata;
  11. s_uWatermarkDataBytes = wdataLen;
  12. s_screenshotFolder = folder;
  13. s_screenshotNameOverride = nameOverride;
  14. s_depthNameOverride = depthNameOverride;
  15. }
  16. ClientStamp *__cdecl ClientServices::GetClientStamp()
  17. {
  18. char *accountName = NULL;
  19. if ( ClientServices::s_accountName )
  20. accountName = &ClientServices::s_accountName;
  21. DWORD wowTime;
  22. WowTime::WowEncodeTime(&wowTime, LODWORD(g_clientGameTime_ptr));
  23. memset(&ClientServices::m_ClientStamp, 0, sizeof(ClientStamp));
  24. if ( ClientServices::m_selectRealmInfoValid )
  25. {
  26. if ( accountName )
  27. {
  28. strcpy(ClientServices::m_ClientStamp.accountName, accountName);
  29. ClientServices::m_ClientStamp.time = wowTime;
  30. SocketAddr addr = g_socketAddress;
  31. SockAddr::Normalize(&addr);
  32. ClientServices::m_ClientStamp.socketAddr = addr;
  33. ClientServices::m_ClientStamp.socketAddr.addr[4] = 0xF3FFF00u;
  34. }
  35. }
  36. return &ClientServices::m_ClientStamp;
  37. }
  38. int __cdecl CGlueMgr::HandleScreenshot(int a1)
  39. {
  40. int result; // eax@2
  41. if ( a1 )
  42. result = FrameScript_SignalEvent(14, 0);
  43. else
  44. result = FrameScript_SignalEvent(15, 0);
  45. return result;
  46. }
Comments powered by Disqus