f6df107a55
Replace more magic subIDs with readable enums
2016-09-18 00:53:37 +03:00
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
53fbf88316
Spell cast logging refactored.
2016-09-17 23:04:23 +03:00
d993710f8e
Merge branch 'develop' into SpellsRefactoring8
2016-09-17 20:29:44 +03:00
28d859419c
Revert the old code
2016-09-16 22:01:21 +02:00
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
84137dcaa5
Add DLL_LINKAGE to getStr and fix player id logging in VCAI
2016-09-16 05:45:00 +03:00
c8090c78ec
CGameState::updateRumor: fix infinite loop with only one map rumor
2016-09-15 23:22:25 +03:00
fdca75b4b0
PlayerColor: add getStr and getStrCap functions with optional L10n
2016-09-15 18:22:54 +03:00
b5fa97b697
Merge pull request #211 from Chocimier/iss2321
...
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +03:00
c5e4eaf9c1
Check if hero knows spell even without wisdom
2016-09-13 22:28:21 +02:00
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
e1a1bc89c0
Extract PossibilityVisitor
2016-09-12 22:28:11 +02:00
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
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
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +03:00
49e2bde3c0
Mostly complete fix for http://bugs.vcmi.eu/view.php?id=2429
2016-09-11 16:02:45 +03:00
3fa62beb6d
Do not allow to cast Cure if there is nothing to cure.
2016-09-11 13:48:14 +03:00
fe6c0cf89b
Use RandomGeneratorUtil::randomShuffle for reproducible gameplay
2016-09-11 00:10:52 +03:00
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
5e0a9d7966
hackfix for commander spells
2016-09-10 22:41:50 +03:00
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
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +03:00
f8767a6380
cleanup
2016-09-10 09:37:18 +03:00
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
ea63497b19
Move CGameState::setupBattle code to CGameHandler::setupBattle
...
No reason to keep this code in GS.
2016-09-09 23:16:43 +03:00
53502e84e3
Add PrepareHeroLevelUp netpack to keep secondary skills RNG in sync
2016-09-09 23:16:43 +03:00
ca819b3cda
CGHeroInstance::nextPrimarySkill: don't use GS RNG directly
...
Code used from both GS and CGameHandler.
2016-09-09 23:16:42 +03:00
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
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
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
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
9296382bc6
More fixes for clang warning...
2016-09-08 19:58:01 +03:00
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
d06d07a39b
Add ChangeFormation netpack to avoid MP desyncs
...
Previous code was working fine for single client, but would cause desync in multiplayer. Fix issue 2460.
2016-09-08 19:29:15 +03:00
a109580b91
Use const for ObjectTemplate
2016-09-08 18:06:28 +03:00
114dac7e81
Added ObjectTemplate copy constructor and assignment operator
2016-09-08 17:02:59 +03:00
42e7128acc
Fixed possible use-after-free crash with artifacts registration in RMG.
2016-09-08 14:48:48 +03:00
6dc47a2de0
Fixed use-after-free crash with quests registration in RMG.
...
* code taken from PR #200
2016-09-08 14:48:46 +03:00
f39e619304
More tweaks
2016-09-06 13:51:53 +03:00
1ce4675df6
Tweaks
2016-09-06 13:33:11 +03:00
838717dfc1
Magic mirror unified again with normal cast.
2016-09-06 13:05:33 +03:00
686cd00c68
Cleanup.
2016-09-06 12:26:01 +03:00
cc4362211c
Extracted MagicMirror handling
2016-09-06 11:03:36 +03:00
f3d9e718bf
Handle AcidBreathDamage immunity in standard way.
2016-09-06 10:52:54 +03:00
0241c6e843
Improved spell range calculation.
...
* should now support smart custom range AOE spells
2016-09-06 08:56:31 +03:00
1e32c71e47
Make sure that there is no unwanted stack affect by spells.
2016-09-06 08:20:17 +03:00
39c2c6cde7
Ensure no immunity to AcidBreathDamage
2016-09-06 07:16:32 +03:00
f1d0bede11
Moved all affected stacks calculations to mechanics
2016-09-06 07:05:55 +03:00