Esempio n. 1
0
        /// <summary>
        /// Show a custom notification for the affected player only.
        /// </summary>
        public override void ClientOnReceived()
        {
            var currentRole = FactionSystem.ClientCurrentRole;

            if (currentRole == FactionMemberRole.Leader ||
                currentRole == FactionMemberRole.Member)
            {
                // not an officer
                return;
            }

            var currentOfficerRoleTitle = FactionSystem.ClientGetCurrentOfficerRoleTitle();

            if (!currentOfficerRoleTitle.HasValue ||
                this.RoleTitle != currentOfficerRoleTitle.Value)
            {
                return;
            }

            var message = CurrentPlayerAccessRightsChangedText;

            if (!string.IsNullOrEmpty(this.ByMemberName))
            {
                message += "[br]"
                           + string.Format(Text_Name_Format, this.ByMemberName);
            }

            NotificationSystem.ClientShowNotification(
                CoreStrings.Faction_Title,
                message,
                NotificationColor.Good,
                icon: this.IconResource);
        }