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

◆ OnGetGameplaySession()

void BiosSessionService::OnGetGameplaySession ( string session_address,
int session_port )
inlineprotected

Callback function.

Аргументы
session_addressserver IP address.
session_portserver port.

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

148 {
150 switch (g_Game.GetGameState())
151 {
152 case DayZGameState.IN_GAME:
153 {
154 string addr;
155 int port;
156 bool found = GetGame().GetHostAddress( addr, port );
157 if (addr != session_address || port != session_port )
158 {
159 if (found)
160 {
161 OnlineServices.SetInviteServerInfo( session_address, session_port );
162 g_Game.GetUIManager().CloseAll();
163 if (!g_Game.GetUIManager().EnterScriptedMenu( MENU_INVITE_TIMER, null ))
164 {
165 NotificationSystem.AddNotification( NotificationType.CONNECT_FAIL_GENERIC, NotificationSystem.DEFAULT_TIME_DISPLAYED );
166 }
167 }
168 else
169 {
170 NotificationSystem.AddNotification( NotificationType.JOIN_FAIL_GET_SESSION, NotificationSystem.DEFAULT_TIME_DISPLAYED );
171 }
172 }
173 else
174 {
175 NotificationSystem.AddNotification( NotificationType.INVITE_FAIL_SAME_SERVER, NotificationSystem.DEFAULT_TIME_DISPLAYED, "#ps4_already_in_session" );
176 }
177 break;
178 }
179 case DayZGameState.CONNECTING:
180 {
181 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE);
182 // Intentionally no break, fall through to connecting
183 }
184 default:
185 {
186 g_Game.ConnectFromJoin( session_address, session_port );
187 break;
188 }
189 }
190 }
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DayZGame g_Game
Определения DayZGame.c:3868
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
int m_GetSessionAttempts
Определения BiosSessionService.c:3
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
proto native CGame GetGame()
const int MENU_INVITE_TIMER
Определения constants.c:206

Перекрестные ссылки NotificationSystem::AddNotification(), NotificationSystem::DEFAULT_TIME_DISPLAYED, DISCONNECT_SESSION_FLAGS_FORCE, g_Game, GetGame(), CGame::GetHostAddress(), m_GetSessionAttempts, MENU_INVITE_TIMER и OnlineServices::SetInviteServerInfo().