mirror of
https://github.com/ZuneDev/ZuneUIXTools.git
synced 2026-07-27 13:11:59 -07:00
Support immediate dictionary adds
This commit is contained in:
@@ -216,8 +216,6 @@ public partial class Decompiler
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OpCode.PropertyDictionaryAdd:
|
case OpCode.PropertyDictionaryAdd:
|
||||||
var targetDictProperty = _context.GetImportedProperty(instruction.Operands.ElementAt(0));
|
|
||||||
|
|
||||||
var keyReference = instruction.Operands.ElementAt(1);
|
var keyReference = instruction.Operands.ElementAt(1);
|
||||||
var key = _context.GetConstant(keyReference).Value.ToString();
|
var key = _context.GetConstant(keyReference).Value.ToString();
|
||||||
|
|
||||||
@@ -226,9 +224,14 @@ public partial class Decompiler
|
|||||||
.FirstOrDefault(s => s.Name == key)?
|
.FirstOrDefault(s => s.Name == key)?
|
||||||
.Type;
|
.Type;
|
||||||
|
|
||||||
var targetInstance = (XElement)stack.Peek();
|
var targetInstance = (XElement)ToXmlFriendlyObject(stack.Peek());
|
||||||
|
var dictValueObj = IrisObject.Create(dictValue, dictValueType, _context);
|
||||||
|
|
||||||
PropertyDictionaryAddOnXElement(targetInstance, targetDictProperty, IrisObject.Create(dictValue, dictValueType, _context), key);
|
var targetDictPropertyIndex = (ushort)instruction.Operands.ElementAt(0).Value;
|
||||||
|
if (targetDictPropertyIndex is ushort.MaxValue)
|
||||||
|
PropertyDictionaryAddOnXElement(targetInstance, dictValueObj, key);
|
||||||
|
else
|
||||||
|
PropertyDictionaryAddOnXElement(targetInstance, _context.ImportTables.PropertyImports[targetDictPropertyIndex], dictValueObj, key);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OpCode.PropertyListAdd:
|
case OpCode.PropertyListAdd:
|
||||||
|
|||||||
Reference in New Issue
Block a user