mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
@ -507,3 +507,15 @@ CGeneralTextHandler::CGeneralTextHandler()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int32_t CGeneralTextHandler::pluralText(const int32_t textIndex, const int32_t count) const
|
||||
{
|
||||
if(textIndex == 0)
|
||||
return 0;
|
||||
else if(textIndex < 0)
|
||||
return -textIndex;
|
||||
else if(count == 1)
|
||||
return textIndex;
|
||||
else
|
||||
return textIndex + 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user