![]() |
Vegas Gateway
|
This is the main functional class for the .Net Gateway This class is responsible for delegating all the ASP calls to the J2EE Web Services. More...
Public Member Functions | |
GameSvr () | |
string | GetGameServerProperty (string key) |
Method Name :– GetGameServerProperty More... | |
void | LogMess (string sessionId, string msg) |
Method Name :– LogMess More... | |
void | LogAudit (string sessionId, string msg) |
Method Name :– LogAudit More... | |
void | LogError (string sessionId, string msg) |
Method Name :– LogError More... | |
void | LogSuspicious (string sessionId, string msg) |
Method Name :– LogSuspicious More... | |
void | LogPromotion (string sessionId, string msg) |
Method Name :– LogPromotion More... | |
string | CreateSession (string accountId, string currencyCode, string gameCode, string payPerPlay) |
Method Name :– CreateSession More... | |
double | RecordStakeAndReturn (string sessionId, double stakeAmount, double returnAmount) |
Method Name :– RecordStakeAndReturn More... | |
double | RecordProgressiveStake (string sessionId, double stakeAmount) |
Method Name :– RecordProgressiveStake More... | |
void | AddCredit (string sessionId, double amount, string transRef, string gameCode) |
Method Name :– AddCredit More... | |
void | AddGameCredit (string sessionId, double amount) |
Method Name :– AddGameCredit More... | |
void | AddGameCreditForProgressive (string sessionId, double amount) |
Method Name :– AddGameCreditForProgressive More... | |
string | CashOut (string sessionId, string currencyCode, double amount, string historyTransaction) |
Method Name :– CashOut More... | |
void | DelClient (string sessionId) |
Method Name :– DelClient More... | |
string | stateLoad (string sessionId, string gameCode) |
Method Name :– stateLoad More... | |
void | stateSave (string sessionId, string gameCode, string state, double totalstakes) |
Method Name :– stateSave More... | |
void | SaveConfig (string sessionId, string configurationCode, string configurationData) |
Method Name :– SaveConfig More... | |
string | GetConfig (string sessionId, string configurationCode) |
Method Name :– GetConfig More... | |
void | ClearConfig (string sessionId, string configurationCode) |
Method Name :– ClearConfig More... | |
void | stateClear (string sessionId, string gameCode) |
Method Name :– stateClear More... | |
double | GetAccountBalance (string sessionId) |
Method Name :– GetAccountBalance More... | |
string | GetAccountId (string sessionId) |
Method Name :– GetAccountId More... | |
string | GetCurrCode (string sessionId) |
Method Name :– GetCurrCode More... | |
double | GetCreditValue (string sessionId) |
Method Name :– GetCreditValue More... | |
string | SubtractFromBalance (string sessionId, double amount, string currencyCode) |
Method Name :– SubtractFromBalance More... | |
void | UpdateHistory (string sessionId, string transactionRef) |
Method Name :– UpdateHistory More... | |
string | GetSessionHistoryForFlash (string sessionId, string gameCode) |
Method Name :– GetSessionHistory More... | |
string | GetSessionHistory (string sessionId, string gameCode) |
Method Name :– GetSessionHistory More... | |
string | GetBetID () |
Method Name :– GetBetID More... | |
string | GetNumbersCSV (string sessionId, string gamecode, string type, bool unique, int highest, int lowest, int count) |
Method Name :– GetNumbersCSV More... | |
string | GetJackpotDetails (string sessionId) |
Method Name :– GetJackpotDetails More... | |
string | GetJackpotDetailsForGame (string sessionId, string gameCode) |
Method Name :– GetJackpotDetailsForGame More... | |
string | GetGameCode (string sessionId) |
Method Name :– GetGameCode More... | |
double | RecordJackpotWin (string sessionId, int tierNumber, double fullTierAmount, double tierAmountWon) |
Method Name :– RecordJackpotWin More... | |
double | RecordRepeatingReward (string sessionId, string betId, double winAmount, string frequency, int numberOfPeriods) |
Method Name :– RecordRepeatingReward More... | |
string | ListJackpotWins (string sessionId, int numberOfWins, double minimumWinValue) |
Method Name :– ListJackpotWins More... | |
string | ListLastJackpotWinForEachTier (string sessionId) |
Method Name :– ListLastJackpotWinForEachTier More... | |
double | ResultRapidFireSelection (string sessionId, int tierNumber, double fullTierAmount, double amount) |
Method Name :– ResultRapidFireSelection More... | |
void | RecordPromotionWin (string sessionId, string gameCode, string message) |
Method Name :– RecordPromotionWin More... | |
void | SetJackpotType (string gameCode, string type) |
SDK Only More... | |
void | SetJackpotAllocationPercentage (string gameCode, double jackpotAllocationPercentage) |
SDK Only More... | |
void | SetJackpotTierAmount (string gameCode, int tierNumber, double tierAmount) |
SDK Only More... | |
void | SetJackpotTierReseedAmount (string gameCode, int tierNumber, double reseedAmount) |
SDK Only More... | |
void | SetJackpotTierAllocationPercentage (string gameCode, int tierNumber, double tierAllocationPercentage) |
SDK Only More... | |
void | SetStakeLevelJackpotTier (string gameCode, int tierNumber, double stakeLevel, double monetaryContribution) |
SDK Only More... | |
void | ClearJackpot (string gameCode) |
SDK Only More... | |
void | AddJackpotWin (string sessionId, string gameCode, int tierNumber, string currencyCode, double winAmount) |
SDK Only More... | |
void | HeartBeat (string sessionId) |
Method Name :– HeartBeat More... | |
int | GetRepLevel () |
Method Name :– GetRepLevel More... | |
bool | GetOnLine () |
Method Name :– GetOnLine More... | |
bool | GetCliStatus () |
Method Name :– GetCliStatus More... | |
Protected Attributes | |
IGameServerPropertiesDAO | gameServerPropertiesDao |
This is the main functional class for the .Net Gateway This class is responsible for delegating all the ASP calls to the J2EE Web Services.
If the appropriate registry key (IsSDK) is set to 'Yes' and the DLL was compiled using DEVELOPMENT_MODE , hard coded values will be returned instead of going out to the webservice. This allows games to be tested by games developers without needing Application Servers or databases
To build this component for use by a developer, build it using the command sdkcompile
GameServer.GameSvr.GameSvr | ( | ) |
void GameServer.GameSvr.AddCredit | ( | string | sessionId, |
double | amount, | ||
string | transRef, | ||
string | gameCode | ||
) |
Method Name :– AddCredit
Description :– This method is responsible to add credit to the game based upon the balance the user has in hs Sportsbook account.This method would in general be called in conjunction with the AddClient method.
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
Amount | - Amount specified by the game |
TransactRef | - Transaction referance obtained after calling SubtractFromBalance method. |
GameCode | - The string that uniquely refers to the game |
Comments :– This method calls the following method from the web service void addCredit(string sessionId,Double Amount,String TransactionRef,String GameCode)
void GameServer.GameSvr.AddGameCredit | ( | string | sessionId, |
double | amount | ||
) |
Method Name :– AddGameCredit
Description :– This method is responsible for adding or subtracting amount to the game during play.
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
Amount | - Amount specified by the game |
Comments :– This method calls the following method from the web service void addGameCredit(string sessionId,Double Amount)
void GameServer.GameSvr.AddGameCreditForProgressive | ( | string | sessionId, |
double | amount | ||
) |
Method Name :– AddGameCreditForProgressive
Description :– This method is responsible for debiting the session and adding the full amount to the explicit side bet The amount is debited from the session and also added to any applicable jackpot
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
Amount | - Amount specified by the game |
void GameServer.GameSvr.AddJackpotWin | ( | string | sessionId, |
string | gameCode, | ||
int | tierNumber, | ||
string | currencyCode, | ||
double | winAmount | ||
) |
SDK Only
string GameServer.GameSvr.CashOut | ( | string | sessionId, |
string | currencyCode, | ||
double | amount, | ||
string | historyTransaction | ||
) |
Method Name :– CashOut
Description :– This method is responsible adding credit to the sportsBook account and deleting the session.
sessionId | - The sessionId retrieved from the GameServer |
CurrencyCode | - Currency code of the client |
Amount | - This is zero, see notes below |
HistTran | - This is an empty string |
Comments :– Vegas has some older games that used session based funds but all newer games are pay per play so no session funds are stored. The return value is the transaction id of the cash out.)
void GameServer.GameSvr.ClearConfig | ( | string | sessionId, |
string | configurationCode | ||
) |
Method Name :– ClearConfig
Description :– Clears the configuration data for the account and configuration code.
sessionId | - The Session ID |
configurationCode | - The key code for the configuration, agreed in advance with between the game supplier and William Hill |
void GameServer.GameSvr.ClearJackpot | ( | string | gameCode | ) |
SDK Only
string GameServer.GameSvr.CreateSession | ( | string | accountId, |
string | currencyCode, | ||
string | gameCode, | ||
string | payPerPlay | ||
) |
Method Name :– CreateSession
Description :– This method is responsible to create a new session for the client if this is the first game after the client has entered the arcade.
accountId | - The accountId received by the login credentials |
CurrencyCode | - Currency code of the client received along with login credentials |
gameCode | - The string that uniquely refers to the game |
payPerPlay | - Part of game configuration |
Comments :–
Called from the game_load.asp script in the common folder.
Given an account token, currency code and game code, creates a new gaming session. Return a session id identifying the session. The session id must be stored in a cookie. This cookie is used in all subsequent requests to identify the gaming session and therefore the account. Note that Vegas only allows one game session per account at any time. If a request is made to create a new session, any existing sessions will be ended on the server side.
void GameServer.GameSvr.DelClient | ( | string | sessionId | ) |
Method Name :– DelClient
Description :– This method is responsible for deleting the session of the client
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
double GameServer.GameSvr.GetAccountBalance | ( | string | sessionId | ) |
Method Name :– GetAccountBalance
Description :– This method is responsible for retrieving the AccountBalance
sessionId | - The sessionId of the client |
Comments :– This method simply returns the account balance. Before recording a stake, the account balance can be checked to see if suffi-cient funds are available. Note that a more efficient method is to simply call recordStakeAndReturn which will return. This method also sets a heartbeat in the gaming session, to record the game is still calling into the server. This method should be called every 15 seconds to ensure the server knows the client is still connected. If the server does not receive this call regularly, it will remove the session.
string GameServer.GameSvr.GetAccountId | ( | string | sessionId | ) |
Method Name :– GetAccountId
Description :– This method is responsible for retrieving the accountId (account Number)
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
Comments :– This method simply returns the account number. Useful for storing information in the logs.
string GameServer.GameSvr.GetBetID | ( | ) |
Method Name :– GetBetID
Description :– This method is responsible for getting a unique Bet Transaction Referance.
Comments :– Returns an id to be used as a bet id in a gaming session.
bool GameServer.GameSvr.GetCliStatus | ( | ) |
Method Name :– GetCliStatus
Description :– This method has been deprecated. Returns the status about the number of clients being less than the maximum allowed
Comments :– This method has been deprecated.
string GameServer.GameSvr.GetConfig | ( | string | sessionId, |
string | configurationCode | ||
) |
Method Name :– GetConfig
Description :– GetConfig: Returns a stored value for an account and key
sessionId | - The session ID |
configurationCode | - The key code for the configuration, agreed in advance with between the game supplier and William Hill |
double GameServer.GameSvr.GetCreditValue | ( | string | sessionId | ) |
Method Name :– GetCreditValue
Description :– This method is responsible for getting balance of the user session
sessionId | - Session ID of the client obtained from the cookie |
string GameServer.GameSvr.GetCurrCode | ( | string | sessionId | ) |
Method Name :– GetCurrCode
Description :– This method is responsible for retrieving the Currency code of the client
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
Comments :– This method simply returns the account currency code. Useful for storing information in the logs
string GameServer.GameSvr.GetGameCode | ( | string | sessionId | ) |
Method Name :– GetGameCode
sessionId | - Session ID of the client obtained from the cookie |
Copmments :- Returns the game code of the current gaming session.
string GameServer.GameSvr.GetGameServerProperty | ( | string | key | ) |
Method Name :– GetGameServerProperty
key | - The key of the property who's value you require |
Comments :– This method returns properties housed on the game server. These properties will give environment specific values for configuration items.</para?
Example Keys are: vegas.menu.subdomain vegas.cashier.subdomain vegas.domain vegas.domain.toplevel vegas.menu.path vegas.cashier.path
string GameServer.GameSvr.GetJackpotDetails | ( | string | sessionId | ) |
Method Name :– GetJackpotDetails
sessionId | - Session ID of the client obtained from the cookie |
Comments :- Returns a pipe (|) separated list of the value of the jackpot tiers. This should be called every fifteen seconds to ensure the game displays relatively accurate values.
string GameServer.GameSvr.GetJackpotDetailsForGame | ( | string | sessionId, |
string | gameCode | ||
) |
Method Name :– GetJackpotDetailsForGame
sessionId | - Session ID of the client obtained from the cookie |
gameCode | - The string that uniquely refers to the game |
Comments :- Returns a pipe (|) separated list of the value of the jackpot tiers. In general GetJackPotDetails should be used instead of this method, unless otherwise explicitly requested.
string GameServer.GameSvr.GetNumbersCSV | ( | string | sessionId, |
string | gamecode, | ||
string | type, | ||
bool | unique, | ||
int | highest, | ||
int | lowest, | ||
int | count | ||
) |
Method Name :– GetNumbersCSV
Description :–
sessionId | - Session ID of the client obtained from the cookie |
gamecode | - The string that uniquely refers to the game |
type | - Can be anything - used for logging |
unique | - Should each number in the response be unique? |
highest | - The highest inclusive integer allowed |
lowest | - The lowest inclusive integer allowed |
count | - The number of numbers you would like |
Comments :– Returns a comma separated list of (definitely) Random numbers.
bool GameServer.GameSvr.GetOnLine | ( | ) |
Method Name :– GetOnLine
Description :– Returns the online status of the GameServer
Comments :– Call to check if the Game Server is running or has been disconnected from the rest of the Vegas platform for maintenance. This call is used in the game load script to check if the system is up and running. If the system is down for maintenance then false is returned and the game should not be loaded.
int GameServer.GameSvr.GetRepLevel | ( | ) |
Method Name :– GetRepLevel
Description :– This method has been deprecated. This method is responsible for getting the reporting level.
Comments :– This method has been deprecated.
string GameServer.GameSvr.GetSessionHistory | ( | string | sessionId, |
string | gameCode | ||
) |
Method Name :– GetSessionHistory
Description :– This method is responsible for getting the session history for a game and a client
sessionId | - Session ID of the client obtained from the cookie |
gameCode | - The string that uniquely refers to the game |
string GameServer.GameSvr.GetSessionHistoryForFlash | ( | string | sessionId, |
string | gameCode | ||
) |
Method Name :– GetSessionHistory
Description :– This method is responsible for getting the session history for a game and a client
sessionId | - Session ID of the client obtained from the cookie |
GameCode | - The string that uniquely refers to the game |
void GameServer.GameSvr.HeartBeat | ( | string | sessionId | ) |
Method Name :– HeartBeat
Description :– This method is called by the active game every 15 seconds to see if the session is still active
sessionId | - Session ID of the client obtained from the cookie |
Comments :– Method that keeps the session alive at the back end. Should be called at regular intervals (every 15 or 30 seconds). Only used if not calling GetJackpotDetails
string GameServer.GameSvr.ListJackpotWins | ( | string | sessionId, |
int | numberOfWins, | ||
double | minimumWinValue | ||
) |
Method Name :– ListJackpotWins
Description :– Used for a specific game to show recent jackpot winners within a game - Not used for general games
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
numberOfWins | - The number of wins you wish to retrieve |
minimumWinValue | - Filter on the amoutn won |
Comments :- Returns a semi-colon delimited list of recent jackpot winners. Each jackpot winner lists the name and location of the customer, tier number of the jackpot, win date, win amount and win currency.
string GameServer.GameSvr.ListLastJackpotWinForEachTier | ( | string | sessionId | ) |
Method Name :– ListLastJackpotWinForEachTier
Description :– Used for a specific game to show recent jackpot winners within a game - Not used for general games
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
numberOfWins | - Number of wins you wish to retrieve |
minimumWinValue | - Filter on win amount |
Comments :- Returns a semi-colon delimited list of the last jackpot winner for each jackpot tier. Each jackpot winner lists the name and location of the customer, tier number of the jackpot, win date, win amount and win currency.
void GameServer.GameSvr.LogAudit | ( | string | sessionId, |
string | msg | ||
) |
Method Name :– LogAudit
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
msg | - The message to be logged |
Comments :– This method is not used by game suppliers.
void GameServer.GameSvr.LogError | ( | string | sessionId, |
string | msg | ||
) |
Method Name :– LogError
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
msg | - The message to be logged |
Comments :– This method is the logging mechanism when an excpetion occurs. Vegas any exceptions thrown from the underlying platform to validation errors in the request information sent from the Flash client to be logged using this method.
void GameServer.GameSvr.LogMess | ( | string | sessionId, |
string | msg | ||
) |
Method Name :– LogMess
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
msg | - The message to be logged |
Comments :– This method is the main logging mechanism. Vegas expects detailed game logs about the session activity as this is the main source of investigation when issues arise.
void GameServer.GameSvr.LogPromotion | ( | string | sessionId, |
string | msg | ||
) |
Method Name :– LogPromotion
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
msg | - The message to be logged |
Comments :– This method is the logging mechanism for when a promotional item has been won. This method will not be used by standard games.
void GameServer.GameSvr.LogSuspicious | ( | string | sessionId, |
string | msg | ||
) |
Method Name :– LogSuspicious
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
msg | - The message to be logged |
Comments :– This method is the logging mechanism when validation of the bet request string detects something unusual. For example, if a request with a bet value that is negative or more than the account balance then this should be logged, the bet should also be rejected.
double GameServer.GameSvr.RecordJackpotWin | ( | string | sessionId, |
int | tierNumber, | ||
double | fullTierAmount, | ||
double | tierAmountWon | ||
) |
Method Name :– RecordJackpotWin
sessionId | - Session ID of the client obtained from the cookie |
tierNumber | - Number relating to the jackpot tier that has been won |
fullTierAmount | - Amount in the tier at time of winning |
tierAmountWon | - Amount won from the tier |
Comments :– When a jackpot tier is won, the game must call RecordJackpotWin before adding the win amount to the account via the record-StakeAndReturn call. This is to handle the situation where the same jackpot tier is win by two or more players at the same time and so the player who was slightly slower in winning the jackpot should receive a lower jackpot amount win as the jackpot tier has already been reduced to pay the first winner. The amount returned is the actual amount won from the jackpot. If this differs from the tierAmountWon sent as an input pa-rameter then the game should adjust the jackpot balance shown in the game before showing the win, or cancel the bet and let the customer retry.
double GameServer.GameSvr.RecordProgressiveStake | ( | string | sessionId, |
double | stakeAmount | ||
) |
Method Name :– RecordProgressiveStake
Description :– This method is responsible for adding or subtracting amount to the game during play.
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
stakeAmount | - The amount that has been staked. This can be zero if the game has free bet functionality or a win has occurred for a jackpot. |
Comments :– This is the stake method when a game uses a progressive jackpot. The use of this method means that the stake amount will be used to calculate how much money will be added to the progressive jackpots.
void GameServer.GameSvr.RecordPromotionWin | ( | string | sessionId, |
string | gameCode, | ||
string | message | ||
) |
Method Name :– RecordPromotionWin
Description :– Not used - allowed a game to record that a physical prize had been awarded
Comments :- Not used.
double GameServer.GameSvr.RecordRepeatingReward | ( | string | sessionId, |
string | betId, | ||
double | winAmount, | ||
string | frequency, | ||
int | numberOfPeriods | ||
) |
Method Name :– RecordRepeatingReward
Description :– Used for a specific game to reward cash amounts that are paid at fixed intervals - not used for general games
sessionId | - Session ID of the client obtained from the cookie |
betId | |
winAmount | |
frequency | |
numberOfPeriods |
double GameServer.GameSvr.RecordStakeAndReturn | ( | string | sessionId, |
double | stakeAmount, | ||
double | returnAmount | ||
) |
Method Name :– RecordStakeAndReturn
Description :– This method is responsible for adding or subtracting amount to the game during play.
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
stakeAmount | - The amount that has been staked. This can be zero if the game has free bet functionality or a win has occurred for a jackpot. |
returnAmount | - The amount that has been won from the bet. This is zero for losing bets. |
Comments :– This is the main stake and return mechanism for bets. The game decides the bet result and according to the stake, calculates any return amount. The return value is the account balance AFTER the amounts have been debited or credited.
double GameServer.GameSvr.ResultRapidFireSelection | ( | string | sessionId, |
int | tierNumber, | ||
double | fullTierAmount, | ||
double | amount | ||
) |
Method Name :– ResultRapidFireSelection
Description :– Not used - allows a jackpot win to be decided to the server according to an RNG call
Comments :- Not used.
void GameServer.GameSvr.SaveConfig | ( | string | sessionId, |
string | configurationCode, | ||
string | configurationData | ||
) |
Method Name :– SaveConfig
Description :– Stores the configuration data for the account and configuration code.
sessionId | - The Session ID |
configurationCode | - The key code for the configuration, agreed in advance with between the game supplier and William Hill |
configurationData | - The data to be stored, a string format |
void GameServer.GameSvr.SetJackpotAllocationPercentage | ( | string | gameCode, |
double | jackpotAllocationPercentage | ||
) |
SDK Only
void GameServer.GameSvr.SetJackpotTierAllocationPercentage | ( | string | gameCode, |
int | tierNumber, | ||
double | tierAllocationPercentage | ||
) |
SDK Only
void GameServer.GameSvr.SetJackpotTierAmount | ( | string | gameCode, |
int | tierNumber, | ||
double | tierAmount | ||
) |
SDK Only
void GameServer.GameSvr.SetJackpotTierReseedAmount | ( | string | gameCode, |
int | tierNumber, | ||
double | reseedAmount | ||
) |
SDK Only
void GameServer.GameSvr.SetJackpotType | ( | string | gameCode, |
string | type | ||
) |
SDK Only
void GameServer.GameSvr.SetStakeLevelJackpotTier | ( | string | gameCode, |
int | tierNumber, | ||
double | stakeLevel, | ||
double | monetaryContribution | ||
) |
SDK Only
void GameServer.GameSvr.stateClear | ( | string | sessionId, |
string | gameCode | ||
) |
Method Name :– stateClear
Description :– Persistent game state - save the game state
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
gameCode | - The string that uniquely refers to the game |
Comments :- When a game no longer needs to have the current game state (e.g. after a game round has been successfully processed), the game state should be removed
string GameServer.GameSvr.stateLoad | ( | string | sessionId, |
string | gameCode | ||
) |
Method Name :– stateLoad
Description :– Return the game state for the account number and game code – returns an empty string if one does not exist
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
gameCode | - The string that uniquely refers to the game |
Comments :- Returns the current persistent game state for the game being played. An empty string is returned if no game state exists.
void GameServer.GameSvr.stateSave | ( | string | sessionId, |
string | gameCode, | ||
string | state, | ||
double | totalstakes | ||
) |
Method Name :– stateSave
Description :– Persistent game state - save the game state
sessionId | - The sessionId obtained from the cookie 'Gameroom ID' |
gameCode | - The string that uniquely refers to the game |
state | - string representing the state of the game |
totalstakes | - The total value of the stakes for the cur-rent bet. Although this may well be part of the game state, we store it separately so we can see the total stake value being held. This parameter really only makes sense for multi round games such as blackjack, in general slots should set this to 0. |
Comments :- Stores the persistent game state and the current total stake value for the customer and game. A new game session for the same game can re-use the state.
string GameServer.GameSvr.SubtractFromBalance | ( | string | sessionId, |
double | amount, | ||
string | currencyCode | ||
) |
Method Name :– SubtractFromBalance
sessionId | - Session ID of the client retrieved from the GameServer |
amount | - amount to subtract |
currencyCode | - Currency code of the client |
void GameServer.GameSvr.UpdateHistory | ( | string | sessionId, |
string | transactionRef | ||
) |
Method Name :– UpdateHistory
sessionId | - Session ID of the client obtained from the cookie |
transactionRef | - Representation of the transaction details |
Comments :– For every bet, a string representing the bet details, down to a detailed level. The game should store these details on every bet. Note that William Hill also have their own back office systems to read the game history so every game release should also include a specification for how to parse the history so it can be displayed in a web application.
We capture bet history at 4 events within the game, which are:
1 = BET
2 = CASHIN
3 = CASHOUT
4 = JACKPOTWIN
You should only care about events 1 and 4 as Pay Per Play is now our default so Cash in and Out doesn't occur. The numbers relating to those events however are important.
When writing to bet history we want a semicolon separated string with fields in a specific order, this order is:
HISTORY_BLANK;HISTORY_RECORD_TYPE;HISTORY_GAME_CODE;HISTORY_REF;HISTORY_DATE_STRING;HISTORY_BET_VALUE;HISTORY_WINNINGS; HISTORY_BLANK;HISTORY_STAKES;HISTORY_SELECTIONS;HISTORY_RESULTS;HISTORY_DETAIL
Field description:
HISTORY_BLANK = Always set to 1 (possibly historic reasons)
HISTORY_RECORD_TYPE = Relates to game event (1 being most common as every spin is a bet)
HISTORY_GAME_CODE = This is the game code passed in from our back office (4 char game code including lang code e.g. LLEN)
HISTORY_REF = Unique reference for the history record (can be obtained via objGameSvr.GetBetID)
HISTORY_DATE_STRING = Date and time of history record
HISTORY_BET_VALUE = Amount bet (2 decimal places)
HISTORY_WINNINGS = Amount won (2 Decimal places)
HISTORY_BLANK = Always set to 99 (possibly historic reasons)
HISTORY_STAKES = Stake (2 Decimal places)
HISTORY_SELECTIONS = Current feature (e.g. "Normal Spin", "Freespin", "Bonus", "Jackpot")
HISTORY_RESULTS = Number of wins (e.g. "1 win", "No win", "20 wins")
HISTORY_DETAIL = Another delimited string containing extra information
An example of data in this format would be:
1;1;LLEN;6289388;20110210162557;1.00;0.00;99;0.04;Normal Spin;1 win;LLNOR:0.04:25| | |gameRound=1| | |posReels=12,1,12,1,14| | |symbols=1,12,3,7,9,4,1,12,0,8,6,13,2,12,0| | |freeSpins=10| | |stake=0.04| | |winstr=0:12:3:0:1:10|
As you can see this is a fairly convoluted string, but field order is important.
The fields that say HISTORY_BLANK are always set to the same values of 1 and 99 respectively, I don't know the reason for this, possibly historic. All other fields should be relevant to the particular game event, which is stored in the HISTORY_RECORD_TYPE, obviously the most common will be 1 as that will happen on every spin.
The HISTORY_DETAIL field contains extra information relating to the event. It starts off with a unique game code concatenated with a short version of the HISTORY_SELECTIONS field, delimited by a colon then the stake, another colon and then a number relating to a game state (such as a feature, you can define this mapping).
The HISTORY_DETAIL field in the example is a 3 pipe delimited string. This is not recommended, JSON is a more logical choice for this field.
|
protected |