19 [
Attribute(
"{D3BFEE28E7D5B6A1}Configs/ServerBrowser/KickDialogs.conf",
params:
"conf")]
22 [
Attribute(
"#AR-ServerBrowser_SessionError",
desc:
"If kick reason is unknown use this string", uiwidget: UIWidgets.LocaleEditBox)]
27 int playerID, duration;
29 data.GetParams(playerID, kickCode, duration);
32 data.GetNotificationTextEntries(playerName);
33 if (!GetPlayerName(playerID, playerName))
36 string kickReasonText = m_sUnknownKickReason;
39 string groupId, reasonId;
42 if (m_PlayerKickReasonsConfig)
49 preset = m_PlayerKickReasonsConfig.FindPreset(groupId +
"_" + reasonId);
50 if (preset && !preset.m_sMessage.IsEmpty())
51 kickReasonText = preset.m_sMessage;
56 Print(
"SCR_NotificationPlayerKicked (kick or ban) does not have the m_PlayerKickReasonsConfig assigned with a SCR_ConfigurableDialogUiPresets config prefab!", LogLevel.ERROR);
62 data.SetNotificationTextEntries(playerName, kickReasonText);
67 int days, hours, minutes, seconds;
68 SCR_DateTimeHelper.GetDayHourMinuteSecondFromSeconds(duration, days, hours, minutes, seconds);
70 data.SetNotificationTextEntries(playerName, days.ToString(), hours.ToString(), minutes.ToString(), seconds.ToString(), kickReasonText);
73 return super.GetText(
data);