Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. if (debug) {
  2. sprintf(szBuffer, "Trying to find reward at %s.", descr);
  3. WriteChatColor(szBuffer,USERCOLOR_DEFAULT);
  4. }
  5.  
  6. //CXWnd *pWnd1 = FindMQ2Window("RewardSelectionWnd")->GetFirstChildWnd()->GetFirstChildWnd();
  7. CXWnd *pWnd1 = (CXWnd*)FindMQ2Window("RewardSelectionWnd")->pFirstChildWnd->pFirstChildWnd;
  8.  
  9. while (pWnd1) {
  10. if (((PCSIDLWND)pWnd1)->Show) {
  11.  
  12. CListWnd *pListOpt = (CListWnd*)((CSidlScreenWnd*)(pWnd1->GetChildItem("RewardSelectionOptionList")));
  13. pListOpt->SetCurSel(arg1);
  14.  
  15. if (strlen(szArg2) == 0) {
  16. AcceptReward(pWnd1);
  17. }
  18. else {
  19.  
  20. //CXWnd *pWnd2 = FindMQ2Window("RewardSelectionWnd")->GetFirstChildWnd()->GetFirstChildWnd();
  21. CXWnd *pWnd2 = (CXWnd*)FindMQ2Window("RewardSelectionWnd")->pFirstChildWnd->pFirstChildWnd;
  22.  
  23. while (pWnd2) {
  24. if (((PCSIDLWND)pWnd2)->Show) {
  25.  
  26. CListWnd *pListItem = (CListWnd*)((CSidlScreenWnd*)(pWnd2->GetChildItem("RewardSelectionItemList")));
  27. pListItem->SetCurSel(arg2);
  28.  
  29. AcceptReward(pWnd2);
  30.  
  31. return;
  32. }
  33.  
  34. //pWnd2 = pWnd2->GetNextSib();
  35. pWnd2 = (CXWnd*)pWnd2->pNextSiblingWnd;
  36. }
  37. }
  38. }
  39.  
  40. //pWnd1 = pWnd1->GetNextSib();
  41. pWnd1 = (CXWnd*)pWnd1->pNextSiblingWnd;
  42. }
  43.  
  44. sprintf(szBuffer, "Could not find reward at %s.", descr);
  45. WriteChatColor(szBuffer,USERCOLOR_DEFAULT);
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement