Add TurnStart, TurnEnd and ExperienceGain event triggers.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-07 11:02:37 +02:00
parent 3a170d8924
commit 5aa04a4b15
4 changed files with 36 additions and 5 deletions

View File

@@ -213,6 +213,9 @@ void Battling::Creature::AddExperience(uint32_t amount) {
if (level >= maxLevel) {
exp = _library->GetGrowthRateLibrary()->CalculateExperience(this->GetSpecies()->GetGrowthRate(), maxLevel);
}
if (_battle != nullptr) {
_battle->TriggerEventListener<ExperienceGainEvent>(this, _experience, exp);
}
_experience = exp;
_level = level;
}