1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
Commit Graph

53 Commits

Author SHA1 Message Date
KasyanDiGris
fa5a14e2d8 Stabilize vcmi (#488)
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
Alexander Shishkin
75f8c8b29a Gui cleanup4 (#446)
* use smart pointers for almost all widget fields
* use SDL2 texture for cursor
* a lot af small tweaks and formatting
* removed CompImage class, it is actually useless as long as regular SDLImage support margins
* CGuiHandler: use smart pointers for [push|pop]Int
2018-07-25 01:36:48 +03:00
Alexander Shishkin
5c09f751b3 Gui cleanup3 - UI refactoring to use smart pointers (#440)
* Changed most gui classes to use shared pointers
* Store and use IImage as shared_ptr
* CSpellWindow redesign
* AdventureMapClasses cleanup
* CLabel: store background as smart pointer
* Store CObjectList items as smart pointers
* Removed destroy function of list item
* Store toggle buttons as smart pointers
* Use CComponent as smart pointer
* Attempt to fix artifact merchant drawing
2018-04-07 18:34:11 +07:00
AlexVinS
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
Arseniy Shestakov
6d9f99d4de Code style: and one more pass on lambda expressions parameter list 2017-07-19 02:11:17 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
Arseniy Shestakov
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
AlexVinS
4f14f22d3a Unified CStack ammo, casts and counterattacks
* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
2017-07-08 20:29:59 +03:00
AlexVinS
6dd89efc9a tweaks 2017-07-03 21:43:05 +03:00
AlexVinS
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
AlexVinS
3d1a84875e Queries refactoring
* Moved SUMMON_BOAT special case to mechanics
* Partially moved Town portal logic to mechanics class
* Added generic query reply to CCallback
* Redesigned Queries so that base API do not depends on CGameHandler
* Got rid of CGameHandler::castSpellRequest
* Removed CGameHandler::castSpell
* Added new Query type for town portal dialog (not used yet)
2017-07-03 21:43:04 +03:00
AlexVinS
195e979a18 get rid of CBattleInfoCallback::battleCanCastThisSpell 2017-06-05 23:46:55 +03:00
AlexVinS
2cfb2e6ae0 get rid of CPlayerBattleCallback::battleCanCastThisSpell 2017-06-05 22:53:42 +03:00
AlexVinS
4d430f6ad8 get rid of CPlayerBattleCallback::battleCanCastSpell 2017-06-05 22:16:12 +03:00
AlexVinS
66cfc2fef9 CSpell::canBeCast tweaks 2017-06-05 21:30:25 +03:00
AlexVinS
f370cdf1c7 Possible fix for https://bugs.vcmi.eu/view.php?id=2678 2017-05-25 20:09:38 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
AlexVinS
312793efd9 try to plug a few coverity false positives 2016-11-27 23:41:17 +03:00
AlexVinS
28dd12089b CSpellWindow fixes. 2016-10-18 02:15:43 +03:00
AlexVinS
5346ecb6df tweak 2016-10-17 05:42:29 +03:00
AlexVinS
3bd8cde8e0 fix 2016-10-17 05:21:43 +03:00
AlexVinS
345dd913f6 use CLabel in SpellArea 2016-10-17 05:05:48 +03:00
AlexVinS
e3ee51a28f Use label object for mana 2016-10-17 04:05:33 +03:00
AlexVinS
bc2f0ba6f1 fixed spell school ordering http://bugs.vcmi.eu/view.php?id=91 2016-10-17 03:33:29 +03:00
AlexVinS
ba5b65ff93 get rid of CDefHandler in CSpellWindow 2016-10-16 15:27:35 +03:00
AlexVinS
2a6bab119b Use CAnimImage for SpellArea 2016-10-16 13:22:07 +03:00
AlexVinS
3a52a3c663 Allow CAnimImage to share animation object. 2016-10-16 12:58:18 +03:00
AlexVinS
a0300b0447 CSpellWindow widgets capturing 2016-10-16 12:01:18 +03:00
AlexVinS
e1f9b2c74a SpellArea tweak 2016-10-16 10:43:49 +03:00
AlexVinS
2eb61533fa use only CSpell in CSpellWindow 2016-10-16 10:32:12 +03:00
AlexVinS
63cbf960df cleaned up spell window creation 2016-10-16 09:27:22 +03:00
AlexVinS
415bd8247a Moved SpellbookInteractiveArea into CSpellWindow class 2016-10-16 09:17:23 +03:00
AlexVinS
c4b72342de CSpellWindow: improved constructor readability 2016-10-16 09:03:13 +03:00
AlexVinS
85863dbed6 Fix build 2016-10-02 17:25:55 +03:00
Piotr Wójcik
ea6545b1d3 Prevent flipping empty spellbook
When hero has no travel spells he can no longer flip spell book opened from right panel button
2016-10-01 21:39:40 +02:00
AlexVinS
7c91d378c8 Display specific message if cast blocked by CURSED_GROUND 2016-10-01 18:35:56 +03:00
AlexVinS
52ae5b4a86 Fixed http://bugs.vcmi.eu/view.php?id=482 2016-10-01 18:18:46 +03:00
Vadim Markovtsev
2c1dddde33 Fix memory problems with BonusList
Bonus * -> std::shared_ptr<Bonus>

This cures the following problems:

1) Memory corruption at exit. Some Bonus-es were deleted twice (mods?).
2) Memory leaks. Some Bonuses were not deleted.
3) Reduce the number of "Orphaned child" messages.

Valgrind reports 0 leaked memory now and no invalid reads/writes.
2016-09-29 15:08:00 +02:00
AlexVinS
921d2f6210 Fixed http://bugs.vcmi.eu/view.php?id=2522 2016-09-29 10:21:22 +03:00
AlexVinS
3873e5047e Attempt to fix 2293 2016-03-01 13:24:46 +03:00
Vadim Markovtsev
bdd87be10d Try to fix http://bugs.vcmi.eu/view.php?id=2362 2016-02-02 11:46:33 +03:00
AlexVinS
ed281a3cc6 SDL1 wipe, part 4. Codebase cleanup finished. Untested. 2015-06-21 01:59:32 +03:00
AlexVinS
a061e3c2f7 Fix use-after-free in spell window 2015-04-11 10:18:40 +03:00
AlexVinS
6c334174d9 Use and check movement points in town portal.
* fixes mantiss 0002031
2015-04-01 04:48:50 +03:00
AlexVinS
d564520f04 Allow town portal to ally town.
fixes mantiss 0002064
2015-04-01 04:04:02 +03:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
c7c235c0ca Rename afterCast to applyBattle
* afterXXX will be used in future event-driven mechanics
2015-02-26 08:39:47 +03:00
AlexVinS
66ca4bc0c2 TOWN_PORTAL callback is too specific to ba part on spellwindow class 2015-02-26 08:39:46 +03:00
AlexVinS
33f22bf2fc More flixible way of spell cast on client side
(+) more support for custom adventure spells
2015-02-26 08:39:45 +03:00
AlexVinS
a3f2667376 Remove some deprecated fields from CSpell
* now only new SpellScholl API is used
(!) untested
2015-02-26 08:39:43 +03:00