AlexVinS
ef9bff9006
fixes related to http://bugs.vcmi.eu/view.php?id=2520
2016-10-11 20:04:30 +03:00
AlexVinS
9834db1b7d
simplified CGScholar::onHeroVisit
2016-10-11 20:04:28 +03:00
AlexVinS
4173a5064c
Fixed http://bugs.vcmi.eu/view.php?id=2545
2016-10-11 20:04:27 +03:00
AlexVinS
24585cde87
complete fix for http://bugs.vcmi.eu/view.php?id=2507
2016-10-11 18:19:42 +03:00
AlexVinS
5c3f84138b
fixed random reward generation in CGVisitableOPW
2016-10-11 18:00:54 +03:00
AlexVinS
7db7ece143
Do not send netpack inside netpack handler.
2016-10-09 19:38:13 +03:00
Piotr Wójcik
bb890098df
Fix regression for week-visitable objects
2016-10-09 18:51:41 +03:00
Hao Hu
9ec9cffe9b
Bug fix for berserk: fixed the issue that the berserk affected stack
...
won't attack the nearest live stack.
2016-10-07 23:50:34 -04:00
Vadim Markovtsev
34cf92cb9b
Change logging style
2016-10-03 20:32:01 +02:00
Vadim Markovtsev
eac5aab396
Survive client<->server ABI mismatch
2016-10-02 22:45:00 +02:00
Vadim Markovtsev
a4e550e3cf
Add log levels report
2016-10-02 22:45:00 +02:00
ArseniyShestakov
6f82dc3e15
Merge pull request #230 from dydzio0614/CommanderExperience
...
Some repair for WoG commanders
2016-10-02 19:29:55 +03:00
Dydzio
b84e680f57
Revert changing class structure
2016-10-02 16:57:26 +02:00
dydzio
02e795d508
Fix commander appearing in battles while dead
2016-10-02 16:25:20 +02:00
AlexVinS
5fa9d64d78
Do not allow cast if it affects only "wrong" targets
2016-10-02 16:46:04 +03:00
AlexVinS
cd5c0b3297
Style tweaks.
2016-10-02 15:22:55 +03:00
AlexVinS
34a494ade0
hack-fixed http://bugs.vcmi.eu/view.php?id=2533
2016-10-02 12:39:25 +03:00
AlexVinS
affbc71c56
cleanup
2016-10-02 11:58:53 +03:00
Arseniy Shestakov
04eb0e3787
CGameState::battleGetBattlefieldType: avoid crash on tile 0,0,0
...
Fix issue 2524
2016-10-02 08:39:01 +03:00
AlexVinS
c5440a1c6c
Fixed http://bugs.vcmi.eu/view.php?id=2541
2016-10-02 01:32:28 +03:00
AlexVinS
8aa57f0cbc
fix
2016-10-02 01:07:13 +03:00
AlexVinS
799b8519e0
Allow cast avdmap spells without spellbook
...
* fixes http://bugs.vcmi.eu/view.php?id=1898
* partial fix for http://bugs.vcmi.eu/view.php?id=482
* fixes http://bugs.vcmi.eu/view.php?id=2155
2016-10-01 17:21:39 +03:00
AlexVinS
f124db9f61
Get rid of Bonus::sourceSpell()
...
* now bonus API looks more or less clean
2016-10-01 14:47:21 +03:00
AlexVinS
c2a6c268c0
Cleanup terrain overlay bonuses, fixed CURSED_GROUND
2016-10-01 14:10:09 +03:00
AlexVinS
b6368e23ab
cleanup
2016-10-01 11:05:58 +03:00
AlexVinS
f6bfba0ced
Unified Dispell-related bonus selectors
2016-10-01 10:31:59 +03:00
AlexVinS
96c17505ae
get rid of IBonusBearer::getSpellBonuses & Selector::anyRange
2016-10-01 09:07:18 +03:00
AlexVinS
c243ae6f3e
Get rid of IBonusBearer::getEffect
2016-10-01 08:28:33 +03:00
AlexVinS
a1ff409080
Tweak
...
* handle BIND_EFFECT by bonus type
2016-10-01 08:04:39 +03:00
AlexVinS
04f7b4f951
Cleanup
2016-10-01 07:47:39 +03:00
AlexVinS
730e3b6d0f
Explicit use of limit selector in CBattleInfoCallback::getRandomBeneficialSpell
...
* reverted changes in IBonusBearer::hasBonusFrom just in case
2016-10-01 07:28:03 +03:00
AlexVinS
902117d812
Get rid of IBonusBearer::getBonusesCount it had only one usage
2016-10-01 06:51:12 +03:00
AlexVinS
2f7e10a06f
Use range limit selector when modifying bonus lists and checking for spell bonuses
...
* fixes http://bugs.vcmi.eu/view.php?id=2532
2016-09-30 17:12:28 +03:00
AlexVinS
887794e88b
Remove UNTIL_BEING_ATTACKED bonuses after any received damage.
...
* fixes http://bugs.vcmi.eu/view.php?id=2528
2016-09-30 02:09:02 +03:00
AlexVinS
245d17a9e9
Fixed typo bonus duration enum. Mod compatibility retained.
2016-09-30 01:57:33 +03:00
AlexVinS
8aa31f4073
Fixed http://bugs.vcmi.eu/view.php?id=2529
2016-09-30 01:54:40 +03:00
AlexVinS
72461c5c2e
Fixed http://bugs.vcmi.eu/view.php?id=2268
2016-09-29 23:14:22 +03:00
AlexVinS
9097ffbd8a
Handle HYPNOTIZE effect in case of FEAR and ENCHANTED effects
2016-09-29 22:26:28 +03:00
AlexVinS
83b3c700dd
Handle HYPNOTIZE effect in case of mana drain
2016-09-29 21:47:41 +03:00
AlexVinS
688dc4c189
tweaks
2016-09-29 19:37:59 +03:00
AlexVinS
d195bfb62d
Possibly fixed http://bugs.vcmi.eu/view.php?id=2291
2016-09-29 18:55:07 +03:00
AlexVinS
fed26e1ac9
Merge remote-tracking branch 'remotes/vmarkovtsev/BonusList-shared_ptr' into develop
...
# Conflicts:
# lib/spells/CDefaultSpellMechanics.cpp
2016-09-29 17:12:05 +03:00
AlexVinS
7ce33bc07a
Dispell fixes
2016-09-29 16:50:33 +03: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
d79e336e4b
Reworked SetStackEffect::applyGs
...
* fixed applying different duration effects from spells (f.e. Blind)
* reduced code duplication
2016-09-29 15:23:28 +03:00
AlexVinS
34b8b2c91b
Fixed Berserk spell effect aka Bonus::ATTACKS_NEAREST_CREATURE
...
* issue http://bugs.vcmi.eu/view.php?id=2513
* fix is not retroactive
2016-09-29 14:11:15 +03:00
AlexVinS
e91a6d45e8
Probably fixed http://bugs.vcmi.eu/view.php?id=2523
2016-09-29 10:45:22 +03:00
DjWarmonger
e77d408e92
Merge pull request #222 from dydzio0614/HeroBattleWindow
...
Looks OK to me, thanks! :)
2016-09-28 21:06:59 +02:00
dydzio
68af6a0c19
Refactoring InfoAboutHero + GetHeroInfo
2016-09-28 13:22:33 +02:00
AlexVinS
30aa379a9d
Fixed http://bugs.vcmi.eu/view.php?id=2521
...
* show icons at visitable position
* do not duplicate visible objects icons
2016-09-28 07:58:15 +03:00
dydzio
f9b5ca3374
Remove max mana info leak + tiny refactor
2016-09-28 00:20:45 +02:00
dydzio
d831c087d9
Extending hero info callback
...
Allow to check battle enemy hero details + adding max spell points to available data
2016-09-27 22:47:24 +02:00
AlexVinS
a03419e7d9
Fixed http://bugs.vcmi.eu/view.php?id=2269
2016-09-24 11:25:29 +03:00
AlexVinS
7874dffa7d
fixed http://bugs.vcmi.eu/view.php?id=2282
2016-09-24 10:06:24 +03:00
AlexVinS
849e3fc04e
Fixed http://bugs.vcmi.eu/view.php?id=2506
2016-09-24 09:27:58 +03:00
ArseniyShestakov
6c63041d1a
Merge pull request #198 from vcmi/SpellsRefactoring8
...
No reason to not merge this now.
2016-09-24 05:29:55 +03:00
AlexVinS
7618e294c2
More fixes to not place obstacles on wall parts
2016-09-24 04:55:48 +03:00
AlexVinS
cffc4b2ab5
fixed patch obstacle placement inside walls
2016-09-23 20:27:55 +03:00
AlexVinS
bac0b026e5
Do not place obstacles on wall parts
2016-09-23 13:14:12 +03:00
AlexVinS
44753866ec
Fixed Clone links cleanup.
2016-09-23 12:20:41 +03:00
Arseniy Shestakov
bb05db90e5
CRewardableObject::onHeroVisit: avoid crash on pickable objects
...
Missed this problem when tested #214
2016-09-23 11:47:07 +03:00
ArseniyShestakov
50b271393c
Merge pull request #214 from Chocimier/iss1975
...
Properly check if corpse was visited
2016-09-23 06:26:10 +03:00
AlexVinS
ea2e336f54
Merge branch 'develop' into SpellsRefactoring8
2016-09-22 16:40:32 +03:00
Piotr Wójcik
97d358b70f
Marking visited for team
...
Also no longer gives reward every player
2016-09-20 22:05:44 +02:00
Dydzio
bd651ec5ef
Improve pandora box secondary skill handling
2016-09-20 12:40:58 +02:00
Dydzio
563a5d53c0
Update secondary skill handling. Fix issue 2307
...
Also making secondary skill icon display behavior same as in H3 during popup message.
2016-09-19 20:05:57 +02:00
Dydzio
8b0c62e10e
Block surrender via escape tunnel. Fix issue 2389
2016-09-18 22:05:05 +02:00
AlexVinS
7e85154946
Unify battleCanCastSpell parameters
2016-09-18 18:12:07 +03:00
AlexVinS
ef34d21941
Passive cast can be blocked by spell level limit.
2016-09-18 17:21:56 +03:00
AlexVinS
374e30c972
Added a few safety checks
2016-09-18 16:30:03 +03:00
AlexVinS
73c7b49eb7
Hide effectValue calculation inside BattleSpellCastParameters
2016-09-18 15:27:22 +03:00
AlexVinS
1fd87ecc4a
Simplified offensive spell damage calculation
2016-09-18 14:54:17 +03:00
Arseniy Shestakov
635c48f889
CGHeroInstance::setType: fix to give proper subID to random heroes
...
Hero class id is used to determine hero object appearance, but after than we use subID to store it's unique id.
This change should fix issues 2127 and 2277 since random heroes not going to override others in heroesPool.
2016-09-18 10:01:09 +03:00
Arseniy Shestakov
f6df107a55
Replace more magic subIDs with readable enums
2016-09-18 00:53:37 +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
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
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
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
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
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
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
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