mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-13 08:13:46 +00:00
refactor: power-up statistics come from the power-up's pickup skill
TrackLOTCollection hardcoded the 15 life/armor/imagination power-up LOTs. A power-up (Objects.type "Powerup") now counts towards the statistic of what its pickup skill restores: a Heal, RepairArmor or Imagination behavior in the skill's behavior tree. Gives the same result for the 15 LOTs; "HoT Powerup" (8208, heal over time) now also counts as a life power-up. Refs #691 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <set>
|
||||
#include "Loot.h"
|
||||
#include "StatisticID.h"
|
||||
#include <optional>
|
||||
|
||||
enum class eGameActivity : uint32_t;
|
||||
|
||||
@@ -190,6 +191,13 @@ public:
|
||||
*/
|
||||
void TrackLOTCollection(LOT lot);
|
||||
|
||||
/**
|
||||
* The statistic a power-up counts towards, from what its pickup skill restores (life, armor or imagination)
|
||||
* @param lot the LOT that was picked up
|
||||
* @return the statistic, or nothing when the LOT is not such a power-up
|
||||
*/
|
||||
static std::optional<StatisticID> GetPowerUpStatistic(LOT lot);
|
||||
|
||||
/**
|
||||
* Handles a change in health and updates the statistics
|
||||
* @param health the health delta
|
||||
|
||||
Reference in New Issue
Block a user