mirror of
https://github.com/esiur/esiur-js.git
synced 2025-06-27 07:13:12 +00:00
enum
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user