From fcb07bba641dbd826bdb3ef495b716c77f10e470 Mon Sep 17 00:00:00 2001 From: WiseDev <83840010+wisedevik@users.noreply.github.com> Date: Sun, 23 Aug 2026 10:35:26 +0300 Subject: [PATCH] fix the buff component array size, it desynced the snapshot the client reads getTable(8)->getItemCount() entries there, table 8 is damage_types with 5 rows. i was writing character_buffs, 12 rows, so every snapshot carried 7 extra vints and 7 extra booleans and the stream slid. that is what tripped the sentinel and aborted the client in Debugger::error("Full update stream is corrupted!"). verified the rest field by field against the client decoders: LogicGameMode, LogicBattle, LogicGameObjectManager, LogicGameObject, LogicCharacter, LogicSummoner and LogicCombatComponent all match. the conditional character fields stay off because ReloadAfterHits and ManaGenerateLimit are empty for both tower rows. --- crates/game-service/src/battle.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/game-service/src/battle.rs b/crates/game-service/src/battle.rs index 165d507..5733fc1 100644 --- a/crates/game-service/src/battle.rs +++ b/crates/game-service/src/battle.rs @@ -11,7 +11,7 @@ use logic::{table, LogicDataRef, LogicDataTables, LogicRandom}; pub const LOCATION_FILE_COLUMN: &str = "FileName"; pub const CHARACTER_KING_TOWER: &str = "KingTower"; pub const CHARACTER_PRINCESS_TOWER: &str = "PrincessTower"; -pub const BUFF_TABLE: i32 = 9; +pub const BUFF_ARRAY_TABLE: i32 = table::DAMAGE_TYPES; pub struct TowerSpec { pub data: LogicDataRef, pub instance: i32, @@ -42,7 +42,7 @@ fn character_data(name: &str) -> LogicDataRef { impl BattleBuilder { pub fn new(root: impl AsRef) -> Self { let buff_type_count = LogicDataTables::instance() - .table(BUFF_TABLE) + .table(BUFF_ARRAY_TABLE) .map(|rows| rows.count()) .unwrap_or(0); Self {