4e8e85e3e4
Fix issues reported by Sonar, review fixes
2025-04-27 14:57:31 +03:00
829739da24
Reduce usage of implicit conversions to int
2025-04-27 14:57:31 +03:00
a89cf280e3
Fix campaigns progression
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
331debaa3f
Removed pointers from PlayerState
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
bdae7285ae
Objects list is now private member of CMap
2025-04-27 14:57:30 +03:00
1f502c0548
CMap towns and heroes on map fields are now private
2025-04-27 14:57:30 +03:00
0ada2a5ebd
Map objects now use shared_ptr (game)
2025-04-27 14:57:30 +03:00
2ca1748e96
Artifact instances are now owned solely by CMap
2025-04-27 14:57:30 +03:00
47cfe01141
seperate identifier
2025-04-11 00:49:26 +02:00
5b74f7f19e
code review (first batch)
2025-04-10 21:04:24 +02: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
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
e035cf9e63
Optimized getHeroStrength method
...
- replaced 4x access to bonus system with single access
- fixed formula for Diplomacy
- fxied formula for hero transfer in campaigns
- removed pointless sqrt(pow()) construct
2024-12-22 14:49:35 +00:00
c98ac01e7a
Replaced public artType member of ArtifactInstance with getter
2024-10-30 16:47:01 +00:00
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
...
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03:00
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
ad7f0416a7
Added overloaded version of getObjectHandler to CGHeroInstance
2024-10-13 13:06:31 +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
b9ae7f1138
CMap put move and remove artifact method
2024-09-23 23:30:38 +03:00
0058c9ba2e
Fix crash on transfer of multiple artifacts in a backpack to another
...
hero on starting next campaign scenario without hero that held these
artifacts before
2024-09-22 20:31:52 +00:00
a481f07daf
PlayerState now stores all objects owned by player
2024-08-28 12:51:27 +00:00
58bb2b58e3
IMarket suggestions
...
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com >
2024-08-20 18:49:48 +03:00
39bb6d5f39
IMarket now able to store artifacts
2024-08-20 18:49:47 +03:00
b7391f49f6
Merge branch 'vcmi/master' into 'vcmi/develop'
2024-08-05 10:36:10 +00:00
13108849ca
Try to fix crash on transferring component of a composite artifact
2024-08-02 16:00:17 +00:00
4aa73b40c9
Split CTownHandler into smaller chunks
2024-07-21 18:21:48 +00:00
2020d96070
Merge pull request #4071 from IvanSavenko/fix_rng_syncronization
...
[1.6] Fix potential desync if client uses different stdlib with different random number generators
2024-07-19 13:08:09 +03:00
662254155a
Merge branch 'vcmi/master' into 'vcmi/develop'
2024-07-17 13:57:36 +00:00
63bcf7d83c
Replaced most of usages of CRandomGenerator with vstd::RNG in library
2024-07-16 13:13:07 +00:00
30569a112c
Fix crash on attempt to transfer component of a combined artifact
2024-07-16 13:08:15 +00:00
02e429e973
Fix typos using https://github.com/crate-ci/typos
...
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
520f690d35
Fix transfer of non-first artifacts in backpack if hero does not
...
transfers as well
2024-05-28 14:21:29 +00:00
f963b827e9
Add more descriptive error messages
2024-05-16 08:03:06 +00:00
80fc2bb695
Merge remote-tracking branch 'vcmi/develop' into lobby
2024-02-03 21:11:34 +02:00
290cc1510b
Added text container with map translations to campaign state
...
Fixes missing translations for heroes names customized on maps after
their transfer to next scenario
2024-01-31 20:01:24 +02:00
5c5fb523a4
Implemented transfer of artifacts held by non-transferred heroes
2024-01-31 19:32:59 +02:00
709d05205d
Yog will now receive Angelic Alliance in his campaign
2024-01-31 12:42:02 +02:00
388ca6e776
Added list of active accounts and rooms to UI. Added room creation logic
2024-01-26 16:32:36 +02:00
6e629a6a5f
split getBonusLocalFirst into two distinct method:
...
- const method getFirstBonus that returns single matching bonusToString
- non-const method getLocalBonus that returns bonus from current node
2024-01-19 13:56:06 +02:00
e67e4430ba
Removed most of non-const static fields in lib. Reduced header includes.
2024-01-19 13:55:22 +02:00
a15366f5a5
Make IObjectInterface::cb non-static
2024-01-19 13:55:21 +02:00
d5c4478816
Remove most of non-const access to VLC entities
2024-01-19 13:54:49 +02:00
bd5682ecc3
Merge remote-tracking branch 'vcmi/master' into develop
2024-01-19 13:49:54 +02:00