1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00
Commit Graph

301 Commits

Author SHA1 Message Date
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
50887a4f30 fix hangs after a siege battle 2025-05-02 22:16:35 +08:00
c0fb1d1b3b Replace some raw pointers with unique's or optional 2025-04-29 12:11:10 +03:00
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
912c2eae94 Fix regressions 2025-04-27 14:57:31 +03:00
e6a8e5d4bd Correctly restore bonus system on deserialization 2025-04-27 14:57:31 +03:00
93b18ee94b Fix some issues detected by Sonar & code review, fix build 2025-04-27 14:57:31 +03:00
d1d2cf4189 Fix crashes on game start, gamestate now derives from GameCallbackHolder 2025-04-27 14:57:31 +03:00
d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
4ed13409c2 Remove serialization of raw pointers from serialization 2025-04-27 14:57:31 +03:00
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
62cb5412ff CGameState::map is now a private, unique_ptr with accessors 2025-03-08 14:05:14 +00:00
b6026084ea StartInfo in gamestate now use unique_ptr 2025-03-08 14:04:51 +00:00
82506d5eff Removed ConstTransitivePtr from StackLocation 2025-03-08 14:04:51 +00:00
a061ed04de Remove usage of ConstTransitivePtr from CTown 2025-03-08 14:04:51 +00:00
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
58a6185b43 Fix stacking of bonuses from buildings like Tavern
- Same buildings in different towns of the same faction that provide
bonuses with propagators will now correctly stack their bonuses. This
fixes Tavern and possibly other such buildings
- Brotherhood of Sword now correctly adds bonus to thieves guild access
2025-02-14 14:29:58 +00:00
2ee5f2df02 Merge pull request #5295 from IvanSavenko/bugfixing
[1.6.4] Bugfixing for recently reported issues
2025-01-21 15:50:02 +02:00
ed70e94f9a Better reporting for configurable building initialization crash 2025-01-19 16:13:12 +00:00
82b81a7853 Added better error reporting for unclear crashes 2025-01-19 12:39:22 +00:00
e829d723b2 Replace global bonus tree change counter with per-node counter 2025-01-12 12:23:07 +00:00
4b7792075d map editor: option to set random town same as player faction 2025-01-05 21:57:11 +01:00
4ccd860b2f Fix possible crash on loading save with invalid buildings, e.g. Mage
Guild 4 in towns without one
2025-01-03 15:41:26 +00:00
95a07ee5cb Use bonus system cache whenever possible 2024-12-21 18:47:11 +00:00
f893c80192 Move UpgradeInfo class to header and source files 2024-12-19 14:13:09 +01:00
af9445c16f Fixes following review 2024-12-17 22:34:06 +01:00
d8d3948ac3 Fix AI to use hillFort all available upgrades. UpgradeInfo refactor. 2024-12-17 22:34:06 +01:00
7be31c94f2 Fixes from code review 2024-12-05 21:16:06 +01:00
e9be46af98 Merge branch 'develop' into timed_events_objects_removal 2024-12-03 17:27:24 +01:00
01d787fb5a Removed remaining cases of serialization of VLC entities 2024-10-30 16:48:18 +00:00
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
ee59bc4e71 Add bonus description generation for map objects 2024-10-25 18:36:02 +00:00
3dd4fa2528 Reduce usage of pointers to VLC entities
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
2024-10-10 12:28:08 +00:00
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
87ebb22a55 map editor: fix reading town faction name for non random towns on h3m maps 2024-10-06 13:59:34 +02:00
9c6bd20159 code review 2024-10-01 16:32:28 +02:00
d078c5ff2d store ObjectInstanceID of objects to remove instead of their position 2024-09-30 20:44:40 +02:00
e50ba14bbe Use exact position of object to remove + add object name to list of objects to remove 2024-09-30 19:17:21 +02:00
713fcd6543 research per day & seperate config 2024-09-30 02:40:28 +02:00
d929bfb9d1 rename; introduce factor 2024-09-28 15:05:13 +02:00
2052a26031 code review 2024-09-28 14:25:11 +02:00
7707adc44f checks on server 2024-09-28 01:18:10 +02:00
39a2c29c97 Removed creatureBank flag from battle, battles now receive BattleLayout
struct that defines how units are placed in combat
2024-09-12 12:11:18 +00:00
6179521364 Merge pull request #4556 from IvanSavenko/town_building_visit
Implemented explicitly visitable town buildings, e.g. hota mana vortex
2024-09-05 17:21:21 +03:00