1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fixed battle replay

This commit is contained in:
Ivan Savenko
2023-09-05 17:22:11 +03:00
parent 8bdddd1324
commit 1f1f978328
11 changed files with 110 additions and 34 deletions

View File

@@ -137,6 +137,7 @@ void Catapult::applyTargeted(ServerCallback * server, const Mechanics * m, const
attack.damageDealt = getRandomDamage(server);
CatapultAttack ca; //package for clients
ca.battleID = m->battle()->getBattle()->getBattleID();
ca.attacker = m->caster->getHeroCaster() ? -1 : m->caster->getCasterUnitId();
ca.attackedParts.push_back(attack);
server->apply(&ca);