Tests for script aggregator.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-11-10 19:55:01 +01:00
parent d8332f9e40
commit 859cd02478
2 changed files with 171 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ namespace CreatureLib::Battling{
};
bool HasNext(){
return _selfIterator != _selfEnd || _isSetSet;
return _selfIterator != _selfEnd || (_isSetSet && _setIterator != _setEnd);
}
Script* GetNext(){
@@ -42,6 +42,7 @@ namespace CreatureLib::Battling{
if (_selfIterator == _selfEnd)
return nullptr;
auto next = *_selfIterator;
_selfIterator++;
if (!next.IsSet()){
auto scriptPtr = next.GetScript();
if (scriptPtr == nullptr)