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

◆ AddVisitedServer()

void CGame::AddVisitedServer ( string ip,
int port )
inlineprotected

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

2622 {
2623 string uid = ip + ":" + port;
2624 if (m_Visited)
2625 {
2626 int pos = m_Visited.Find(uid);
2627
2628 if (pos < 0)
2629 {
2630 if (m_Visited.Count() == MAX_VISITED)
2631 m_Visited.Remove(0);
2632 m_Visited.Insert(uid);
2633 }
2634 else
2635 {
2636 // if item is not saved as last server, move it
2637 if (pos != (m_Visited.Count() - 1))
2638 {
2639 m_Visited.Remove(pos);
2640 m_Visited.Insert(uid);
2641 }
2642 }
2643 SetProfileStringList("SB_Visited", m_Visited);
2644 SaveProfile();
2645 }
2646 }
ref TStringArray m_Visited
Определения DayZGame.c:2137
const int MAX_VISITED
Определения DayZGame.c:2136
proto native void SaveProfile()
Saves profile on disk.
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.

Перекрестные ссылки m_Visited, MAX_VISITED, SaveProfile() и SetProfileStringList().

Используется в OnEvent().