- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes
No changes to functionality
This fixes several issues with compatibility with C++20. C++23 was also
tested, but apparently it does not have any additional breaking changes
compared to C++20 (or we don't have those).
VCMI still uses C++17 as before - goal is only to make potential
transition easier.
There were 2 cases that are deprecated in C++20 that we use:
- Floating point operations on enums are deprecated
- `this` can no longer be captured when using default capture by value
`[=]`
Both of those should now be replaced with code that works fine in both C+
+17 and in C++20 mode
It is now possible for mods (e.g. vcmi extras) to provide custom icons
for bonuses subtypes or for custom bonuses values without requiring
hardcoded check in vcmi.
All existing hardcoded checks have been removed.
Bonuses config json from mods is now actually loaded.
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
- Adjusted the displayed damage range of ballista to reflect the changes in hero/es attack skill like in OH3.
- Added checks to ensure the battle interface and relevant heroes are valid before calculating damage.
- Adjusted the displayed damage range of ballista to reflect the changes in hero/es attack skill like in OH3.
- Added checks to ensure the battle interface and relevant heroes are valid before calculating damage.
- Correctly retrieve the ballista status from the hero's war machine slot.