ALFA.Database.ACR_SetPCLocalFlags C# (CSharp) Метод

ACR_SetPCLocalFlags() публичный Метод

Assigns the current PC local flags value for a PC.
public ACR_SetPCLocalFlags ( UInt32 PCObject, int Flags ) : void
PCObject System.UInt32 Supplies the PC object.
Flags int Supplies the new Local Flags value.
Результат void
        public void ACR_SetPCLocalFlags(UInt32 PCObject, int Flags)
        {
            Script.SetLocalInt(PCObject, "ACR_PC_LOCAL_FLAGS", Flags);
        }

Usage Example

Пример #1
0
        /// <summary>
        /// Dispatch the event (in a script context).
        /// </summary>
        /// <param name="Script">Supplies the script object.</param>
        /// <param name="Database">Supplies the database connection.</param>
        public void DispatchEvent(ACR_ServerCommunicator Script, ALFA.Database Database)
        {
            foreach (uint PlayerObject in Script.GetPlayers(true))
            {
                if (Database.ACR_GetPlayerID(PlayerObject) != Recipient.PlayerId)
                {
                    continue;
                }

                string FormattedMessage = String.Format(
                    "</c><c=#FFCC99>{0}: </c><c=#30DDCC>[ServerTell] {1}</c>",
                    Sender.CharacterName,
                    Message);

                Script.SetLastTellFromPlayerId(PlayerObject, Sender.Player.PlayerId);
                Script.SendChatMessage(
                    CLRScriptBase.OBJECT_INVALID,
                    PlayerObject,
                    CLRScriptBase.CHAT_MODE_SERVER,
                    FormattedMessage,
                    CLRScriptBase.FALSE);

                //
                // If this is the first time that we have delivered a
                // cross-server tell to this player (since login), remind them
                // of how to respond.
                //

                if ((Database.ACR_GetPCLocalFlags(PlayerObject) & ALFA.Database.ACR_PC_LOCAL_FLAG_SERVER_TELL_HELP) == 0)
                {
                    Script.SendMessageToPC(
                        PlayerObject,
                        "To respond to a [ServerTell] from a player on a different server, type: #re [message], or #t \"character name\" [message], or #tp \"player name\" [message].  Quotes are optional unless the name has spaces.  The #rt [message] command will send a tell to the last player that you had sent a tell to.");
                    Database.ACR_SetPCLocalFlags(
                        PlayerObject,
                        Database.ACR_GetPCLocalFlags(PlayerObject) | ALFA.Database.ACR_PC_LOCAL_FLAG_SERVER_TELL_HELP);
                }
                break;
            }
        }