Method | Description | |
---|---|---|
ConvertToBoolean ( string Str ) : bool |
Convert a database string to a Boolean value.
|
|
EnqueueAccountAssociationToPlayer ( uint PlayerObject, string AccountAssociationSecret, string AccountAssociationURL ) : void |
Enqueue an account association event to a player for processing in the main thread. N.B. The world manager is assumed to be locked.
|
|
EnqueueMessageToPlayer ( uint PlayerObject, string Message ) : void |
Enqueue a message to a player for outbound transmission on the main server thread. N.B. The world manager is assumed to be locked.
|
|
GameWorldManager ( int LocalServerId, string LocalServerName ) : System |
Create a new GameWorldManager.
|
|
IsEventPending ( ) : bool |
Check whether an event might be pending, without taking the lock. Note that this is purely an advisory mechanism; the caller must repeatedly check as they may lose the race for when the event pending flag is set. The purpose of this function is to allow the main thread to avoid needlessly blocking on the query thread.
|
|
IsEventQueueEmpty ( ) : bool |
Check whether the event queue is empty.
|
|
ReferenceCharacterById ( int CharacterId, IALFADatabase Database ) : ACR_ServerCommunicator.GameCharacter |
Reference the data for a character by the character id. If the data was not yet available, it is retrieved from the database.
|
|
ReferenceCharacterById ( int CharacterId, IALFADatabase Database, bool InitialDMState ) : ACR_ServerCommunicator.GameCharacter |
Reference the data for a character by the character id. If the data was not yet available, it is retrieved from the database.
|
|
ReferenceCharacterByName ( string CharacterName, IALFADatabase Database ) : ACR_ServerCommunicator.GameCharacter |
Reference the data for a character by the character name. If the data was not yet available, it is retrieved from the database.
|
|
ReferencePlayerById ( int PlayerId, IALFADatabase Database ) : ACR_ServerCommunicator.GamePlayer |
Reference the data for a player by the player id. If the data was not yet available, it is retrieved from the database.
|
|
ReferencePlayerByName ( string PlayerName, IALFADatabase Database ) : ACR_ServerCommunicator.GamePlayer |
Reference the data for a player by the player name. If the data was not yet available, it is retrieved from the database.
|
|
ReferenceServerById ( int ServerId, IALFADatabase Database ) : |
Reference the data for a server by the server id. If the data was not yet available, it is retrieved from the database.
|
|
ReferenceServerByName ( string ServerName, IALFADatabase Database ) : |
Reference the data for a server by the server name. If the data was not yet available, it is retrieved from the database.
|
|
RunQueue ( |
Run the event queue down. All events in the queue are given a chance to run.
|
|
SignalIPCEvent ( IPC_EVENT Event ) : void |
Signal an IPC event on a remote server by adding the event to the outbound event queue.
|
|
SignalIPCEventWakeup ( ) : void |
Signal that the query thread should wake up to process IPC events soon. This may reduce the time until the next outbound event is sent. Note that, unlike most members, this method does not require any particular synchronization.
|
|
SignalQueryThreadAction ( QueryThreadAction Action ) : void |
Signal a request to invoke an action in the context of the query thread. N.B. The routine should NOT be invoked with the world manager locked. Internal synchronization is provided.
|
|
SynchronizeInitialConfiguration ( IALFADatabase Database ) : void |
Force synchronization of database configuration.
|
|
WriteDiagnosticLog ( string Message ) : void |
This method is called to write a diagnostic log message to the main server log. The method is called with synchronization held on the WorldManager object.
|
Method | Description | |
---|---|---|
ConsistencyCheck ( ) : void |
This debug routine verifies the consistency of the game world data model.
|
|
DispatchQueryThreadActions ( ) : void |
This method dispatches query thread actions that have been queued to the database query/synchronizer thread.
|
|
DistributeDatabaseOnlineNotification ( bool Online ) : void |
Send a direct, database online/offline status update to all online servers. Note that the update is sent as an unreliable datagram so it is possible that it may never arrive, or may arrive in the wrong order, etc. The notification is purely advisory.
|
|
EnqueueEvent ( IGameEventQueueEvent Event ) : void |
This routine wrappers the process of enqueuing an event, and also sets the events queued flag if necessary.
|
|
InsertNewCharacter ( ACR_ServerCommunicator.GameCharacter Character, int ServerId, IALFADatabase Database, bool InitialDMState ) : void |
This function inserts a character into the various character lists and issues the character join event.
|
|
InsertNewPlayer ( ACR_ServerCommunicator.GamePlayer Player, IALFADatabase Database ) : void |
This function inserts a player into the various player lists and issues the player load event.
|
|
InsertNewServer ( |
This function inserts a server into the various server lists and issues the server load event.
|
|
IsConnectivityFailureException ( |
Check whether an exception might be a database connectivity related exception (versus any other reason).
|
|
OnBroadcastNotification ( string Message ) : void |
This method is called when a broadcast notification is received.
|
|
OnCharacterJoin ( ACR_ServerCommunicator.GameCharacter Character ) : void |
This method is called when a character is discovered to have come online. The character is inserted already.
|
|
OnCharacterPart ( ACR_ServerCommunicator.GameCharacter Character ) : void |
This method is called when a character is discovered to have gone offline.
|
|
OnChatTell ( ACR_ServerCommunicator.GameCharacter Sender, ACR_ServerCommunicator.GamePlayer Recipient, string Message ) : void |
This method is called when a chat tell IPC event is received.
|
|
OnConfigurationSyncTimer ( object StateInfo ) : void |
This timer callback is invoked when the configuration sync timer has elapsed, in the context of a thread pool thread. Its purpose is to record an activation event for the query thread.
|
|
OnDisconnectPlayer ( ACR_ServerCommunicator.GamePlayer Player ) : void |
This method is called when a disconnect player request is received.
|
|
OnPage ( ACR_ServerCommunicator.GamePlayer Sender, ACR_ServerCommunicator.GamePlayer Recipient, string Message ) : void |
This method is called when a page IPC event is received.
|
|
OnPlayerLoaded ( ACR_ServerCommunicator.GamePlayer Player ) : void |
This method is called when a player has had all of its data loaded from the database. The player is inserted already.
|
|
OnPurgeCachedCharacter ( ACR_ServerCommunicator.GamePlayer Player, string CharacterFileName ) : void |
This method is called when a purge cached character request is received.
|
|
OnRunScript ( |
This method is called when a run script IPC event is received.
|
|
OnServerJoin ( |
This method is called when a server is discovered to have come online. The server is inserted already.
|
|
OnServerLoaded ( |
This method is called when a server has had all of its data loaded from the database. The server is inserted already.
|
|
OnServerPart ( |
This method is called when a server is discovered to have gone offline.
|
|
OnShutdownServer ( string Message ) : void |
This method is called when a server shutdown request is received.
|
|
OnUnsupportedIPCEventType ( int RecordId, int P0, int P1, int P2, int EventType, string P3 ) : void |
This method is called when an unsupported IPC event code is received.
|
|
OnUpdateDatabaseOnlineTimer ( object StateInfo ) : void |
This timer callback is invoked when it is time to rebroadcast the local server's view of whether the database is online or offline.
|
|
OnUpdateServerCheckinTimer ( object StateInfo ) : void |
This timer callback is invoked when the update server checkin timer has elapsed, in the context of a thread pool thread. Its purpose is to record an activation event for the query thread.
|
|
PerformInitialSynchronization ( ) : void |
This method performs the initial synchronization step at first run that downloads the initial character list. A bulk query is issued here to reduce the number of database round-trips at startup time. Note that no attempt is made to mark offline characters here. That step is done in the normal synchronization round, as this is the initial round anyway.
|
|
QueryDispatchThreadRoutine ( ) : void |
This thread routine periodically queries the database for new events and updates the local state cache as appropriate. It also enqueues game events to the game event queue as required.
|
|
RunQueryCycle ( ) : void |
This method polls the database for changes and updates the game world state as appropriate.
|
|
StartShutdownWatchdog ( int WatchdogTimeout ) : void |
Start the shutdown server watchdog. A timer is begun and if the server has not shut down cleanly before the timer elapses, then the process is hard aborted.
|
|
SynchronizeConfiguration ( ) : void |
This method synchronizes the configuration settings block with the database.
|
|
SynchronizeIPCEventQueue ( ) : void |
This method synchronizes the IPC event queue for the server.
|
|
SynchronizeOnlineCharacters ( ) : void |
This method synchronizes the online character list with the central database. Character join or part events are generated, as is appropriate.
|
|
SynchronizeOnlineServers ( ) : void |
This method synchronizes the online status of the server list.
|
|
TransmitOutboundIPCEvents ( ) : void |
This method transmits locally buffered, outboud IPC events to the routing entity (e.g. the database).
|
|
UpdateServerCheckinTimestamp ( ) : void |
This method updates the checkin timestamp for ACR_TIME_SERVERTIME, for the local server. This must be periodically done from the query thread, as the main thread's DelayCommand (ACR_StoreTime()) may not run for an extended duration if the server is paused by a DM.
|
public static ConvertToBoolean ( string Str ) : bool | ||
Str | string | Supplies the database string. |
return | bool |
public EnqueueAccountAssociationToPlayer ( uint PlayerObject, string AccountAssociationSecret, string AccountAssociationURL ) : void | ||
PlayerObject | uint | Supplies the local object id of the /// player to send to. |
AccountAssociationSecret | string | Supplies the account /// association secret. |
AccountAssociationURL | string | Supplies the base URL of the /// account association service. |
return | void |
public EnqueueMessageToPlayer ( uint PlayerObject, string Message ) : void | ||
PlayerObject | uint | Supplies the local object id of the /// player to send to. |
Message | string | Supplies the message text. |
return | void |
public GameWorldManager ( int LocalServerId, string LocalServerName ) : System | ||
LocalServerId | int | Supplies the server id of the local /// server. |
LocalServerName | string | Supplies the server name of the local /// server, as referenced in the pwdata table in the database. |
return | System |
public ReferenceCharacterById ( int CharacterId, IALFADatabase Database ) : ACR_ServerCommunicator.GameCharacter | ||
CharacterId | int | Supplies the object id. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return | ACR_ServerCommunicator.GameCharacter |
public ReferenceCharacterById ( int CharacterId, IALFADatabase Database, bool InitialDMState ) : ACR_ServerCommunicator.GameCharacter | ||
CharacterId | int | Supplies the object id. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
InitialDMState | bool | Supplies the initial DM state of the /// backing player object to update, for a synchronization of an /// existing player with a new character. |
return | ACR_ServerCommunicator.GameCharacter |
public ReferenceCharacterByName ( string CharacterName, IALFADatabase Database ) : ACR_ServerCommunicator.GameCharacter | ||
CharacterName | string | Supplies the object name. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return | ACR_ServerCommunicator.GameCharacter |
public ReferencePlayerById ( int PlayerId, IALFADatabase Database ) : ACR_ServerCommunicator.GamePlayer | ||
PlayerId | int | Supplies the object id. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return | ACR_ServerCommunicator.GamePlayer |
public ReferencePlayerByName ( string PlayerName, IALFADatabase Database ) : ACR_ServerCommunicator.GamePlayer | ||
PlayerName | string | Supplies the object name. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return | ACR_ServerCommunicator.GamePlayer |
public ReferenceServerById ( int ServerId, IALFADatabase Database ) : |
||
ServerId | int | Supplies the object id. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return |
public ReferenceServerByName ( string ServerName, IALFADatabase Database ) : |
||
ServerName | string | Supplies the object name. |
Database | IALFADatabase | Supplies the database connection to use for /// queries, if required. The active rowset may be consumed. |
return |
public RunQueue ( |
||
Script | Supplies the script object. | |
Database | ALFA | Supplies the database connection. |
return | void |
public SignalIPCEvent ( IPC_EVENT Event ) : void | ||
Event | IPC_EVENT | Supplies the event to signal. |
return | void |
public SignalQueryThreadAction ( QueryThreadAction Action ) : void | ||
Action | QueryThreadAction | Supplies the action to enqueue to the query /// thread. |
return | void |
public SynchronizeInitialConfiguration ( IALFADatabase Database ) : void | ||
Database | IALFADatabase | Supplies the database object to use for /// database connectivity. |
return | void |
public WriteDiagnosticLog ( string Message ) : void | ||
Message | string | Supplies the message text to log. |
return | void |