This commit is contained in:
2025-09-04 21:12:22 +08:00
parent 0982682cc9
commit 3df5314d4e
5 changed files with 8 additions and 6 deletions

View File

@@ -38,7 +38,9 @@ namespace ArachnaeSwarm
return;
}
this.innerContainer.TryAdd(this.originalCaster);
// 正确的做法:从原始施法者身上“分裂”出一个副本存入容器
// 这确保了容器里的是一个独立的对象,而不是一个会被销毁的引用
this.innerContainer.TryAdd(this.originalCaster.SplitOff(1), true);
PawnDataUtility.TransferSoul(this.originalCaster, this.pawn);
if (!this.originalCaster.Destroyed)
@@ -84,7 +86,7 @@ namespace ArachnaeSwarm
{
base.ExposeData();
Scribe_Deep.Look(ref innerContainer, "innerContainer", this);
Scribe_References.Look(ref originalCaster, "originalCaster");
Scribe_References.Look(ref originalCaster, "originalCaster", false);
}
}
}