Files
TravianZ/GameEngine
Ferywir ae0ab66099 Refactor(sendunitsComplete): extract applyReinforcementCasualties() [#155]
Extract the "kill other defence in village" block (reinforcement casualties)
into a new private method applyReinforcementCasualties(): compute each
reinforcement's dead units/hero, persist them (modifyEnforce), notify the
reinforcing players, and delete fully-wiped reinforcements. Dead counts are
accumulated into $alldead and dead heroes into $DefenderHeroesDeadArray (both
passed by reference); the tribe-presence flags (rom/ger/gal/nat/natar) are
returned to the caller.

Pure behaviour-preserving extraction. Also drops two dead recomputations of
$totalsend_att/$totaldead_att that sat inside the loop and were immediately
overwritten right after it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 21:38:43 +03:00
..
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-05-07 08:24:40 +03:00
2026-05-18 09:26:19 +03:00
2026-05-28 12:25:28 +03:00
2026-05-18 11:12:15 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-06-09 15:15:27 +03:00
2026-05-15 08:17:14 +03:00
2026-05-15 08:17:14 +03:00
2026-05-21 13:12:21 +03:00