1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00
Commit Graph

173 Commits

Author SHA1 Message Date
c217d7717a server queries is now stored as unique_ptr 2023-08-21 17:55:07 +03:00
e8e6c02a4a Moved all battle-related functionality of server into a new class 2023-08-21 17:55:06 +03:00
00ac8eb306 Attempt to fix crash on quitApplication on Android 2023-08-15 00:17:59 +03:00
23aaa72dfe No error on hero move when timer is expired 2023-08-14 05:21:57 +04:00
4b307dc0e4 More locks to avoid data races on server 2023-08-11 18:50:39 +03:00
ed927de12e Added more informative error messages for battle action errors 2023-08-04 21:41:11 +03:00
baa865d857 Extracted message-related functionality of CGameHandler to separate file 2023-07-15 21:01:13 +03:00
463efea7bb Fix hero retreating handling & code cleanup 2023-07-15 19:55:30 +03:00
19ace6a849 Moved hero pool logic to the separate files 2023-07-15 19:55:29 +03:00
85262cf4f5 Moved CGameState files into a separate directory 2023-06-26 17:15:59 +03:00
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
42b2be4bbb Merge pull request #1908 from SoundSSGood/art-client-server-fixes
Artifact related fixes
2023-04-10 18:26:49 +03:00
ea7dd14d8b client is able to erase artifact 2023-04-08 00:41:55 +03:00
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
820c9be61b Use own resources when buying boat in allied shipyard 2023-03-31 23:18:45 +03:00
9f55666931 rework netpacks to avoid double typeinfo 2023-02-13 20:26:39 +02:00
56bf8ec2c4 #1228 - prevent second AI activation on AI defeat due to wrong EndTurn packet 2022-12-14 22:13:26 +02:00
30db38c0fe Unified CGameHandler::bulkMoveArtifacts and CGameHandler::bulkSwapArtifacts to one 2022-11-10 20:11:26 +02:00
ad47a7573c Code style. Typo. Code clean up. 2022-11-10 18:29:39 +02:00
95ab343116 Net Packs BulkMoveArtifacts structure and BulkMoveArtifacts::applyCl 2022-11-06 23:54:50 +02:00
895ec2d302 Make console available during other players' turn 2022-10-05 19:04:51 +04:00
8cae3398ba Feature: Army Management Shortcuts should work as in HD+ Mod 2021-11-28 20:00:43 +02:00
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
c310a05ee0 Allow learning secondary skills in ally towns 2019-03-25 02:21:32 +03:00
83531f4355 Rename typo in NetPacksServer.cpp 2018-11-17 21:58:54 +02:00
9a36572446 Build boat in allied shipyards is allowed now 2018-11-17 21:58:54 +02:00
96215233bc macOS: fix packet deserialization (#479) 2018-08-14 01:03:45 +03:00
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
8cec07afbd Replaced CGHeroInstance and CGObjectInstance with ObjectInstanceID in NetPacks 2018-03-17 13:24:12 +08:00
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
7c77249d37 Refactoring: get rid of macro in server-side request validation code 2018-01-28 08:03:48 +03:00
7171fa7ad4 Formatting 2017-10-28 11:04:55 +02:00
f145b4be91 Correctly sacrifice many stacks or many atrifacts, fixes #2607 2017-10-14 21:30:56 +02:00
f1e5797834 Code style: move or add licensing information on top of every file 2017-07-14 01:26:03 +03:00
a65befaa08 Moved town portal logic to mechanics class 2017-07-03 21:43:04 +03:00
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
4113bdab01 Moving some files from lib to the battle subdirectory. 2017-06-26 15:26:08 +02:00
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
4b0f702e7e Add LeaveGame netpack and avoid replying on it and CloseServer 2017-06-02 02:51:44 +03:00
3de891b4b4 Moving/dividing classes from BattleState to separate files. 2017-03-17 16:48:44 +01:00
60b1a9ac52 Fixed CID 1197370, CID 1197369, CID 1197371, CID 1197372, CID 1197374, CID 1288881, CID 1197376 2016-11-27 23:18:21 +03:00
5b76c3f4eb Rebase of codebase changes for refactored serializer
Some of newer fixes not yet merged there and save compatibility a bit off.
2016-10-27 18:12:20 +03:00
85f94676a5 Server: convert logging 2016-08-30 01:13:07 +03:00
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
fa8a282696 Fix pthread_mutex_lock abort() in requestActionASAP impl 2015-10-31 18:04:06 +03:00
0d83f6fedd Fix issue 1877. Allow to buy heroes in ally towns
Also removed TODO because check already implemented in CGameHandler::hireHero
2015-10-15 04:00:21 +03:00
21aaad6972 MoveHero: add transit movement option
Transit is new option for hero movement. If it passed for movement then hero can get get on tile without visiting of object on it.
Currently it's will be only allowed is object under destination is teleport.
2015-03-08 17:04:09 +03:00
5b8180e327 Cleaning logs. 2014-12-25 12:58:15 +01:00
aa0433228a Fixed cheats - sendMesssage will also pass current object.
Workaround-ish but should work. Branch should be fixed now.
2014-09-21 20:35:53 +03:00
78709e223b Breaking things - trying to remove server-side knowledge of selected objects 2014-09-19 00:18:49 +03:00