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

◆ AddVisitedServer()

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

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

2666 {
2667 string uid = ip + ":" + port;
2668 if (m_Visited)
2669 {
2670 int pos = m_Visited.Find(uid);
2671
2672 if (pos < 0)
2673 {
2674 if (m_Visited.Count() == MAX_VISITED)
2675 m_Visited.Remove(0);
2676 m_Visited.Insert(uid);
2677 }
2678 else
2679 {
2680 // if item is not saved as last server, move it
2681 if (pos != (m_Visited.Count() - 1))
2682 {
2683 m_Visited.Remove(pos);
2684 m_Visited.Insert(uid);
2685 }
2686 }
2687 SetProfileStringList("SB_Visited", m_Visited);
2688 SaveProfile();
2689 }
2690 }
ref TStringArray m_Visited
Определения DayZGame.c:2176
const int MAX_VISITED
Определения DayZGame.c:2175
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().