2
0
mirror of https://github.com/esiur/esiur-js.git synced 2025-06-27 07:13:12 +00:00
This commit is contained in:
2023-07-02 12:39:49 +03:00
parent c3365773c5
commit 16c97373b7
5 changed files with 14 additions and 5 deletions

View File

@ -135,13 +135,13 @@ export default class DataSerializer {
return new DataSerializerComposeResults(
TransmissionTypeIdentifier.Null, new DC(0));
var cts = template.constants.filter((x) => x.value == value);
var cts = template.constants.filter((x) => x.value == value.value);
if (cts.length == 0)
return new DataSerializerComposeResults(
TransmissionTypeIdentifier.Null, new DC(0));
var rt = BinaryList();
var rt = new BinaryList();
rt.addGuid(template.classId);
rt.addUint8(cts[0].index);

View File

@ -216,6 +216,7 @@ export default class Instance extends IEventHandler
{
super();
this.isDestroyed = false;
this.store = store;
this.resource = new WeakRef(resource);
this.id = id;
@ -247,6 +248,7 @@ export default class Instance extends IEventHandler
resource.on("destroy", function(sender){
self.isDestroyed = true;
self._emit("ResourceDestroyed", sender);
});

View File

@ -201,7 +201,10 @@ export class WH extends IEventHandler
if (resource.instance.store != null)
resource.instance.store.remove(resource);
resource.destroy();
resource.instance = null;
return true;
}