1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
a061ed04de Remove usage of ConstTransitivePtr from CTown 2025-03-08 14:04:51 +00:00
085409bea9 Stables in Castle will now check for and give same bonuses as map stable 2025-02-18 14:35:52 +00:00
2823bf5848 Minor code simplifaction 2025-01-19 12:41:02 +00:00
c55a75cc4e Remove copy-pasted code in rewardable town building leading to hero not
registered as visitor
2024-10-11 15:02:48 +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
f2c20b54d0 Unify rewardable map object and town building code 2024-09-27 15:41:24 +00:00
8b2821456a Show generic dialog if building was already visited 2024-09-16 19:51:10 +00:00
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
0fd9dbf240 Unified income handling, added IOwnableObject interface 2024-08-28 12:40:44 +00:00
22a126cf2d Restored replacement of town building bonuses via building upgrade 2024-08-19 11:47:13 +00:00
2f3f3c21df Rename town building types to more clear names 2024-08-19 11:47:13 +00:00