1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-04 09:42:40 +02:00
Commit Graph

451 Commits

Author SHA1 Message Date
Ewilhan
42114fa4fc Fixed wrongCursorOnFriendlyDwelling
Added else condition that covers cases "ObjectAtTile that is not enemy nor is Town nor is current Hero". This should cover all cases of friendly dwellings/mines not having the correct cursor.
2019-05-03 06:20:32 +01:00
Mikko
02c109f9cf
Update CAdvmapInterface.cpp 2019-01-24 15:34:58 +00:00
Mikko
f8ab2db0ea
Update CAdvmapInterface.cpp 2019-01-24 15:30:09 +00:00
Mikko
5b8ff278b9
Fix implicit cast from tribool to bool. 2019-01-24 14:45:40 +00:00
Alexander Shishkin
b00e935e4d
Warnings fixes (#538)
Warnings fixes
* Suppress `missing-braces` for Clang
* Fixed many C4275 warnings
* Fixed almost all Clang/GCC warnings
* Silence most frequent MSVC warning.
* Fixed some pessimizing-move warnings
* Fixed some unused capture warnings
2019-01-19 13:52:02 +03:00
AlexVinS
614cde4a55 Fixed two memory leaks 2018-11-14 20:58:37 +03:00
Dydzio
22ce535a2a Fix not responding statusbar 2018-10-29 14:12:07 +01:00
KasyanDiGris
fa5a14e2d8 Stabilize vcmi (#488)
* Shared statusbar
* Fixed server fails on client disconnected
2018-08-26 19:09:56 +03:00
yupinov
b56f862094 Yog is not able to buy a spellbook in his campaign anymore, as intended (#472)
* Yog is not able to buy a spellbook in his campaign anymore, as intended
2018-08-11 18:25:09 +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
Arseniy Shestakov
ac66fc7f42 Full rework of pre-game interface and networking
New features for players:
* Loading for multiplayer. Any save could be used for multiplayer.
* Restart for multiplayer. All clients will restart together.
* Loading from single save.
* Hotseat mixed with network game. Multiple players per client.
* Now connection to server could be cancelled.
* Return to menu on disconnections instead of crashes.
* Restoring of last selected map, save or campaign on next run.

TLDR on important changes in engine code:
* UI: work with server separated from UI
* UI: all explitic blitting replaced with IntObject's
* UI: all new code use smart pointers instead of DISPOSE
* Gameplay always start through lobby controlled by server.
* Threads receiving netpacks now shared for lobby and gameplay.
* Campaigns: heroes for crossover now serialized as JsonNode.
2018-04-04 14:24:26 +07:00
AlexVinS
43acfa160b [tweaks] IImage * -> auto 2018-03-30 14:02:04 +03:00
Raphnalor
0f00dbf8cf Fix highlighting of a selected bonus for campaign. (#432) 2018-03-17 12:23:22 +08:00
Arseniy Shestakov
434deffb54 CAdvMapInt: improve hero reminder by checking hero path
Dialog won't show up if movement points insufficient for first step on current path.
2018-02-24 21:49:42 +08:00
Arseniy Shestakov
8bbe747e8e Cleanup undef for min / max. NOMINMAX is already in Global.h 2018-02-11 05:42:49 +03:00
AlexVinS
0a2b04709f Fixed https://bugs.vcmi.eu/view.php?id=2873 2018-02-09 22:12:21 +03: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
FeniksFire
b85bb6ec0a Fix positioning
Fix problem for costBacground in QuickRecruitmentWindow.
Position "y" there was scaled which lead to errors with different
resolutions.
2018-01-15 18:00:41 +01:00
Alexander Shishkin
e90fcea3d3
Merge pull request #396 from FeniksFire/update
Update graphics for QuickRecruitmentWindow
2018-01-14 10:42:23 +03:00
FeniksFire
1331c81a8b Update graphics for QuickRecruitmentWindow
Adding graphics maded by edeksumo
2018-01-13 09:49:29 +01:00
Arseniy Shestakov
f15cadc87b Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played
* At moment only the first ambient sound will be used
2018-01-02 09:49:03 +01:00
DJWarmonger
f523ae5545 Fixed Magic resistance display. 2017-12-30 12:25:29 +01:00
FeniksFire
bf4024c3ac Adding bacground for QuickRecruitmentWindow
Adding bacground for CreaturePurchaseCard in QuickRecruitmentWindow
2017-12-23 13:15:05 +01:00
AlexVinS
368ba0e2bf fixes 2017-12-21 21:27:39 +03:00
FeniksFire
f82fd41a14 Quick Recruitment Window upgrade
Now is possible to switch by button between creatures upgrades.
Fixed small typo, rename from purhase to purchase.
2017-12-21 18:23:28 +01:00
AlexVinS
39194a0629 Merge branch 'SplittingShortcuts' into develop 2017-11-15 22:31:55 +03:00
FeniksFire
3c3aaa7bb5 Improvement quick recruitment window
-Position is now relative to castle interface
-The highest level of creature is now presented.
-Improve positioning of creature card, now it's look like in hd mod.
2017-11-15 19:44:54 +01:00
FeniksFire
f2b7c85811 Adding object construction macro with parameter
- Adding macro "OBJECT_CONSTRUCTION_CAPTURING" that take as parameter
action flag.
- Fixed minor errors
2017-11-14 08:52:33 +01:00
FeniksFire
a4f701014b Quick Army Purhase in Town Screen
Mouse click on castle icon (it is now clickable) - quick recruit of all
available creatures.
2017-11-12 17:37:08 +01:00
Alexander Shishkin
fd4ecbd40b
Merge pull request #385 from Chocimier/altar
Fixed "Altar of Sacrifice only sacrifices creatures one kind at a time"
* https://bugs.vcmi.eu/view.php?id=2607
2017-10-28 14:04:34 +03:00
Piotr Wójcik
7171fa7ad4 Formatting 2017-10-28 11:04:55 +02:00
AlexVinS
c39cd5f951 Town building build mode fixes
* CGameHandler::buildStructure was using wrong requirements for buildings in auto mode.
* Build mode loading was wrong in case of omitted value
* Show town hall slot for not built building only if it have normal build mode
2017-10-28 03:27:39 +03:00
Piotr Wójcik
78e5d39ea0 Change variables type 2017-10-18 21:02:23 +02:00
Piotr Wójcik
f9ed952869 Properly calculate experience on altar 2017-10-14 22:10:59 +02:00
Piotr Wójcik
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
AlexVinS
9423555015 Declare ownership of CCursorHandler::dndObject
# Conflicts:
#	AI/FuzzyLite
#	client/gui/CGuiHandler.cpp
2017-09-05 15:25:31 +03:00
AlexVinS
a8d25ea7b2 CHeroWindow tweaks
# Conflicts:
#	AI/FuzzyLite
#	client/windows/CHeroWindow.cpp
2017-09-05 15:22:48 +03:00
Henning Koehler
abdca71828 skill names and descriptions are fully managed by CSkillHandler 2017-08-30 22:35:23 +12:00
Henning Koehler
0357a4fe3b enabled config of skill descriptions 2017-08-26 10:08:06 +12:00
AlexVinS
64d9dadd64 Logging cleanup. 2017-08-11 15:47:50 +03:00
AlexVinS
61e241308d Logging cleanup 2017-08-10 19:52:05 +03:00
ArseniyShestakov
cb40c093f8 Avoid boost::optional assignment for Boost 1.64 compatibility (#360)
Two options here: to use emplace from 1.56 or boost::make_optional.
Unfortunately Ubuntu 14.04 is using 1.54 and I'd rather not to break it.
2017-08-05 16:09:29 +03:00
Piotr Wójcik
886c8f63c6 Show stacks selected to sacrifice 2017-08-01 17:17:46 +02:00
Piotr Wójcik
137b9cde19 Fix crash in Altar of Sacrifice, fixes #2648 2017-07-29 19:27:39 +02:00
Arseniy Shestakov
6d9f99d4de Code style: and one more pass on lambda expressions parameter list 2017-07-19 02:11:17 +03:00
Arseniy Shestakov
b540ab73ed Code style: add empty parameters list to more lambda expressions 2017-07-19 01:39:38 +03:00
Arseniy Shestakov
2da3d8a563 Code style: remove senseless comments 2017-07-18 00:04:00 +03:00
ArseniyShestakov
b2f74a93cf Code style: add empty parameter list to all lambda expressions (#345) 2017-07-17 15:35:57 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
ArseniyShestakov
a4c0ad94b1 Code style: remove default value hints in definitions (#342)
Some are outdated and this is something IDE are useful for.
2017-07-15 14:08:20 +03:00
ArseniyShestakov
ea0ceb1805 Merge pull request #323 from vcmi/CStackTweaks
CStack tweaks
2017-07-15 00:42:08 +03:00
AlexVinS
2fb531b6d0 Display actual moral and luck for batlle stack 2017-07-14 21:42:36 +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
Dydzio
252f68cb1a Fix black market behavior to match H3 2017-07-12 01:21:00 +02: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
dbaf3cb023 Cleanup & formatting 2017-07-04 01:32:40 +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
Fay
65e88639a3 Minor: code format; 2017-06-08 21:07:09 +02:00
Fay
01bae590f1 Added swipe support for non-android platforms; 2017-06-07 22:42:41 +02:00
AlexVinS
a31c28ec33 Unified war machine mechanics.
* it is possible to define new war machines
* added warMachine field to artifact configuration
2017-06-06 19:18:26 +03:00
Arseniy Shestakov
18161d3688 Client: implement spectator mode via command-line options
If running with --spectate/-s CPlayerInterface will appear even without human players.
Following command-line options also available:
 --spectate-ignore-hero
 --spectate-hero-speed=N
 --spectate-battle-speed=N
 --spectate-skip-battle
 --spectate-skip-battle-result
Boolean options can also be changed in runtime via client console:
 set spectate-ignore-hero on / off
Spectator mode also:
 - Work with --onlyAI option when starting game or loading saves.
 - Allow to use any cheat codes.
 - Give recon on towns and heroes.
2017-06-06 07:30:16 +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
fa6a7bd1b5 Fixed CID 1375682 2017-05-28 15:06:12 +03:00
AlexVinS
1c95c51ffb Fixed CID 1375685 2017-05-28 14:40:36 +03:00
Dydzio
5127061e28 Commander skill description support (#266)
* Added commander skill description support

* Add support for ZNPC00.txt not found
2017-05-26 22:58:33 +03:00
Fay
b5daa24982 Android support (#299)
* AI libs registering shenanigans on android;
* Fixed resolution aspect + mouse event scaling;
* Proper server init/deinit (through android IPC);
Enabled threaded init in CMT;
* Prevented a deadlock in logger on some devices;
* Fixed frozen intro frame after interrupting the video;
Added android progressbar displaying during initial data loading;
* Hacky fix for choppy animations during heroes movement (should look better now, but it's definitely not a good solution);
* Changes/fixes for new android launcher building process;
* Fixed app hang after getting SDL_QUIT when activity was destroyed;
* Functioanal, configurable advmap swiping support;
* VCMI changes cleanup;
Added few missing VCMI_ANDROID guards on swipe mechanics;
* Removed unneeded sleep in server startup code for android;
* Removed android ioapi hack (fixed in newest ndk);
* Removed unused android's library loading logic;
* Added android's swipe option to settings schema;
* Moved NO_STD_TOSTRING to be defined in global.h instead of build files;
2017-05-25 20:57:20 +03:00
AlexVinS
f370cdf1c7 Possible fix for https://bugs.vcmi.eu/view.php?id=2678 2017-05-25 20:09:38 +03:00
FeniksFire
19a9f05b80 Fix garrison highlight in city (#292) 2017-03-23 22:48:35 +03:00
FeniksFire
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
dydzio
8a2b47d967 Fix for bug #2435 2017-02-10 12:19:35 +01:00
dydzio
81a00f59d1 Basic fix for bug #2635 2017-02-02 19:17:15 +01:00
Dydzio
79c101a56d Remove leftover commander artifact code 2016-12-31 21:29:47 +01:00
AlexVinS
2dd6a47764 try to plug a few coverity false positives 2016-11-28 02:50:41 +03:00
AlexVinS
312793efd9 try to plug a few coverity false positives 2016-11-27 23:41:17 +03:00
AlexVinS
6196ae7fca Fixed a few CWE-457 2016-11-27 19:00:16 +03:00
AlexVinS
27b853618c Fixed a few CWE-457 2016-11-27 18:17:20 +03:00
AlexVinS
86e33a4c45 [Refactoring] Unified SetResources NetPack API. 2016-11-26 15:14:43 +03:00
AlexVinS
86c7bab9c1 Fixed CID 1366324 2016-11-25 22:28:16 +03:00
AlexVinS
80666fb134 Tweaks 2016-11-25 22:12:22 +03:00
AlexVinS
f0963c91bb Fixed CID 1197409 2016-11-25 21:59:27 +03:00
AlexVinS
8b6543bef2 Fixed CID 1366365, CID 1288839 2016-11-25 19:58:52 +03:00
AlexVinS
6a616a5d33 Fixed CID 1366371 2016-11-25 19:36:40 +03:00
AlexVinS
663099882c Fixed CID 1366366, CID 1366367, CID 1366368, CID 1366369, CID 1366370, CID 1366372 2016-11-25 19:28:00 +03:00
AlexVinS
5dd5a0d4a8 Fixed CID 1197445, CID 1197446 2016-11-25 17:54:01 +03:00
AlexVinS
b908c70468 Fixed CID 1197487 2016-11-25 17:29:49 +03:00
AlexVinS
04d22644e5 fixed http://bugs.vcmi.eu/view.php?id=2617 2016-11-23 14:47:57 +03:00
AlexVinS
33c0bc49f6 Merge branch 'CommanderArtifacts3' into develop 2016-11-13 15:31:16 +03:00
AlexVinS
a8a661b159 Map handler refactoring, part 2. 2016-11-08 00:19:53 +03:00
AlexVinS
aad675a7c4 Revert "Merge branch 'p254_4' into develop"
This reverts commit 37f68713a7, reversing
changes made to 4477b7c35d.
2016-11-08 00:17:20 +03:00
AlexVinS
c9a3d92ff3 cleanup 2016-11-06 17:36:46 +03:00
dydzio
96fa0fb6d4 Implement giving commander artifacts back to hero 2016-11-06 13:02:00 +01:00
dydzio
baeb3c9e55 Refactor CArtPlace + use it for commanders 2016-11-04 17:54:09 +01:00
dydzio
47a72d4441 Make artifacts worn by commander visible 2016-11-03 14:25:17 +01:00
Vadim Markovtsev
8d40a4aa95 Fix GUI disposal in creature info window 2016-10-30 22:21:26 +01:00
Vadim Markovtsev
34005228e0 Fix bugs with giving commander's badge to stacks
1. SEGFAULT
2. Memory leaks
3. Invalid drawing
4. Fix returning artifacts
2016-10-30 16:32:28 +01:00
AlexVinS
3dddbcf2e8 try to use CAnimation for Hero path 2016-10-27 16:34:15 +03:00
AlexVinS
536f36ede8 use CAnimation fro world view icons 2016-10-27 16:34:12 +03:00
AlexVinS
365c64a345 use CAnimImage for world view legend 2016-10-27 16:34:10 +03:00
AlexVinS
36ac9ac86c CAdvMapInt tweak 2016-10-27 16:34:07 +03:00
Vadim Markovtsev
d51c9a1ff0 Fix uninitialized scrolling state 2016-10-22 10:18:57 +02:00
AlexVinS
28dd12089b CSpellWindow fixes. 2016-10-18 02:15:43 +03:00
ArseniyShestakov
eec14028fe Merge pull request #242 from dydzio0614/MapScrollCursor
Implement adventure map scroll cursor change
2016-10-17 16:09:01 +03:00
dydzio
22564dde4b Implement adventure map scroll cursor change 2016-10-17 14:55:55 +02: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
5506ae036a Reworked CHillFortWindow
* fixed displaying free upgrades
* do not try to print 3rd or more resource in slot cost (in theory possible with mods)
** we need dynamic gui for that
* CDefEssential--
2016-10-16 08:03:52 +03:00
AlexVinS
055c84bc7a cleanup 2016-10-16 04:23:38 +03:00
AlexVinS
abb875b400 cleanup 2016-10-16 03:52:11 +03:00
AlexVinS
41a5cc1b69 get rid of CCastleInterface::bicons 2016-10-16 03:00:57 +03:00
Vadim Markovtsev
34cf92cb9b Change logging style 2016-10-03 20:32:01 +02:00
Vadim Markovtsev
d5327f3daf Fix loading "" bitmap at game start 2016-10-02 22:45:00 +02: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
AlexVinS
96c17505ae get rid of IBonusBearer::getSpellBonuses & Selector::anyRange 2016-10-01 09:07:18 +03:00
dydzio
33ea28c5dd Improve creature upgrade handling. Fix issue #2172 2016-09-30 21:21:41 +02: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
Vadim Markovtsev
31e5f7b800 Fix morale widget update after dismissing a creature in garrison 2016-09-19 18:59:34 +02:00
Arseniy Shestakov
f623865991 CCastleBuildings: add dialog for shipyard when there is boat already 2016-09-14 03:32:03 +03:00
Arseniy Shestakov
02f70464fb Fix mismatched-tags Clang warnings
They're not important at all, but sicne there only few of them left just fix them.
2016-09-08 19:42:59 +03:00
Piotr Wójcik
044e2b9e51 Properly calculate building requirements
In OH3 you can't build Capitol when Tavern is not builded.
In VCMI up to now you could.
2016-08-30 22:15:24 +02:00
Arseniy Shestakov
0236309d25 CArtifactsOfHero: use shared_ptr for SCommonPart 2016-08-30 07:05:31 +03:00
AlexVinS
b8f4fdc2f2 fixed memory leak in CTradeWindow::initItems 2016-08-30 05:55:51 +03:00
AlexVinS
e4091c05ec fixed unitialized value field 2016-08-17 09:49:43 +03:00
Arseniy Shestakov
10dbbead2d Fix indentation of logging code and around it
That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
2016-03-12 04:46:21 +03:00
Arseniy Shestakov
faae305ec0 CTradeWindow: avoid crash when right click on artifact
Fix suggested by @argarak in PR #199
2016-03-12 03:19:38 +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
Vadim Markovtsev
32ece9513d Fix 2331 save menu keyboard event leak
The control flows the following way:
- we receive SDL_KEYDOWN with letter 's' in the adventure map interface
- save dialog opens
- text input receives focus
- text input enables receiving SDL_KeyboardEvent-s which go between DOWN and UP
- the button on keyboard becomes UP (the menu opens very fast)
- text input receives SDL_KeyboardEvent and inserts 's'
- text input receives SDL_KEYUP

So the apparent fix is to open the save dialog on SDL_KEYUP event
2016-01-28 10:26:40 +03:00
Vadim Markovtsev
9f3313524e Fix 2160 dismissing a VIP hero 2016-01-27 17:10:19 +03:00
Vadim Markovtsev
afa95312ba Fix 2139 captured spell scroll descriptions 2016-01-25 08:49:26 +03:00
Arseniy Shestakov
cacc811ed8 CAdvMapInt: keep old path if non-accessible tile clicked. Fix issue 2380 2016-01-17 07:48:21 +03:00
Arseniy Shestakov
530fe04c75 CAdvMapInt::updateMoveHero: proper indeterminate check. Fix issue 2074 2016-01-15 19:30:43 +03:00
Arseniy Shestakov
a39e61373c Deactivate CAdvMapInt while quick combat is going. Fix issue 2354
If quick combat calculation take a while it's possible to give hero movement command before battle is finished. This will lead to client freeze or crash. To avoid this we must lock adventure interface until battle calculation is finished.
2016-01-10 18:00:24 +03:00
Arseniy Shestakov
46e3d849af Avoid crashes caused by mouse events. Fix issue 1955
Mouse handling code need refactoring, but for now we at least shouldn't crash.
2016-01-09 15:32:42 +03:00
Arseniy Shestakov
9fd1cff090 Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.

This change wouldn't break anything because there was already code with prefix for each of three cases.
2015-12-29 05:43:33 +03:00
Arseniy Shestakov
29a7934a99 Refactoring: avoid using namespace when it's not absolutely needed 2015-12-29 02:14:08 +03:00
Arseniy Shestakov
6f5c52a229 Refactoring: use cleaner CCreatureSet::stacksCount everywhere 2015-12-24 21:30:57 +03:00
Ivan Savenko
a051a08a46 Merge remote-tracking branch 'origin/issue/2306' into develop 2015-12-18 22:21:11 +02:00
ArseniyShestakov
ab92123da3 CPathfinder: improve support for visits and battles in teleports
Related movement code for client and AI is plumbed as well. Though at moment code still not finished because it's not teleport hero to the exit tile if he won battle.
2015-12-11 09:42:30 +03:00
ArseniyShestakov
07807fb044 Client: slience visibility error on shipyard in non-coastal town 2015-12-08 07:33:13 +03:00
ArseniyShestakov
03e9dd3bab Add hero gold cost to GameConstants 2015-12-07 00:13:58 +03:00
ArseniyShestakov
807fd6391b CAdvMapInt: block spellbook button when no hero selected 2015-12-06 03:12:39 +03:00
AlexVinS
0fab319c73 Merge remote-tracking branch 'remotes/origin/develop' into issue/2306
s reverts commit fa8a282696.

Conflicts:
	AI/VCAI/VCAI.cpp

Conflicts:
	AI/VCAI/VCAI.cpp
	client/windows/CAdvmapInterface.cpp
	lib/CPathfinder.cpp
	lib/CPathfinder.h
2015-12-05 12:56:12 +03:00
ArseniyShestakov
c83f15e413 Merge branch 'develop' into feature/tavernRumors
Conflicts:
	lib/CGameState.h
2015-12-05 01:01:26 +03:00
ArseniyShestakov
2a63ba148a Thieves Guild: fix tavern map object, lvl 0 when no taverns owned
We also now check not number of towns, but only towns that has tavern built. Also according to original mechanics all taverns always display information based on your number of taverns and not number of taverns of object owner.
2015-12-04 18:38:57 +03:00
Ivan Savenko
c3ce4b25df Removed all #include's of CMap.h from headers.
To all - please, avoid #include's in headers as much as possible
This kills incremental build compile times
2015-12-02 21:05:10 +02:00
ArseniyShestakov
6704ea0cff Rumors: rename getTavernGossip to getTavernRumor for consistency
Original game used "Rumors" and not "Gossips" and we already using rumor in CMap.
2015-11-30 17:51:28 +03:00
ArseniyShestakov
def0f0ef0a CTerrainRect::mouseMoved: don't pass curHoveredTile by reference
This does cause problems because curHoveredTile can change while reference still being used by CAdvMapInt::tileHovered.
2015-11-18 03:14:58 +03:00
ArseniyShestakov
ab9680a7d9 CPathfinder: handle event object properly everywhere
Also add forgoted check for AdvmapInterface to avoid possible crash.
2015-11-17 07:09:01 +03:00
ArseniyShestakov
5106738160 Merge branch 'develop' into feature/pathfinderLayers 2015-11-09 19:20:13 +03:00
ArseniyShestakov
a49950e958 Fix 2292. Fix chat on adventure map, increase maxOutputPerLine 2015-11-08 22:16:58 +03:00
ArseniyShestakov
4973a1ec90 CGPathNode: get rid of land member as it's now obsolete
CTerrainRect::showPath behaviour changed so it's will only add cross path graphics on embark/disembark and path ending.
We want continuous paths for flying and water walking even when land<-> water transition occur.
2015-11-08 04:01:58 +03:00
ArseniyShestakov
842da69a3e CAdvMapInt::tileHovered cleanup function a bit more 2015-11-08 03:33:01 +03:00
ArseniyShestakov
160fa38254 Client: change cursor using node action information of pathfinder 2015-11-08 03:10:48 +03:00
ArseniyShestakov
2b6e1498d2 Pathfinding: change argument order for getPath and AUTO layer as default
This still need investigation, but likely most of external code shouldn't be aware of layers in order to work properly because only LAND and SAIL can be targeted and single tile can't have both of these layers.
2015-11-02 11:14:32 +03:00
Vadim Markovtsev
e6e975e9ef Fix adventure map movement segfault in some scenarios 2015-10-31 20:23:13 +03:00
ArseniyShestakov
c3c31e90ff Castle gate: only allow teleport to own Inferno towns
This is how that works in H3. And on server side it's checked already anyway.
Though it's must be possible to teleport from ally Inferno to your own if both have Castle Gate.
2015-10-15 05:28:28 +03:00
Vadim Markovtsev
e4b1ef1405 Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
AlexVinS
1510f1f14c CQuestLog: boost::bind->std::bind 2015-09-02 20:00:56 +03:00
Sandy Carter
219ce45866 CastleInterface: Fix tooltip saying Empty after swapping armies 2015-08-25 09:22:25 -04:00
AlexVinS
68e3948242 Fix mantiss 1965 2015-08-25 12:16:47 +03:00
Sandy Carter
ae6d3c9138 CCastleInterface: Enable right click on Hero Info 2015-08-24 13:31:03 -04:00
Sandy Carter
bf353a4f5b windows: Replace CToggleGroup volume widget with CVolumeSlider 2015-08-22 12:40:14 -04:00
Sandy Carter
bdee647525 CastleInterface: Exclude previous building upgrade in reqs
Hide CityHall from Capitol prerequisites in Capitol build window
2015-08-19 12:05:43 -04:00
AlexVinS
a8c45df732 Merge branch 'SDL1Wipe' into develop 2015-06-22 14:24:00 +03:00
AlexVinS
f81116e04d Fix mantiss #2208 2015-06-21 20:30:19 +03:00
AlexVinS
ed281a3cc6 SDL1 wipe, part 4. Codebase cleanup finished. Untested. 2015-06-21 01:59:32 +03:00
AlexVinS
b6a2323e01 SDL1 wipe, part 2. Untested. 2015-06-21 01:59:31 +03:00
AlexVinS
dca1e28bc1 SDL1 wipe, part 1. Untested. 2015-06-21 01:59:30 +03:00
AlexVinS
2cb6cb7baa Remove useless durationType selector
* duration is a mask, equality comparison is not enough
2015-06-02 07:12:02 +03:00
AlexVinS
3c9e4916b6 Fix printing stack stats in battle 2015-04-11 14:05:00 +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
ArseniyShestakov
4f3eb919e5 CHeroWindow: block dismiss button if there no other heroes and no towns
This one resolve mantis issue 530.
2015-03-12 23:47:46 +03:00
AlexVinS
f4c683cd5e Move VievXXX logic to server side (except expert ViewEarth) 2015-02-26 17:15:17 +03:00
AlexVinS
b846b717a1 implemented VISIONS spell (partially)
(-) todo: agressivnes
2015-02-26 08:39:56 +03:00
AlexVinS
36cdb2968b Refactoring 2015-02-26 08:39:54 +03:00
AlexVinS
f6e83685e7 Initial implementation of VIEW_AIR & VIEW_EARTH 2015-02-26 08:39:52 +03:00