- pushing type that is derived from type registered in Lua will now
correctly push type known to Lua
- Methods of types stored on stack as shared pointers now actually load
this as shared pointer
- It is now possible to return types other than Json from Lua function
- Scripting module and lua dependency are now required.
- Script context pool now only exists in gamestate
- removed unused pools from client and server
- scripts are now registered in pools on start instead of lazy
registering with caching
Fixed 1.7.2 regression of spellcaster logic when casting non-random
spells.
Slight refactoring of AI code to simplify logic related to SPELLCASTER.
As a side effect - AI should now be better at selecting spells if unit
has multiple spells to cast.
Performance improvements to functions that are called a lot by AI:
- simplify math in BuildAnalyzer
- remove complex randomization in NodeStorage
- Fix excessive copying in Creature::cost
- Generate list of all resources in ResourceTypeHandler once
- Do not apply formatting on log entries that will be discarded due to
high log level
- Do not log incorrect access to visitablePos due to its numerous use by
RMG
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.
CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.
VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town
VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class