Add TurnStart, TurnEnd and ExperienceGain event triggers.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user