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
cca08e29da
Remove duplicate semicolons
2024-01-16 19:02:39 +00:00
c3012105e2
Fix duplicated hero in Song for the Father campaign
2024-01-16 14:45:38 +02:00
13763cad8e
Remove few more implicit conversions
2023-11-15 15:55:19 +02:00
bbd3312705
Fix randomization of heroes in campaigns
2023-11-12 19:18:17 +02:00
2cc8b5baeb
Fix map startup
2023-11-08 21:27:05 +02:00
885dce0c27
Replace static_cast's of Identifiers with getNum call
2023-11-03 16:03:29 +02:00
8346d71c98
Remove more subID access
2023-11-01 14:44:05 +02:00
03e1169781
Reduced number of accesses to CGObjectInstance::subID
2023-11-01 14:43:20 +02:00
ab2f6abb87
ArtifactLocation now use ID for artHolder identification part2
2023-10-29 17:46:13 +02:00
b6b75beb29
Fixes for map editor
...
1) fix owner serialization for hero placeholder
2) fix roads/rivers layout
3) fix lasso
2023-10-24 23:58:26 +02:00
ac925bb786
Renamed new types for consistency with code style
2023-10-22 16:55:19 +03:00
b394158dc9
Bonus Source ID now uses metaidentifier
2023-10-22 16:55:18 +03:00
0a10fc30b8
(lib) Bonus subtype is now stored as metaidentifier that can store any
...
other identifier inside it
2023-10-22 16:54:43 +03:00
037efdf5fc
Improvements to type safety of Identifier class
...
- Constructor of Identifier from integer is now explicit
- Lobby hero/town selection now uses Identifiers instead of int's
- Removed serialization workaround for hero portraits
- Added dummy objects for custom heroes portraits for ID resolver to use
- HeroInstance now stores portrait ID only in case of custom portrait
- Fixed loading of campaign heroes portraits on RoE maps
2023-10-04 18:05:23 +03:00