mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes: * default log level set to trace * LOG_TRACE raii guardian lifetime will last till the end of block * compile fixes * minor refactorings
This commit is contained in:
@@ -92,7 +92,7 @@ void Res::ResourceSet::nziterator::advance()
|
||||
{
|
||||
do
|
||||
{
|
||||
cur.resType++;
|
||||
vstd::advance(cur.resType, +1);
|
||||
} while(cur.resType < GameConstants::RESOURCE_QUANTITY && !(cur.resVal=rs[cur.resType]));
|
||||
|
||||
if(cur.resType >= GameConstants::RESOURCE_QUANTITY)
|
||||
@@ -102,8 +102,8 @@ void Res::ResourceSet::nziterator::advance()
|
||||
Res::ResourceSet::nziterator::nziterator(const ResourceSet &RS)
|
||||
: rs(RS)
|
||||
{
|
||||
cur.resType = 0;
|
||||
cur.resVal = rs[0];
|
||||
cur.resType = WOOD;
|
||||
cur.resVal = rs[WOOD];
|
||||
|
||||
if(!valid())
|
||||
advance();
|
||||
|
||||
Reference in New Issue
Block a user