Commit Graph
32 Commits
Author SHA1 Message Date
Ivan Savenko cc6f65d8da Resolve Sonar issues in server code 2025-05-27 22:02:13 +03:00
Ivan Savenko af20b39fe6 Reduce non-const access to gamestate on server 2025-05-23 14:17:25 +03:00
Ivan Savenko 8255a4b9ae CGameHandler no longer inherits CGameInfoCallback, reduce direct access
to gamestate
2025-05-23 14:17:25 +03:00
Ivan Savenko cc5f47a085 Fix inability to save game 2025-05-19 21:01:52 +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 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 4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko 829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko 417ea6451a Remove ConstTransitivePtr from hero and town instances 2025-04-27 14:57:30 +03:00
Ivan Savenko c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
Ivan Savenko ee831c06e7 Reduced usage of CPack, replaced with CPackForServer where applicable 2024-10-07 14:59:14 +00:00
Ivan Savenko b09d9d501b Pass pointer to actual caller in showBlockingDialog callWith
Fixes activation of all rewardable buildings in town on blocking dialog
answer
2024-09-04 15:14:56 +00:00
Ivan Savenko 81af66d35b Move visit query to a separate class, remove no longer needed Cast.h 2024-09-04 14:32:36 +00:00
Ivan Savenko 29f87d6407 pass object/hero parameters directly instead of passing query 2024-09-04 14:17:22 +00:00
Ivan Savenko b8b42978b1 Reduce includes in headers 2024-04-26 13:26:33 +03:00
Ivan Savenko 090a1c7764 TurnTimerHandler is now a unique_ptr 2024-04-26 13:15:39 +03:00
SoundSSGood 9f688e6fb7 MoveArtifact, BulkMoveArtifacts PlayerColor player field 2024-03-07 22:28:56 +02:00
SoundSSGood b1f52eec41 ManageBackpackArtifacts 2024-03-07 18:16:22 +02:00
SoundSSGood f66918ea14 bulk move to altar 2024-01-27 15:28:23 +02:00
SoundSSGood 7e6ab5e87b fix test & fix build & suggested changes 2023-10-29 17:46:14 +02:00
SoundSSGood ab2f6abb87 ArtifactLocation now use ID for artHolder identification part2 2023-10-29 17:46:13 +02:00
Ivan Savenko b88a8da4e8 Split off some netpack structures into separate files 2023-10-23 13:59:15 +03:00
nordsoft d7d435dcb7 Add game pause 2023-10-08 16:03:57 +02:00
Ivan Savenko 39a92cdde3 Add query for dwellings dialog 2023-10-04 17:47:12 +03:00
Ivan Savenko 3cb489e9bd Fix University and Altar 2023-10-04 17:47:12 +03:00
Ivan Savenko 898733eed7 Added Query to track visit duration for Taverns and Markets 2023-10-04 17:47:12 +03:00
Ivan Savenko d257fb37f0 Use optional instead of Json for queries 2023-09-26 13:42:20 +03:00
Ivan Savenko 8c0d78f1d9 Added initiator-player to packs that add/remove/move objects 2023-09-19 19:24:34 +03:00
Ivan Savenko c8e6a7cd27 Fixed most common cases of movement actions 2023-09-16 20:07:26 +03:00
nordsoft f30f00faa0 Timer pausing while waiting for player accept turn 2023-08-30 02:18:44 +04:00
nordsoft 98f7ed9dfd Implement player start turn query 2023-08-28 18:56:36 +04:00
Ivan Savenko 323772fc2e Split CQuery file into multiple files 2023-08-21 17:55:07 +03:00