Piotr Wójcik
28d859419c
Revert the old code
2016-09-16 22:01:21 +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
ArseniyShestakov
b5fa97b697
Merge pull request #211 from Chocimier/iss2321
...
Tested. Everthing looks fine so merging.
2016-09-14 00:37:17 +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
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
AlexVinS
33d1895d21
Merge branch 'develop' into SpellsRefactoring8
2016-09-11 18:34:18 +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
Piotr Wójcik
40003460ca
Check if building's dependencies are allowed
2016-09-10 19:38:49 +02:00
AlexVinS
62abde6c46
Prepare battle log for spell-cast on server side.
2016-09-10 18:23:55 +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
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
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
AlexVinS
a109580b91
Use const for ObjectTemplate
2016-09-08 18:06:28 +03:00
AlexVinS
114dac7e81
Added ObjectTemplate copy constructor and assignment operator
2016-09-08 17:02: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
Piotr Wójcik
326be61ecb
Show atrifact's name in message of Warrior's tomb
2016-08-30 20:50:03 +02:00
Piotr Wójcik
52797082aa
Do not show whether Shrine is visited by hero, if was not visited by player yet
2016-08-30 20:48:03 +02:00
AlexVinS
c6d257f328
Fixed CQuest leak
2016-08-30 09:48:10 +03:00
Arseniy Shestakov
94bb5b9901
CGKeys::wasMyColorVisited: fix to not change playerKeyMap on client
2016-08-25 16:47:52 +03:00
Arseniy Shestakov
a90b657b86
Add reset to some static variables on client
2016-08-25 15:52:20 +03:00
Arseniy Shestakov
355f0a74ab
CGSeerHut: add initialization to constructor
2016-08-23 01:19:03 +03:00
Arseniy Shestakov
52e660f087
CQuest: add proper constructor to avoid uninitialized fields
2016-08-22 20:41:37 +03:00
Arseniy Shestakov
206c5699cf
CGHeroInstance::SecondarySkillsInfo: always set rand seed
...
Seed will always be set again on hero initialization, but for save sync it's must be same before that. Related to issue 2459
2016-08-19 23:31:54 +03:00
Arseniy Shestakov
ab06cfd586
More fixes for uninitialized fields
2016-08-18 18:53:28 +03:00
AlexVinS
e26384062f
Fixed memory leak in CObjectClassesHandler
2016-08-17 09:24:01 +03:00
Arseniy Shestakov
b0045fa357
Fix TurnInfo memory leaks
2016-08-16 15:47:21 +03:00
DjWarmonger
2410f0af61
- WeightedRule optimization - part 1
...
- comments, style
2016-08-11 07:49:08 +02:00
DjWarmonger
2bffd4e5c1
Moar optimization!
2016-08-09 13:40:46 +02:00
DjWarmonger
201ed26795
Fixed #1213
2016-06-06 09:30:45 +02: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
DjWarmonger
8f1fba9551
Merge pull request #146 from vcmi/feature/VCMIMapFormat1
...
Ok let's try it.
2016-03-01 07:49:54 +01:00
AlexVinS
5408b6c1ff
Formatting
2016-02-26 18:19:41 +03:00
AlexVinS
8e3e574900
Fix map object appearance serialization
2016-02-26 02:03:14 +03:00
AlexVinS
0de1a37d65
Fix missing template zIndex saving
2016-02-26 01:01:07 +03:00
AlexVinS
2021decb91
Serialize town spells
2016-02-25 22:59:17 +03:00
AlexVinS
d2f04332d0
Load object appearance and pos before addNewObject call, it is required for block-visit calculation.
...
Added a test for tile block-visit.
2016-02-24 00:44:17 +03:00
AlexVinS
17e557be17
Advance Logical identifier condition
2016-02-23 16:36:21 +03:00
AlexVinS
4bcfb8c27d
Draft of new Event conditions
2016-02-22 23:43:57 +03:00
AlexVinS
dc5ad7d7b3
Make string instance names persistent
2016-02-22 19:26:42 +03:00
AlexVinS
ac281f3fec
Tweaks
2016-02-22 04:53:14 +03:00
Arseniy Shestakov
9428f865d3
CGTownInstance: erase all stacks when town is captured by enemy
2016-02-22 03:33:15 +03:00
AlexVinS
64cb0267a3
Do not save "visitableFrom" if object do not have active tiles.
2016-02-22 03:22:10 +03:00
AlexVinS
51bee1000b
Implemented CGWitchHut::serializeJsonOptions
2016-02-22 03:16:33 +03:00
Arseniy Shestakov
d15106bf63
CGTownInstance: implement armies merging on siege. Fix issue 169
...
Merging algorithm is replicate one from original game.
2016-02-22 02:46:31 +03:00
AlexVinS
dd1aabbe23
Use JsonSerializeFormat for map objects
2016-02-22 02:37:19 +03:00
AlexVinS
53b5587c2e
Advance map header serialization
2016-02-21 21:21:22 +03:00
Arseniy Shestakov
07961766ca
CGPandoraBox: don't use giveCreatures object removal feature
...
For pandora box there's own removal function and for CGEvent based on it we sometimes don't want to remove object at all.
2016-02-17 11:28:54 +03:00
AlexVinS
4d9058e412
Whitespace cleanup. (No code changes.)
2016-02-15 13:34:37 +03:00
AlexVinS
67b03b9658
Fixed remaining tempOwner testsю
2016-02-14 12:25:49 +03:00
AlexVinS
fb322b41bc
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
2016-02-14 12:14:57 +03:00
AlexVinS
800f32c4cb
Fix few cases of tempOwner initialization.
2016-02-14 12:13:30 +03:00
AlexVinS
709dd833d5
Added hacks for hero identification.
2016-02-14 11:25:01 +03:00
AlexVinS
e0af4a665a
Added hacks fot spell scroll support.
2016-02-13 19:43:05 +03:00
Arseniy Shestakov
d4524c2fbd
CGDwelling: dont set owner for Refugee Camp. Fix issue 2029
2016-02-13 19:26:47 +03:00
AlexVinS
a59f0c23ce
Dedug tweaks
2016-02-13 17:16:00 +03:00
AlexVinS
fb17914ae5
Debug tweaks
2016-02-10 08:59:24 +03:00
AlexVinS
6db94ab74c
Explicit army serialization - too much CArmedInstance descendants
2016-02-09 10:11:59 +03:00
AlexVinS
53dc49e92a
CGShipyard, CGShrine serialization
2016-02-09 09:17:20 +03:00
AlexVinS
401ba48257
CGScholar serialization
2016-02-09 09:02:34 +03:00
AlexVinS
a00dbd3dd1
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CMakeLists.txt
lib/VCMI_lib.cbp
lib/filesystem/CFileInputStream.cpp
lib/filesystem/CZipLoader.cpp
lib/rmg/CRmgTemplateZone.cpp
vcmi.workspace
2016-02-08 10:17:25 +03:00
Arseniy Shestakov
a13aec4fd7
Aplly some fix for merge and explicitly specify type for std::max
2016-02-08 04:09:02 +03:00
DjWarmonger
6f5706352d
Possible fix for #2371
2016-02-06 12:36:56 +01:00
AlexVinS
081a20d047
Fix a crash.
2016-02-05 09:40:20 +03:00
AlexVinS
483276b128
Merge fixes
2016-02-04 12:28:12 +03:00
AlexVinS
6e205a58b4
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/VCMI_lib.cbp
lib/filesystem/CZipLoader.cpp
lib/filesystem/CZipLoader.h
lib/mapObjects/CGTownInstance.cpp
2016-02-04 10:27:51 +03:00
AlexVinS
97f19b5176
CGResource serialization
2016-02-04 09:22:14 +03:00
AlexVinS
d8d574ed84
CGSignBottle serialization
2016-02-04 08:50:46 +03:00
AlexVinS
a6c719ee11
CGCreature serialization. Added rewardResources.
2016-02-04 08:44:46 +03:00
AlexVinS
1bc41b3ba3
Merge commit '3c844002626f48007a888d4dd8b0b45ec867fc9a' into feature/VCMIMapFormat1
...
Conflicts:
lib/mapObjects/CGHeroInstance.cpp
2016-02-03 05:04:44 +03:00
AlexVinS
b176734418
CGCreature serialization
2016-02-03 04:18:03 +03:00
Vadim Markovtsev
88bc21952b
Make stables message appear if hero has cavaliers but visited stables before
2016-02-01 09:41:15 +03:00
Vadim Markovtsev
c30a6f2ff3
Fix 1989 cavaliers -> champions in stables
2016-01-31 21:09:11 +03:00
Vadim Markovtsev
3926920103
Rename radious -> radius
...
There is no such English word, "radious"
Some files get new lines in the end - BSD sed bug + best practices
2016-01-31 18:01:58 +03:00
Vadim Markovtsev
e18b21b78e
Fix 2264 learning stone & Learning skill
2016-01-31 10:12:01 +03:00
Vadim Markovtsev
eb4331baf6
Fix 1916 water wheel reward
2016-01-30 19:11:22 +03:00
Vadim Markovtsev
918fbd8530
Refactor hero's mana regain
2016-01-30 13:51:07 +03:00
ArseniyShestakov
94fa25d56d
Merge pull request #179 from vmarkovtsev/issue/2405
...
Fix 2405 quest timeout mechanics
2016-01-29 12:19:31 +03:00
Vadim Markovtsev
30d64e3e3c
Fix 2405 quest timeout mechanics
2016-01-29 09:28:37 +03:00
AlexVinS
0011507e42
wipe constexpr on @DjWarmonger request
2016-01-29 00:34:54 +03:00
Arseniy Shestakov
b7fbbfdebe
CQuest: add missing completedOption initialization for CGQuestGuard
2016-01-27 23:24:17 +03:00
ArseniyShestakov
4e8486da7b
Merge pull request #160 from vmarkovtsev/issue/2388
...
Fix 2388 obelisks puzzle revealing
2016-01-27 20:49:03 +03:00
Vadim Markovtsev
0ac833cca4
Fix 2377 "Seer Empty Text"
2016-01-27 19:52:45 +03:00
Alexander Shishkin
1472ed970d
Merge pull request #176 from vmarkovtsev/issue/2160
...
Fix 2160 dismissing a VIP hero.
2016-01-27 18:28:57 +03:00
Vadim Markovtsev
9f3313524e
Fix 2160 dismissing a VIP hero
2016-01-27 17:10:19 +03:00
DjWarmonger
94ecc3f520
Compilation fix. MVS 2013 doesn't support constexpr and it's not needed either.
2016-01-27 10:13:33 +01:00
DjWarmonger
fc62cabb68
Merge pull request #174 from vmarkovtsev/issue/981
...
Fix CGHeroInstance::isInitialized implementation
2016-01-27 09:43:53 +01:00
Vadim Markovtsev
f6679bba50
Fix CGHeroInstance::isInitialized implementation
2016-01-27 09:44:23 +03:00
DjWarmonger
f626c0f9ed
Merge pull request #173 from vmarkovtsev/issue/981
...
Fix 981 reset hero on hiring after retreat/surrender
2016-01-26 21:24:22 +01:00
Vadim Markovtsev
7772b6de74
Fix 981 reset hero on hiring after retreat/surrender
2016-01-26 22:48:31 +03:00
Vadim Markovtsev
40cb48d65e
Replace std::remove_if with vstd::erase_if
2016-01-26 10:19:58 +03:00
Arseniy Shestakov
97a8874ed7
CGCreature: fix crash on draw
...
Also according to H3 behaviour if there artifact monster guarded it's will be lost on draw.
2016-01-26 08:41:09 +03:00
AlexVinS
0ec07b38ac
fix build
2016-01-24 16:58:24 +03:00
AlexVinS
89d986fc6a
Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1
...
Conflicts:
lib/CArtHandler.h
lib/mapObjects/MiscObjects.cpp
2016-01-24 15:39:41 +03:00
AlexVinS
408f346541
Drafts for hero serialization
2016-01-24 15:35:08 +03:00
ArseniyShestakov
b19e082f37
Merge pull request #166 from vmarkovtsev/issue/1723
...
Fix 1723 quest crash on combined arts
2016-01-23 23:23:07 +03:00
AlexVinS
f9d0b20234
CGMine, CGArtifact, CGGarrison serialization
2016-01-23 19:53:02 +03:00
AlexVinS
b0c4ea5947
Fix.
2016-01-23 17:43:20 +03:00
Vadim Markovtsev
a266154b26
Fix 2014 cursor must disappear during movement and Magi's Eye
2016-01-23 00:35:41 +03:00