Atavism Version 2018.1AGIS API

atavism.agis.database
Class AuthDatabase

java.lang.Object
  extended by atavism.agis.database.AuthDatabase

public class AuthDatabase
extends java.lang.Object

Manages Server and Account information retrieval and storage for the Authentication Database. The main purpose is to let the Authentication server know this server is still running and how many players are currently connected.

Author:
Andrew Harrison

Field Summary
protected static AuthQueries queries
           
 
Constructor Summary
AuthDatabase()
           
 
Method Summary
 boolean addAccountCharacter(OID accountID, OID characterOID)
          Adds an entry into the account_character table in the Auth Database.
 void alterAccountCoinAmount(OID accountID, int delta)
           
 boolean characterDeleted(OID accountID, OID characterOID)
          Removes a deleted character from an account entry.
 void checkAccountPurchases(OID characterOID, OID accountID)
           
 int getAccountCoinAmount(OID accountID)
           
 java.util.HashMap<java.lang.String,java.lang.String> getAccountSettings(OID accountID)
           
 java.util.ArrayList<java.util.HashMap<java.lang.String,java.io.Serializable>> getServers()
          Retrieves the list of servers from the Authentication Database and verifies they are still online.
 java.util.HashMap<java.lang.Integer,java.lang.Integer> getWorldWithPlayersCharacters(int accountID)
          Reads in the servers the player has characters on.
 void loadServerID()
          Reads in the id for this server from the world table.
 void sendServerStatusUpdate(int population)
          Updates the entry in the world table for this server with the current population to help the Authentication server manage player loads.
 boolean updateAccountCurrentWorld(OID accountID)
          Removes a deleted character from an account entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

queries

protected static AuthQueries queries
Constructor Detail

AuthDatabase

public AuthDatabase()
Method Detail

getServers

public java.util.ArrayList<java.util.HashMap<java.lang.String,java.io.Serializable>> getServers()
Retrieves the list of servers from the Authentication Database and verifies they are still online.

Returns:

getWorldWithPlayersCharacters

public java.util.HashMap<java.lang.Integer,java.lang.Integer> getWorldWithPlayersCharacters(int accountID)
Reads in the servers the player has characters on.

Parameters:
accountID -
Returns:

loadServerID

public void loadServerID()
Reads in the id for this server from the world table.


sendServerStatusUpdate

public void sendServerStatusUpdate(int population)
Updates the entry in the world table for this server with the current population to help the Authentication server manage player loads.

Parameters:
population -

updateAccountCurrentWorld

public boolean updateAccountCurrentWorld(OID accountID)
Removes a deleted character from an account entry.

Parameters:
accountID -
characterOID -
characterName -
Returns:

addAccountCharacter

public boolean addAccountCharacter(OID accountID,
                                   OID characterOID)
Adds an entry into the account_character table in the Auth Database.

Parameters:
accountID -
characterOID -
Returns:

characterDeleted

public boolean characterDeleted(OID accountID,
                                OID characterOID)
Removes a deleted character from an account entry.

Parameters:
accountID -
characterOID -
characterName -
Returns:

checkAccountPurchases

public void checkAccountPurchases(OID characterOID,
                                  OID accountID)

getAccountCoinAmount

public int getAccountCoinAmount(OID accountID)

alterAccountCoinAmount

public void alterAccountCoinAmount(OID accountID,
                                   int delta)

getAccountSettings

public java.util.HashMap<java.lang.String,java.lang.String> getAccountSettings(OID accountID)


Copyright © 2018 Dragonsan Studios Sp. z o.o.