Fix Milestone 1000 pop (invalidate cache for count pop)

Fix Milestone 1000 pop (invalidate cache for count pop)
This commit is contained in:
novgorodschi catalin
2026-07-03 15:00:36 +03:00
parent 8eeee03ca9
commit d8ff747ca1
2 changed files with 8 additions and 1 deletions
+4 -1
View File
@@ -152,7 +152,10 @@ class Automation {
$q = "UPDATE ".TB_PREFIX."vdata set pop = $popTot where wref = $vid";
mysqli_query($database->dblink, $q);
$owner = $database->getVillageField($vid, "owner");
// Invalidăm cache-ul sumei de populație al jucătorului
if ($owner > 0) {
Database::clearUserSumFieldCache($owner, 'pop');
}
// Milestone: first player ever to reach 1000 total population,
// summed across all their villages. recountPop() is the single
// funnel every population-changing event (building, demolishing,