Fix #314 add filter on attacks
This commit is contained in:
novgorodschi catalin
2026-07-29 08:02:23 +03:00
parent 4809626e40
commit e87c8ac824
6 changed files with 103 additions and 2 deletions
+8
View File
@@ -4283,3 +4283,11 @@ tz_def('ADM_PLUS_STATISTICS_KEEP_TIP', '0 keeps everything, so players see the f
tz_def('ALLYBONUS_YOURLEVEL', 'Your level');
tz_def('ALLYBONUS_UNLOCKS_IN', 'next unlocks in');
tz_def('ALLYBONUS_NEWMEMBER', 'New members gain access to higher levels gradually: level 2 after 24 hours in the alliance, level 3 after 48 hours, and so on.');
//////////////////////////////////////////////////////////////////////////////////////////////////////
// RAPOARTE - filtru dupa rezultatul luptei
//////////////////////////////////////////////////////////////////////////////////////////////////////
tz_def('TZ_RPT_ALL_RESULTS', 'All results');
tz_def('TZ_RPT_F_WON_NOLOSS', 'Won without losses');
tz_def('TZ_RPT_F_WON_LOSS', 'Won with losses');
tz_def('TZ_RPT_F_LOST', 'Lost');
+8
View File
@@ -4226,3 +4226,11 @@ tz_def('ADM_PLUS_STATISTICS_KEEP_TIP', '0 conserve tout, afin que les joueurs vo
tz_def('ALLYBONUS_YOURLEVEL', 'Votre niveau');
tz_def('ALLYBONUS_UNLOCKS_IN', 'prochain dans');
tz_def('ALLYBONUS_NEWMEMBER', 'Les nouveaux membres accèdent progressivement aux niveaux supérieurs : niveau 2 après 24 heures dans l\'alliance, niveau 3 après 48 heures, etc.');
//////////////////////////////////////////////////////////////////////////////////////////////////////
// RAPOARTE - filtru dupa rezultatul luptei
//////////////////////////////////////////////////////////////////////////////////////////////////////
tz_def('TZ_RPT_ALL_RESULTS', 'Tous les résultats');
tz_def('TZ_RPT_F_WON_NOLOSS', 'Gagné sans pertes');
tz_def('TZ_RPT_F_WON_LOSS', 'Gagné avec pertes');
tz_def('TZ_RPT_F_LOST', 'Perdu');
+8
View File
@@ -4023,3 +4023,11 @@ tz_def('ADM_PLUS_STATISTICS_KEEP_TIP', '0 pastreaza tot, ca jucatorii sa vada is
tz_def('ALLYBONUS_YOURLEVEL', 'Nivelul tau');
tz_def('ALLYBONUS_UNLOCKS_IN', 'urmatorul in');
tz_def('ALLYBONUS_NEWMEMBER', 'Membrii noi capata acces treptat la nivelurile mari: nivelul 2 dupa 24 de ore in alianta, nivelul 3 dupa 48 de ore si asa mai departe.');
//////////////////////////////////////////////////////////////////////////////////////////////////////
// RAPOARTE - filtru dupa rezultatul luptei
//////////////////////////////////////////////////////////////////////////////////////////////////////
tz_def('TZ_RPT_ALL_RESULTS', 'Toate rezultatele');
tz_def('TZ_RPT_F_WON_NOLOSS', 'Castigat fara pierderi');
tz_def('TZ_RPT_F_WON_LOSS', 'Castigat cu pierderi');
tz_def('TZ_RPT_F_LOST', 'Pierdut');
+28
View File
@@ -151,6 +151,34 @@ class Message
if (!is_array($type)) {
$type = [$type];
}
/**
* Filtru suplimentar dupa REZULTAT, pentru rapoartele de lupta.
*
* Rapoartele de alianta au deja acest filtru (sabii verzi/galbene);
* cele personale nu il aveau, desi informatia exista deja in ntype:
*
* 1 / 4 castigat fara pierderi (atacator / aparator)
* 2 / 5 castigat cu pierderi
* 3 / 6 / 7 pierdut
*
* Nu e nevoie de nicio schimbare in baza de date.
*/
if ((int) $get['t'] === 3 && isset($get['f'])) {
$results = array(
1 => array(1, 4), // victorie fara pierderi
2 => array(2, 5), // victorie cu pierderi
3 => array(3, 6, 7), // infrangere
);
$f = (int) $get['f'];
if (isset($results[$f])) {
// pastram doar tipurile care sunt SI in categorie, SI in rezultat
$type = array_values(array_intersect($type, $results[$f]));
}
}
$this->noticearray = $this->filter_by_value(
$database->getNotice($session->uid),
"ntype",