DayZ 1.30
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 = g_Game.GetHostAddress( addr, port );
157 if (addr != session_address || port != session_port )
158 {
159 if (found)
160 {
161 OnlineServices.SetInviteServerInfo( session_address, session_port );
162
163 // an earlier invite already started the logout and it cannot be taken
164 // back, so only retarget it, do not tear the dialog down and ask the
165 // server for a second logout it would ignore anyway
166 if (!g_Game.GetUIManager().IsMenuOpen( MENU_INVITE_TIMER ))
167 {
168 g_Game.GetUIManager().CloseAll();
169 if (!g_Game.GetUIManager().EnterScriptedMenu( MENU_INVITE_TIMER, null ))
170 {
171 NotificationSystem.AddNotification( NotificationType.CONNECT_FAIL_GENERIC, NotificationSystem.DEFAULT_TIME_DISPLAYED );
172 }
173 }
174 }
175 else
176 {
177 NotificationSystem.AddNotification( NotificationType.JOIN_FAIL_GET_SESSION, NotificationSystem.DEFAULT_TIME_DISPLAYED );
178 }
179 }
180 else
181 {
182 NotificationSystem.AddNotification( NotificationType.INVITE_FAIL_SAME_SERVER, NotificationSystem.DEFAULT_TIME_DISPLAYED, "#ps4_already_in_session" );
183 }
184 break;
185 }
186 case DayZGameState.CONNECTING:
187 {
188 g_Game.DisconnectSessionEx(DISCONNECT_SESSION_FLAGS_FORCE);
189 // Intentionally no break, fall through to connecting
190 }
191 default:
192 {
193 g_Game.ConnectFromJoin( session_address, session_port );
194 break;
195 }
196 }
197 }
enum DisconnectSessionFlags DISCONNECT_SESSION_FLAGS_FORCE
DayZGame g_Game
Определения DayZGame.c:4074
NotificationType
DEPRECATED (moved into NotificationSystem)
Определения NotificationSystem.c:4
int m_GetSessionAttempts
Определения BiosSessionService.c:3
const int MENU_INVITE_TIMER
Определения 3_Game/DayZ/constants.c:212

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