public void Load(VMActionCallbackMarshal input, VMContext context) { type = input.Type; Target = context.VM.GetObjectById(input.Target); Interaction = input.Interaction; SetParam = input.SetParam; StackObject = context.VM.GetObjectById(input.StackObject); Caller = context.VM.GetObjectById(input.Caller); }
public void Deserialize(BinaryReader reader) { RoutineID = reader.ReadUInt16(); CheckRoutineID = reader.ReadUInt16(); Callee = reader.ReadInt16(); StackObject = reader.ReadInt16(); IconOwner = reader.ReadInt16(); CodeOwnerGUID = reader.ReadUInt32(); if (reader.ReadBoolean()) { Name = reader.ReadString(); } var argsLen = reader.ReadInt32(); if (argsLen > -1) { Args = new short[argsLen]; for (int i = 0; i < argsLen; i++) { Args[i] = reader.ReadInt16(); } } InteractionNumber = reader.ReadInt32(); NotifyIdle = reader.ReadBoolean(); Priority = reader.ReadInt16(); Mode = (VMQueueMode)reader.ReadByte(); Flags = (TTABFlags)reader.ReadUInt32(); Flags2 = (TSOFlags)reader.ReadUInt32(); UID = reader.ReadUInt16(); if (reader.ReadBoolean()) { Callback = new VMActionCallbackMarshal(); Callback.Deserialize(reader); } if (Version > 11) { InteractionResult = reader.ReadSByte(); ResultCheckCounter = reader.ReadUInt16(); } }
public VMActionCallback(VMActionCallbackMarshal input, VMContext context) { Load(input, context); }
public void Deserialize(BinaryReader reader) { RoutineID = reader.ReadUInt16(); Callee = reader.ReadInt16(); StackObject = reader.ReadInt16(); IconOwner = reader.ReadInt16(); CodeOwnerGUID = reader.ReadUInt32(); if (reader.ReadBoolean()) Name = reader.ReadString(); var argsLen = reader.ReadInt32(); if (argsLen > -1) { Args = new short[argsLen]; for (int i = 0; i < argsLen; i++) Args[i] = reader.ReadInt16(); } InteractionNumber = reader.ReadInt32(); Cancelled = reader.ReadBoolean(); Priority = (VMQueuePriority)reader.ReadByte(); UID = reader.ReadUInt16(); if (reader.ReadBoolean()) { Callback = new VMActionCallbackMarshal(); Callback.Deserialize(reader); } }