| 2812 | } |
| 2813 | |
| 2814 | int GetPilotStats(const char *pilot) { |
| 2815 | int res; |
| 2816 | const char *p; |
| 2817 | char *tokp; |
| 2818 | char tid[MAX_CHAT_SEND_LEN]; |
| 2819 | char real_pilot[MAX_CHAT_SEND_LEN]; |
| 2820 | char tmp_text[MAX_CHAT_SEND_LEN]; |
| 2821 | vmt_descent3_struct d3_pilot_info; |
| 2822 | |
| 2823 | void *eff_text; |
| 2824 | void *time_text; |
| 2825 | void *main_wnd; |
| 2826 | void *title_t; |
| 2827 | void *kill_t; |
| 2828 | void *death_t; |
| 2829 | void *suicide_t; |
| 2830 | void *eff_t; |
| 2831 | void *time_in_game_t; |
| 2832 | void *pilot_t; |
| 2833 | void *rank_t; |
| 2834 | |
| 2835 | void *title_text; |
| 2836 | void *pilot_name_text; |
| 2837 | void *close_on_text; |
| 2838 | void *close_off_text; |
| 2839 | void *kills_text; |
| 2840 | void *deaths_text; |
| 2841 | void *suicide_text; |
| 2842 | void *rank_text; |
| 2843 | |
| 2844 | DLLCreateSplashScreen(TXT_PXO_GETTINGPILOTSTAT, 1); |
| 2845 | // Cancel previously active lookups |
| 2846 | // GetD3PilotData((vmt_descent3_struct *)-1, NULL, NULL); |
| 2847 | GetD3PilotDataCancel(); |
| 2848 | GetTrackerIdByUser((char *)-1); |
| 2849 | p = GetTrackerIdByUser(pilot); |
| 2850 | while (p == NULL) { |
| 2851 | res = DLLPollUI(); |
| 2852 | DLLDescentDefer(); |
| 2853 | p = GetChatText(); |
| 2854 | if (p && pconsole) { |
| 2855 | DLLUIConsoleGadgetputs(pconsole, p); |
| 2856 | DLLUIConsoleGadgetputs(pconsole, "\x0a\x0d"); |
| 2857 | } |
| 2858 | p = GetTrackerIdByUser(pilot); |
| 2859 | if (res == 99) { |
| 2860 | // cancel was hit |
| 2861 | // Cancel the look |
| 2862 | GetTrackerIdByUser((char *)-1); |
| 2863 | DLLCloseSplashScreen(); |
| 2864 | } |
| 2865 | } |
| 2866 | if (p == (char *)-1) { |
| 2867 | DLLmprintf(0, "Timeout looking for user\n"); |
| 2868 | DLLDoMessageBox(TXT_PXO_MASTERTRACKER, TXT_PXO_TIMEOUTMT, MSGBOX_OK, UICOL_WINDOW_TITLE, UICOL_TEXT_NORMAL); |
| 2869 | DLLCloseSplashScreen(); |
| 2870 | return 0; |
| 2871 | } |
no test coverage detected