Ivan Savenko
46072a1d60
Merge pull request #5896 from IvanSavenko/code_reorganize
...
Split large source files into smaller files per 1 class
2025-07-08 10:47:13 +03:00
Ivan Savenko
8721bdd728
Split CCreatureSet file on .h/.cpp per class basis
2025-07-07 19:12:31 +03:00
Ivan Savenko
200850f56f
Add COMBAT_MANA_BONUS for Skyship
2025-07-06 15:36:51 +03:00
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
4d57a8ed36
Prefer to pass CGameState as reference instead of pointer
2025-04-27 14:57:31 +03:00
Ivan Savenko
ce436bd63e
Fix regressions in combat
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
4ed13409c2
Remove serialization of raw pointers from serialization
2025-04-27 14:57:31 +03:00
Ivan Savenko
0ada2a5ebd
Map objects now use shared_ptr (game)
2025-04-27 14:57:30 +03:00
Ivan Savenko
417ea6451a
Remove ConstTransitivePtr from hero and town instances
2025-04-27 14:57:30 +03:00
SoundSSGood
603672ff51
revert some changes
2025-04-07 17:00:24 +02:00
SoundSSGood
4609a83fc1
ArtInfoWindow on client. Lib side
2025-04-05 18:02:04 +02:00
Ivan Savenko
a8e84c55f6
Fix some of the new warnings from sonarcloud
2024-10-11 10:45:29 +00: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
a7cdeb723e
Fix blocking dialog handling in refusable rewardable town building
2024-09-23 13:00:02 +00:00
Ivan Savenko
bff2e064fc
Wait for queries generated by town building visit to end before visiting
...
next building
2024-09-16 19:32:39 +00:00
Ivan Savenko
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
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
d34b4a141e
Split map object visit from town building visit. Removes side effects
...
from building visit
2024-09-04 14:54:09 +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
2a05fbdd50
Unified handling of battle sides ID's
...
- Replaced BattleSide namespace-enum with enum class
- Merged two different BattleSide enum's into one
- Merged BattlePerspective enum into BattleSide enum
- Changed all places that use integers to represent battle side to use
BattleSide enum
- Added BattleSideArray convenience wrapper for std::array that is
always 2-elements in size and allows access to its elements using
BattleSide enum
2024-08-11 20:54:44 +00:00
Ivan Savenko
c00a1e1b0c
Fixed new issues detected by SonarCloud
2024-07-15 07:46:40 +00:00
Alexander Wilms
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
f39aaf2495
After-battle object visitation will now occur after levelups
2024-06-01 10:06:16 +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
Laserlicht
119fa1e96c
seperate path for ai vs human
2024-03-04 20:34:43 +01:00
Laserlicht
37f621abbd
fix visiting objects other than town
2024-02-28 23:13:51 +01:00
Laserlicht
b0b3b9bb84
fix castle replay
2024-02-28 22:26:53 +01:00
Ivan Savenko
f2ecd4cf11
Merge branch 'develop' into 'lobby'
2024-02-11 16:13:13 +02:00
Alexander Wilms
522cb571b3
Remove redundant virtual
specifiers
...
`grep -nr virtual | grep -v googletest | grep override > ../redundant_virtual.txt`
```python
import os
with open("../redundant_virtual.txt") as f:
for line in f:
print()
line: str = line.strip()
print(line)
tmp = line.split(":")
file = tmp[0].strip()
code = tmp[-1].strip()
print(file)
print(code)
new_code = code.replace("virtual ", "", 1)
# https://superuser.com/a/802490/578501
command = f"export FIND='{code}' && export REPLACE='{new_code}' && ruby -p -i -e \"gsub(ENV['FIND'], ENV['REPLACE'])\" {file}"
os.system(command)
```
2024-02-10 20:46:13 +01:00
Ivan Savenko
80fc2bb695
Merge remote-tracking branch 'vcmi/develop' into lobby
2024-02-03 21:11:34 +02:00
Ivan Savenko
6eef197cea
Removed no longer used mutexes from match server
2024-02-03 17:04:14 +02:00
Ivan Savenko
7247038458
Merge pull request #3574 from SoundSSGood/altar-fixes
...
Artifacts altar related fixes
2024-02-01 22:27:41 +02:00
SoundSSGood
f66918ea14
bulk move to altar
2024-01-27 15:28:23 +02:00
Laserlicht
7f58333ef9
quick combat vs ai
2024-01-25 23:44:41 +01:00
Ivan Savenko
5df98f3eca
Allow timer pause pack on opening settings menu in battle
2023-11-27 20:27:10 +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