DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnLoadServersAsyncConsole() [2/2]

override void ServerBrowserTab::OnLoadServersAsyncConsole ( GetServersResult result_list,
EBiosError error,
string response )
inlineprotected

См. определение в файле ServerBrowserTabConsolePages.c строка 196

197 {
198 #ifdef DIAG_DEVELOPER
199 if (m_DummyServersEnabled)
200 return;
201 #endif
202
203 if ( error != EBiosError.OK )
204 {
205 m_LoadingText.SetText( string.Format("Error: %1", ErrorModuleHandler.GetClientMessage(ErrorCategory.BIOSError, error)) );
206 m_Menu.SetServersLoadingTab( TabType.NONE );
207 m_LoadingFinished = true;
209 return;
210 }
211
212 m_PagesCount = result_list.m_Pages;
213 if (m_PagesCount < 1)
214 m_PagesCount = 1;
215
216 m_TotalServersCount = result_list.m_NumServers;
217
218 #ifdef DIAG_DEVELOPER
219 if (m_DummyServersEnabled)
220 {
221 m_PagesCount = m_DummyServers.m_Pages;
222 if (m_PagesCount < 1)
223 m_PagesCount = 1;
224
225 m_TotalServersCount = m_DummyServers.m_NumServers;
226
227 int startIndex = (GetCurrentPage() - 1) * SERVERS_VISIBLE_COUNT;
228 int endIndex = startIndex + SERVERS_VISIBLE_COUNT;
229
230 int resultCount = m_DummyServers.m_Results.Count();
231 if (endIndex > resultCount)
232 {
233 endIndex = resultCount;
234 }
235
236 GetServersResultRowArray tempDummyServerResult = new GetServersResultRowArray();
237 for (int i = startIndex; i < endIndex; ++i)
238 {
239 tempDummyServerResult.Insert(m_DummyServers.m_Results[i]);
240 }
241
242 LoadEntries(GetCurrentPage(), tempDummyServerResult);
243 }
244 else
245 {
246 LoadEntries(result_list.m_Page, result_list.m_Results);
247 }
248 #else
249 LoadEntries(result_list.m_Page, result_list.m_Results);
250 #endif
251
254 }
EBiosError
Possible Error codes for bios API. This is the list of errors that can be returned from bios API....
Определения BIOSErrorModule.c:7
array< ref GetServersResultRow > GetServersResultRowArray
Определения BiosLobbyService.c:332
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
Определения ErrorModuleHandler.c:5
bool m_LoadingFinished
Определения ServerBrowserTab.c:52
TabType
Определения ServerBrowserTab.c:2
ServerBrowserMenuNew m_Menu
Определения ServerBrowserTab.c:37
TextWidget m_LoadingText
Определения ServerBrowserTab.c:71
int GetCurrentPage()
Определения ServerBrowserTab.c:420
int m_NumServers
Определения BiosLobbyService.c:376
int m_Pages
Определения BiosLobbyService.c:373
ref GetServersResultRowArray m_Results
Определения BiosLobbyService.c:374
int m_Page
Определения BiosLobbyService.c:372
void UpdatePageButtons()
Определения ServerBrowserTabConsolePages.c:742
void LoadEntries(int cur_page_index, GetServersResultRowArray page)
Определения ServerBrowserTabConsole.c:127
void SetFocusFilters()
Определения ServerBrowserTabConsole.c:316
void OnLoadServersAsyncFinished()
Определения ServerBrowserTabConsole.c:116
const int SERVERS_VISIBLE_COUNT
Определения ServerBrowserTabConsolePages.c:3

Перекрестные ссылки ErrorModuleHandler::GetClientMessage(), GetCurrentPage(), ServerBrowserTabConsolePages::LoadEntries(), m_LoadingFinished, m_LoadingText, m_Menu, GetServersResult::m_NumServers, GetServersResult::m_Page, GetServersResult::m_Pages, m_PagesCount, GetServersResult::m_Results, m_TotalServersCount, ServerBrowserTabConsolePages::OnLoadServersAsyncFinished(), SERVERS_VISIBLE_COUNT, ServerBrowserTabConsolePages::SetFocusFilters() и UpdatePageButtons().