From 8be1dd54bb17b3ba3e20960aa3c3f696d09facf7 Mon Sep 17 00:00:00 2001 From: nshah25 <68348722+nshah25@users.noreply.github.com> Date: Mon, 3 May 2021 16:07:09 -0400 Subject: Add player statistics to API (#5193) * Fixed issue #5166 Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang --- src/Entities/Player.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Entities/Player.h') diff --git a/src/Entities/Player.h b/src/Entities/Player.h index df84d25e0..e7b18f3b6 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -230,6 +230,9 @@ public: AString GetIP(void) const; // tolua_export + /** Return the associated statistic and achievement manager. */ + StatisticsManager & GetStatistics() { return m_Stats; } + /** Returns the associated team, nullptr if none */ cTeam * GetTeam(void) { return m_Team; } // tolua_export @@ -244,13 +247,10 @@ public: /** Forces the player to query the scoreboard for his team */ cTeam * UpdateTeam(void); - /** Return the associated statistic and achievement manager. */ - cStatManager & GetStatManager() { return m_Stats; } - /** Awards the player an achievement. If all prerequisites are met, this method will award the achievement and will broadcast a chat message. If the achievement has been already awarded to the player, this method will just increment the stat counter. */ - void AwardAchievement(Statistic a_Ach); + void AwardAchievement(CustomStatistic a_Ach); /** Forces the player to move in the given direction. @deprecated Use SetSpeed instead. */ @@ -735,7 +735,7 @@ private: cTeam * m_Team; - cStatManager m_Stats; + StatisticsManager m_Stats; /** How long till the player's inventory will be saved Default save interval is #defined in PLAYER_INVENTORY_SAVE_INTERVAL */ -- cgit v1.2.3