File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,6 +119,15 @@ export default class BindingSimulator implements IClientSimulatorImpl {
119119 ] ;
120120 }
121121
122+ /**
123+ * Generates a unique type ID for a bound complex using a "magic formula":
124+ * 100 + id * 10 + partnerId
125+ * This formula assumes that both `id` and `partnerId` are single-digit integers (0-9).
126+ * This ensures that for any pair (id, partnerId), the result is unique as long as
127+ * id and partnerId are not greater than 9. If either value exceeds 9, collisions may occur.
128+ * The offset of 100 is used to avoid overlapping with other type IDs.
129+ * If agent IDs may exceed 9, this formula should be updated to avoid collisions.
130+ */
122131 private getBoundTypeId ( id : number , partnerId : number ) {
123132 return 100 + id * 10 + partnerId ;
124133 }
You can’t perform that action at this time.
0 commit comments