diff --git a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs index ff78b41b..22f9a6c5 100644 --- a/Fika.Core/Coop/Players/ObservedCoopPlayer.cs +++ b/Fika.Core/Coop/Players/ObservedCoopPlayer.cs @@ -710,21 +710,25 @@ public override void OnDead(EDamageType damageType) { if (!IsObservedAI) { + string nickname = !string.IsNullOrEmpty(Profile.Info.MainProfileNickname) ? Profile.Info.MainProfileNickname : Profile.Nickname; if (damageType != EDamageType.Undefined) { - NotificationManagerClass.DisplayWarningNotification($"Group member '{Profile.Nickname}' has died from '{("DamageType_" + damageType.ToString()).Localized()}'"); + NotificationManagerClass.DisplayWarningNotification($"Group member '{nickname}' has died from '{("DamageType_" + damageType.ToString()).Localized()}'"); } else { - NotificationManagerClass.DisplayWarningNotification($"Group member '{Profile.Nickname}' has died"); + NotificationManagerClass.DisplayWarningNotification($"Group member '{nickname}' has died"); } } if (IsBoss(Profile.Info.Settings.Role, out string name) && IsObservedAI && LastAggressor != null) { if (LastAggressor is CoopPlayer aggressor) { + string aggressorNickname = !string.IsNullOrEmpty(LastAggressor.Profile.Info.MainProfileNickname) ? LastAggressor.Profile.Info.MainProfileNickname : LastAggressor.Profile.Nickname; if (aggressor.gameObject.name.StartsWith("Player_") || aggressor.IsYourPlayer) - NotificationManagerClass.DisplayMessageNotification($"{LastAggressor.Profile.Nickname} killed boss {name}", iconType: EFT.Communications.ENotificationIconType.Friend); + { + NotificationManagerClass.DisplayMessageNotification($"{LastAggressor.Profile.Info.MainProfileNickname} killed boss {name}", iconType: EFT.Communications.ENotificationIconType.Friend); + } } } } diff --git a/Fika.Core/Networking/FikaClient.cs b/Fika.Core/Networking/FikaClient.cs index 4b67d96a..9f0f2bd9 100644 --- a/Fika.Core/Networking/FikaClient.cs +++ b/Fika.Core/Networking/FikaClient.cs @@ -382,7 +382,8 @@ private void OnGenericPacketReceived(GenericPacket packet) if (FikaPlugin.ShowNotifications.Value) { - NotificationManagerClass.DisplayMessageNotification($"Group member '{playerToApply.Profile.Nickname}' has extracted.", + string nickname = !string.IsNullOrEmpty(playerToApply.Profile.Info.MainProfileNickname) ? playerToApply.Profile.Info.MainProfileNickname : playerToApply.Profile.Nickname; + NotificationManagerClass.DisplayMessageNotification($"Group member '{nickname}' has extracted.", EFT.Communications.ENotificationDurationType.Default, EFT.Communications.ENotificationIconType.EntryPoint); } } diff --git a/Fika.Core/Networking/FikaServer.cs b/Fika.Core/Networking/FikaServer.cs index 54c419cd..97cc0b29 100644 --- a/Fika.Core/Networking/FikaServer.cs +++ b/Fika.Core/Networking/FikaServer.cs @@ -361,7 +361,8 @@ private void OnGenericPacketReceived(GenericPacket packet, NetPeer peer) if (FikaPlugin.ShowNotifications.Value) { - NotificationManagerClass.DisplayMessageNotification($"Group member '{playerToApply.Profile.Nickname}' has extracted.", + string nickname = !string.IsNullOrEmpty(playerToApply.Profile.Info.MainProfileNickname) ? playerToApply.Profile.Info.MainProfileNickname : playerToApply.Profile.Nickname; + NotificationManagerClass.DisplayMessageNotification($"Group member '{nickname}' has extracted.", EFT.Communications.ENotificationDurationType.Default, EFT.Communications.ENotificationIconType.EntryPoint); } }