Arseniy Shestakov
f6df107a55
Replace more magic subIDs with readable enums
2016-09-18 00:53:37 +03:00
ArseniyShestakov
6ff0c5d58d
Merge pull request #216 from dydzio0614/patch-1
...
Correcting random amount of gold in gold piles
2016-09-18 00:36:01 +03:00
Dydzio
beae354536
Correcting random amount of gold in gold piles
...
In original H3 allowed amounts of gold in treasure piles are multipliers of 100. Before this fix gold amount can be any value from range 500-1000.
2016-09-17 23:22:13 +02:00
AlexVinS
53fbf88316
Spell cast logging refactored.
2016-09-17 23:04:23 +03:00
AlexVinS
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
ArseniyShestakov
512908b989
Merge pull request #215 from dydzio0614/patch-1
...
Fix for compile error in VS 2015
2016-09-17 14:21:36 +03:00
Arseniy Shestakov
7ae4e70134
CGameHandler: fix player id logging
2016-09-17 00:05:10 +03:00
Piotr Wójcik
28d859419c
Revert the old code
2016-09-16 22:01:21 +02:00
Dydzio
ac4920255a
Fix for compile error in VS 2015
...
Disabling Boost variadic templates to make VCMI compilable under Visual Studio 2015. Apparently this is MSVS compiler bug.
2016-09-16 21:44:22 +02:00
Piotr Wójcik
29d6fb0f04
Properly check if corpse was visited
...
Fixes two issues:
- corpse without loot couldn't be marked as visited
- taking loot from once visitable objects marked them as visited for all players
2016-09-16 20:59:07 +02:00
Arseniy Shestakov
1cbe9e1b8b
Client: add donotstartserver option. Alternative way to start a game
...
Option is useful for server profiling also let me test MP over network and much more.
Also there is issues with boost::interprocess on some systems under Windows and this is the way to bypass them.
2016-09-16 20:01:44 +03:00
Arseniy Shestakov
ea65fb15c2
CVCMIServer: do not crash if port not specified
2016-09-16 20:01:07 +03:00
Arseniy Shestakov
84137dcaa5
Add DLL_LINKAGE to getStr and fix player id logging in VCAI
2016-09-16 05:45:00 +03:00
Arseniy Shestakov
30042cac3d
VCAI::performTypicalActions: always check that hero is still available
...
It's weird why this only appear now so if you have ideas check issue 2479.
2016-09-16 04:52:17 +03:00
Arseniy Shestakov
c8090c78ec
CGameState::updateRumor: fix infinite loop with only one map rumor
2016-09-15 23:22:25 +03:00
Arseniy Shestakov
fdca75b4b0
PlayerColor: add getStr and getStrCap functions with optional L10n
2016-09-15 18:22:54 +03:00
Arseniy Shestakov
ca0fe8fdc4
VCAI: do not attempt artefact and army exchange with ally hero
...
While visits of ally heroes supposedly occur accidentally It's still nice to handle it's gracefully.
No reason to prevent visits completely as they useful if hero have skill like Scholar.
2016-09-14 13:34:22 +03:00
Arseniy Shestakov
7ec9601acd
VCAI: safety checks to avoid crashes with boat objects
...
Probably we should rewrite boat-related code to make AI boat handling easier.
2016-09-14 03:44:35 +03:00
Arseniy Shestakov
f623865991
CCastleBuildings: add dialog for shipyard when there is boat already
2016-09-14 03:32:03 +03:00
ArseniyShestakov
b5fa97b697
Merge pull request #211 from Chocimier/iss2321
...
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +03:00
ArseniyShestakov
fedc4b7295
Merge pull request #213 from Chocimier/shrine
...
Check if hero knows spell even without wisdom
2016-09-14 00:09:11 +03:00
Arseniy Shestakov
6dcb9a6068
VCAI: don't remove flagged objects from visitableObjs
...
This make my new shipyard-related changes work properly and might improve owned dwelling usage.
In case there still some code that might cause useless visits it's better just rewrite it insted of removing objects from visitableObjs.
2016-09-13 23:39:32 +03:00
Piotr Wójcik
c5e4eaf9c1
Check if hero knows spell even without wisdom
2016-09-13 22:28:21 +02:00
Arseniy Shestakov
1e60ba6516
Only delete CQuest in CMap destructor and not with IQuestObject
...
Quest information must remain accessible even if map object removed. Fix issue 2472
2016-09-13 01:30:47 +03:00
Piotr Wójcik
e1a1bc89c0
Extract PossibilityVisitor
2016-09-12 22:28:11 +02:00
AlexVinS
505e53c17d
Merge remote-tracking branch 'remotes/origin/develop' into SpellsRefactoring8
...
# Conflicts:
# client/battle/CBattleInterface.cpp
# lib/spells/BattleSpellMechanics.cpp
2016-09-12 10:13:40 +03:00
ArseniyShestakov
2543e068ac
Merge pull request #209 from vcmi/fix/saveDesyncs
...
Think I tested it enough to merge it
2016-09-11 21:36:42 +03:00
AlexVinS
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +03:00
AlexVinS
49e2bde3c0
Mostly complete fix for http://bugs.vcmi.eu/view.php?id=2429
2016-09-11 16:02:45 +03:00
Arseniy Shestakov
9ab7650746
SetHeroesInTown: properly update all client interfaces in multiplayer
...
All interfaces that hero or town visible for must be updated when hero position in town changes. Fix issue 2089
2016-09-11 13:56:00 +03:00
AlexVinS
3fa62beb6d
Do not allow to cast Cure if there is nothing to cure.
2016-09-11 13:48:14 +03:00
Arseniy Shestakov
fe6c0cf89b
Use RandomGeneratorUtil::randomShuffle for reproducible gameplay
2016-09-11 00:10:52 +03:00
Arseniy Shestakov
c8faca8f39
Refactoring: only use RNGs explicitly to avoid bug prone code in future
...
Now server-side code should always use CRandomGenerator::getDefault which is serialized in GH.
CGameState::getRandomGenerator should be only used from GS code and CPackForClient-based applyGs.
2016-09-11 00:10:46 +03:00
AlexVinS
5e0a9d7966
hackfix for commander spells
2016-09-10 22:41:50 +03:00
AlexVinS
4a9978c642
Disabled massive spells fore creatures as they are not fully supported yet.
...
* (WoG) commanders now cast spells properly.
2016-09-10 21:07:36 +03:00
Piotr Wójcik
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
AlexVinS
8eca149eb3
Fixed creature`s aimed spell targeting.
2016-09-10 20:21:51 +03:00
AlexVinS
f36b40e311
fixed typo
2016-09-10 19:38:14 +03:00
AlexVinS
b7509f588f
Support all spell target types (except NO_TARGET) for creature casting.
2016-09-10 19:26:55 +03:00
AlexVinS
be002f6576
Cleanup
2016-09-10 18:56:38 +03:00
AlexVinS
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
AlexVinS
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
Arseniy Shestakov
70abae9b51
CGameState::battleGetBattlefieldType: use RNG by ref
...
For now I not sure about proper place for battleGetBattlefieldType so I left it in GS
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
ea63497b19
Move CGameState::setupBattle code to CGameHandler::setupBattle
...
No reason to keep this code in GS.
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
53502e84e3
Add PrepareHeroLevelUp netpack to keep secondary skills RNG in sync
2016-09-09 23:16:43 +03:00
Arseniy Shestakov
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
c8bcb14d34
CCallbackBase: add CRandomGenerator to all callbacks
...
This is easiest way to make server RNG available to CBattleInfoCallback.
Now server, client and gamestate have own RNG instance.
Only server and gamestate RNGs are serialized.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
85f49bc968
CGHeroInstance::initArmy: don't use GS RNG. Get RNG through a ref
...
This function used by both server-side and gamestate so it's must use appropriate random source.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
2ba3b20928
Multiple changes to RNG usage to both client and server
...
Server should never use RNG from CGameState directly.
Instead server get's own RNG that's state is secret for client.
2016-09-09 23:16:42 +03:00
Arseniy Shestakov
960d93ff5f
CGameState: don't use RNG directly for easier desync debugging
...
Only access random generator via CGameState::getRandomGenerator
2016-09-09 23:16:42 +03:00