File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,6 +162,22 @@ Dictionary AttributeChangeSet::prepare_diff() const
162162 attribute_diff.instantiate ();
163163 diff.set (attribute_name, attribute_diff);
164164
165+ if (!Math::is_zero_approx (operation->duration )) {
166+ attribute_diff->time_based = true ;
167+
168+ switch (operation->tick_type ) {
169+ case AttributeChangeSetOperation::TICK_MILLISECOND :
170+ attribute_diff->remaining_duration = operation->duration ;
171+ break ;
172+ case AttributeChangeSetOperation::TICK_SECOND :
173+ attribute_diff->remaining_duration = operation->duration * 1000.0 ;
174+ break ;
175+ case AttributeChangeSetOperation::TICK_MINUTE :
176+ attribute_diff->remaining_duration = operation->duration * 60000.0 ;
177+ break ;
178+ }
179+ }
180+
165181 float permanent_additive_buff = 0.0 ;
166182 float permanent_multiplicative_buff = 1.0 ;
167183 float transient_additive_buff = 0.0 ;
You can’t perform that action at this time.
0 commit comments