removed deprecated in statisticmanager
This commit is contained in:
parent
447e0cc326
commit
7f6b946158
@ -10,13 +10,14 @@ use ManiaControl\Players\Player;
|
|||||||
/**
|
/**
|
||||||
* Statistic Manager Class
|
* Statistic Manager Class
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @author ManiaControl Team <mail@maniacontrol.com>
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
||||||
* @copyright 2014-2017 ManiaControl Team
|
* @copyright 2014-2017 ManiaControl Team
|
||||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||||
*/
|
*/
|
||||||
class StatisticManager implements UsageInformationAble {
|
class StatisticManager implements UsageInformationAble {
|
||||||
use UsageInformationTrait;
|
use UsageInformationTrait;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
@ -33,20 +34,6 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
const SPECIAL_STAT_ROCKET_ACC = 'Rocket Accuracy';
|
const SPECIAL_STAT_ROCKET_ACC = 'Rocket Accuracy';
|
||||||
const SPECIAL_STAT_ARROW_ACC = 'Arrow Accuracy';
|
const SPECIAL_STAT_ARROW_ACC = 'Arrow Accuracy';
|
||||||
|
|
||||||
/*
|
|
||||||
* Public properties
|
|
||||||
*/
|
|
||||||
/** @var StatisticCollector $statisticCollector
|
|
||||||
* @deprecated
|
|
||||||
* @see getStatisticCollector()
|
|
||||||
*/
|
|
||||||
public $statisticCollector = null;
|
|
||||||
/** @var SimpleStatsList $simpleStatsList
|
|
||||||
* @deprecated
|
|
||||||
* @see getSimpleStatsList()
|
|
||||||
*/
|
|
||||||
public $simpleStatsList = null;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Private properties
|
* Private properties
|
||||||
*/
|
*/
|
||||||
@ -55,6 +42,12 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
private $stats = array();
|
private $stats = array();
|
||||||
private $specialStats = array();
|
private $specialStats = array();
|
||||||
|
|
||||||
|
/** @var StatisticCollector $statisticCollector */
|
||||||
|
public $statisticCollector = null;
|
||||||
|
|
||||||
|
/** @var SimpleStatsList $simpleStatsList */
|
||||||
|
public $simpleStatsList = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new statistic manager instance
|
* Construct a new statistic manager instance
|
||||||
*
|
*
|
||||||
@ -181,6 +174,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Return the statistic collector
|
* Return the statistic collector
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @return StatisticCollector
|
* @return StatisticCollector
|
||||||
*/
|
*/
|
||||||
public function getStatisticCollector() {
|
public function getStatisticCollector() {
|
||||||
@ -190,6 +184,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Return the simple stats list
|
* Return the simple stats list
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @return SimpleStatsList
|
* @return SimpleStatsList
|
||||||
*/
|
*/
|
||||||
public function getSimpleStatsList() {
|
public function getSimpleStatsList() {
|
||||||
@ -199,6 +194,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Get All statistics ordered by an given name
|
* Get All statistics ordered by an given name
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $statName
|
* @param string $statName
|
||||||
* @param $serverIndex
|
* @param $serverIndex
|
||||||
* @param $minValue
|
* @param $minValue
|
||||||
@ -247,6 +243,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Gets The Ranking of an Special Stat
|
* Gets The Ranking of an Special Stat
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $statName
|
* @param string $statName
|
||||||
* @param $serverIndex
|
* @param $serverIndex
|
||||||
* @return array
|
* @return array
|
||||||
@ -345,6 +342,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Return the Stat Id
|
* Return the Stat Id
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $statName
|
* @param string $statName
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
@ -359,12 +357,12 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Get all statistics of a certain player
|
* Get all statistics of a certain player
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int $serverIndex
|
* @param int $serverIndex
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getAllPlayerStats(Player $player, $serverIndex = -1) {
|
public function getAllPlayerStats(Player $player, $serverIndex = -1) {
|
||||||
// TODO improve performance of the foreach
|
|
||||||
$playerStats = array();
|
$playerStats = array();
|
||||||
foreach ($this->stats as $stat) {
|
foreach ($this->stats as $stat) {
|
||||||
$value = $this->getStatisticData($stat->name, $player->index, $serverIndex);
|
$value = $this->getStatisticData($stat->name, $player->index, $serverIndex);
|
||||||
@ -447,6 +445,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Get the value of an statistic
|
* Get the value of an statistic
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param $statName
|
* @param $statName
|
||||||
* @param $playerId
|
* @param $playerId
|
||||||
* @param int $serverIndex
|
* @param int $serverIndex
|
||||||
@ -532,6 +531,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Increments a Statistic by one
|
* Increments a Statistic by one
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $statName
|
* @param string $statName
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int $serverIndex
|
* @param int $serverIndex
|
||||||
@ -544,6 +544,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Inserts a Stat into the database
|
* Inserts a Stat into the database
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param string $statName
|
* @param string $statName
|
||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param int $serverIndex
|
* @param int $serverIndex
|
||||||
@ -600,6 +601,7 @@ class StatisticManager implements UsageInformationAble {
|
|||||||
/**
|
/**
|
||||||
* Defines a Stat
|
* Defines a Stat
|
||||||
*
|
*
|
||||||
|
* @api
|
||||||
* @param $statName
|
* @param $statName
|
||||||
* @param string $type
|
* @param string $type
|
||||||
* @param string $statDescription
|
* @param string $statDescription
|
||||||
|
Loading…
Reference in New Issue
Block a user