diff --git a/src/world/Encounter/EncounterTimeline.cpp b/src/world/Encounter/EncounterTimeline.cpp index 0ca29165..23419926 100644 --- a/src/world/Encounter/EncounterTimeline.cpp +++ b/src/world/Encounter/EncounterTimeline.cpp @@ -142,7 +142,7 @@ namespace Sapphire PhaseCondition::from_json( json, phase, conditionId ); auto paramData = json.at( "paramData" ); - auto actorRef = paramData.at( "sourceActor" ); + auto actorRef = paramData.at( "sourceActor" ).get< std::string >(); // resolve the actor whose hp we are checking if( auto it = actors.find( actorRef ); it != actors.end() ) diff --git a/src/world/Encounter/EncounterTimeline.h b/src/world/Encounter/EncounterTimeline.h index 61bd0738..1021a71b 100644 --- a/src/world/Encounter/EncounterTimeline.h +++ b/src/world/Encounter/EncounterTimeline.h @@ -311,7 +311,7 @@ namespace Sapphire { uint64_t phaseElapsed = time - m_startTime; uint64_t timepointElapsed = time - m_lastTimepointTime; - + auto& timepoint = m_timepoints[ i ]; if( timepoint.canExecute( timepointElapsed ) ) { @@ -432,7 +432,7 @@ namespace Sapphire } else if( pCondition->inProgress() ) { - pCondition->execute( pFight, time ); + pCondition->update( pFight, time ); } else if( pCondition->isConditionMet( pFight, time ) ) {