1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-21 22:33:43 +02:00

154 Commits

Author SHA1 Message Date
Ivan Savenko
550d4d76eb
Merge pull request #5730 from IvanSavenko/rewardable_creature_fix
Fix handling of creatures in configurable town buildings
2025-05-21 13:51:43 +03:00
Ivan Savenko
95ce9ce509 Fix handling of creatures in configurable town buildings
- Fixed removal of partial stacks of creatures
- It is now possible to give units via town building, but only if
visitor has slots to take them
2025-05-20 22:36:20 +03:00
Ivan Savenko
54a46b77a9 Extract library entity randomization logic to separate class 2025-05-19 18:51:42 +03:00
Ivan Savenko
c7228b7e50 Fix incorrect icon on removal of skill 2025-05-16 17:43:27 +03:00
Ivan Savenko
456525109e Replaced undescriptive bool true/false with more clear enum for
absolute/relative change via netpacks
2025-05-16 17:21:39 +03:00
Ivan Savenko
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
Ivan Savenko
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
Ivan Savenko
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
Ivan Savenko
35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko
6859ab7c36 Fix discovered issues, remove not implemented ideas 2025-05-09 17:26:23 +03:00
Ivan Savenko
6b6199d3a4 Implemented giving bonuses to commanders 2025-05-07 22:49:22 +03:00
Ivan Savenko
434da3ffe1 Added forceCombat field for ambush-like objects 2025-05-07 19:49:26 +03:00
Ivan Savenko
0e2ea99283 Implemented option to emulate H3 seer hut full-army quest bug 2025-05-07 19:16:58 +03:00
Ivan Savenko
92c4bcbf68 Unify checks for creature limiter 2025-05-07 16:35:15 +03:00
Ivan Savenko
4b77140f4a Implemented playerGlobal visit mode for objects like cartographer 2025-05-06 18:53:43 +03:00
Ivan Savenko
f1d9d8479f Extend rewards & limiters functionality 2025-05-06 17:28:12 +03:00
Ivan Savenko
0212b6e37d Remove artifact from slot as reward 2025-05-06 17:28:12 +03:00
Ivan Savenko
6688d28198 Taking artifacts as a reward 2025-05-06 17:28:12 +03:00
Ivan Savenko
5dec3efa2f Spell scrolls as a reward 2025-05-06 17:28:12 +03:00
Ivan Savenko
62e774c91e Add new rewards for configurable objects 2025-05-06 17:28:11 +03:00
Ivan Savenko
283adc37d7 Unit stack rebalancing rework
- 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
2025-05-01 18:18:30 +03:00
Ivan Savenko
f70ad2c15b Reorganized artifact-related classes
- 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
2025-04-29 13:29:08 +03:00
Ivan Savenko
4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
Ivan Savenko
93b18ee94b Fix some issues detected by Sonar & code review, fix build 2025-04-27 14:57:31 +03:00
Ivan Savenko
d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
Ivan Savenko
9e6397d1f9 Remove pointer to boat from CGHeroInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
c02a8a84fd Stacks of armed instance are now unique_ptr 2025-04-27 14:57:30 +03:00
SoundSSGood
4609a83fc1 ArtInfoWindow on client. Lib side 2025-04-05 18:02:04 +02:00
Ivan Savenko
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
Ivan Savenko
82506d5eff Removed ConstTransitivePtr from StackLocation 2025-03-08 14:04:51 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
291c5e1027 Do not send empty packets changing primary skills by 0 points 2024-12-21 14:43:09 +00:00
Ivan Savenko
0e1f8f99bc Reduce excessive logging 2024-12-21 14:43:08 +00:00
Ivan Savenko
4ae81cbac0 Add missing field to serialization 2024-11-16 16:23:02 +00:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko
c55a75cc4e Remove copy-pasted code in rewardable town building leading to hero not
registered as visitor
2024-10-11 15:02:48 +00:00
Ivan Savenko
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
Ivan Savenko
b85ccccb37 Minor refactoring of translations:
- removed unsuccessful and broken validation of translations
- pass JsonNode when registering strings to provide information on mod
source
2024-10-06 19:42:15 +00:00
Ivan Savenko
cef7466c71
Merge pull request #4643 from SoundSSGood/CArtHandler-refactoring
CArtifactSet  tidy up
2024-10-01 16:26:32 +03:00
DjWarmonger
ffed9480e0
Merge pull request #4483 from vcmi/custom_objects_per_zone
Customizable objects in RMG zones
2024-10-01 14:58:35 +02:00
Ivan Savenko
f2c20b54d0 Unify rewardable map object and town building code 2024-09-27 15:41:24 +00:00
SoundSSGood
586a32a616 CArtifactSet cleanup 2024-09-23 23:39:19 +03:00
Ivan Savenko
92c5fd4156
Merge pull request #4655 from IvanSavenko/bugfixing
Bugfixing
2024-09-23 18:01:27 +03:00
Ivan Savenko
123f9ee676 Fix missing registration of onGuardedMessage string for banks 2024-09-22 20:30:55 +00:00
godric3
f4dc2dcd22 add missing serialization of spells in Limiter 2024-09-21 22:40:58 +02:00
Tomasz Zieliński
ec603f46ae - Handle new configurable banks
- Handle "all" object banned option
2024-09-21 13:36:28 +02:00
Ivan Savenko
d20d9bd96b Fix generation of placeholders for banks 2024-09-12 12:11:18 +00:00