Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (debug) {
- sprintf(szBuffer, "Trying to find reward at %s.", descr);
- WriteChatColor(szBuffer,USERCOLOR_DEFAULT);
- }
- //CXWnd *pWnd1 = FindMQ2Window("RewardSelectionWnd")->GetFirstChildWnd()->GetFirstChildWnd();
- CXWnd *pWnd1 = (CXWnd*)FindMQ2Window("RewardSelectionWnd")->pFirstChildWnd->pFirstChildWnd;
- while (pWnd1) {
- if (((PCSIDLWND)pWnd1)->Show) {
- CListWnd *pListOpt = (CListWnd*)((CSidlScreenWnd*)(pWnd1->GetChildItem("RewardSelectionOptionList")));
- pListOpt->SetCurSel(arg1);
- if (strlen(szArg2) == 0) {
- AcceptReward(pWnd1);
- }
- else {
- //CXWnd *pWnd2 = FindMQ2Window("RewardSelectionWnd")->GetFirstChildWnd()->GetFirstChildWnd();
- CXWnd *pWnd2 = (CXWnd*)FindMQ2Window("RewardSelectionWnd")->pFirstChildWnd->pFirstChildWnd;
- while (pWnd2) {
- if (((PCSIDLWND)pWnd2)->Show) {
- CListWnd *pListItem = (CListWnd*)((CSidlScreenWnd*)(pWnd2->GetChildItem("RewardSelectionItemList")));
- pListItem->SetCurSel(arg2);
- AcceptReward(pWnd2);
- return;
- }
- //pWnd2 = pWnd2->GetNextSib();
- pWnd2 = (CXWnd*)pWnd2->pNextSiblingWnd;
- }
- }
- }
- //pWnd1 = pWnd1->GetNextSib();
- pWnd1 = (CXWnd*)pWnd1->pNextSiblingWnd;
- }
- sprintf(szBuffer, "Could not find reward at %s.", descr);
- WriteChatColor(szBuffer,USERCOLOR_DEFAULT);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement