Fix some bugs

This commit is contained in:
novgorodschi catalin
2026-08-09 19:37:51 +03:00
parent 4f93cb52a2
commit 770fa9fd6b
3 changed files with 46 additions and 28 deletions
-23
View File
@@ -695,24 +695,6 @@ class Battle {
/******************************************************************
* HERO DAMAGE (ATTACKER)
******************************************************************/
/**
* URMARIRE TEMPORARA - se poate sterge dupa ce gasim cauza.
*
* Scrie in error_log de ce (nu) moare eroul. Doar cand atacatorul chiar a
* trimis un erou, ca sa nu umple logul.
*/
if (!empty($Attacker['uhero'])) {
error_log(sprintf(
'[TravianZ][EROU] uid=%s heroid=%s health=%s | attUnits[hero]=%s | intra_in_bloc=%s | lossRatio=%s',
isset($AttackerID) ? $AttackerID : '?',
isset($atkhero['heroid']) ? $atkhero['heroid'] : 'NULL',
isset($atkhero['health']) ? $atkhero['health'] : 'NULL',
isset($units['Att_unit']['hero']) ? $units['Att_unit']['hero'] : 'NESETAT',
(!empty($units['Att_unit']['hero']) && !empty($atkhero['heroid'])) ? 'DA' : 'NU',
isset($result[1]) ? $result[1] : '?'
));
}
if (!empty($units['Att_unit']['hero']) && !empty($atkhero['heroid'])) {
/**
@@ -752,11 +734,6 @@ class Battle {
$armyWipedOut
);
error_log(sprintf(
'[TravianZ][EROU] trimise=%d pierdute=%d armata_nimicita=%s | applyHeroBattleDamage=%s',
$sentTotal, $deadTotal, $armyWipedOut ? 'DA' : 'nu', var_export($dead, true)
));
if ($dead === 1) {
$result['casualties_attacker'][11] = 1;
}