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.
This commit is contained in:
parent
6dc4caede9
commit
fcb07bba64
1 changed files with 2 additions and 2 deletions
|
|
@ -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<Path>) -> Self {
|
||||
let buff_type_count = LogicDataTables::instance()
|
||||
.table(BUFF_TABLE)
|
||||
.table(BUFF_ARRAY_TABLE)
|
||||
.map(|rows| rows.count())
|
||||
.unwrap_or(0);
|
||||
Self {
|
||||
|
|
|
|||
Loading…
Reference in a new issue