C# Class BF2Statistics.ASP.StatsProcessor.Snapshot

This class is used to Validate, and Process the Game data sent from the Battlefield 2 server at the end of a round (Aka: Snapshot data)
Inheritance: GameResult
Show file Open project: BF2Statistics/ControlCenter Class Usage Examples

Public Properties

Property Type Description
SnapshotMode SnapshotMode

Private Properties

Property Type Description
AddPlayer void
GenCheck void
GetWeaponTblPrefix string
Log void
SmocCheck void

Public Methods

Method Description
ProcessData ( ) : void

Processes the snapshot data, inserted and updating player data in the gamespy database

Snapshot ( string Snapshot, IPAddress ServerIp = null ) : System

Initializes a new Snapshot, with the specified Date it was Posted

Private Methods

Method Description
AddPlayer ( Player Player ) : void

Adds a player to the player list, and adds his scores to the global GameResult scores

GenCheck ( StatsDatabase Driver ) : void

Checks the rank tenure, and assigns a new General

GetWeaponTblPrefix ( int WeaponId ) : string

Since secondary weapons (such as knife and c4) use column prefix's in the database, we use this method to return it based on weapons ID

Log ( string Message, LogLevel Level ) : void

Logs a message in the stats debug, based on provided level

SmocCheck ( StatsDatabase Driver ) : void

Determines if a new player has has earned the new Smoc rank, and awards it

Method Details

ProcessData() public method

Processes the snapshot data, inserted and updating player data in the gamespy database
Thrown if the snapshot data is invalid
public ProcessData ( ) : void
return void

Snapshot() public method

Initializes a new Snapshot, with the specified Date it was Posted
public Snapshot ( string Snapshot, IPAddress ServerIp = null ) : System
Snapshot string The snapshot source
ServerIp System.Net.IPAddress
return System

Property Details

SnapshotMode public property

Is this a central update snapshot?
public SnapshotMode SnapshotMode
return SnapshotMode