mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
dca5d86e7a
* The reason is, the mine has attribute hidden=true; when enemy unit moves, the code in BattleInfo.cpp MoveUnit() (line 817) will update the revealed to true; then in the CGameHandler.cpp handleDamageFromObstacle() (line 4846) is checking , and the condition battleIsObstacleVisibleForSide() will return true, so the effect will not be triggerred. Resolution: 1. Remove the "revealed=true" in moveUnit(), and in handleDamageFromObstacle, remove the "const" restrict for obstacle, and then update revealed to true; 2. After the takeDamage function, add a pack "BattleObstaclesChanged" to update the obstacle to be "revealed=true". |
||
---|---|---|
.. | ||
mock_battle_IBattleState.h | ||
mock_battle_Unit.h | ||
mock_BonusBearer.cpp | ||
mock_BonusBearer.h | ||
mock_CPSICallback.cpp | ||
mock_CPSICallback.h | ||
mock_IGameCallback.cpp | ||
mock_IGameCallback.h | ||
mock_MapService.cpp | ||
mock_MapService.h | ||
mock_spells_Mechanics.h | ||
mock_spells_Problem.h | ||
mock_spells_Spell.h | ||
mock_UnitEnvironment.h | ||
mock_UnitInfo.h | ||
mock_vstd_RNG.h |