public DialogList Update() { List <Dialog> list = this._hDialogList; bool lockTaken = false; try { Monitor.Enter((object)list, ref lockTaken); if (this == Game.DialogList && (this._hDialogList.Count == 0 || this._iUpdateTime < Game.Time())) { ProcessCommunicationPointer communicationPointer = Game.Process[this._iBase + (ulong)Game.Resolver["DialogCollection"]["Array"].Value].ToBuffered((ulong)Game.Resolver["DialogCollection"]["Size"].Value); for (uint iIndex = 0; iIndex < Game.Resolver["DialogCollection"]["Size"].Value / Game.Process.PointerSize; ++iIndex) { ulong pointer = communicationPointer.GetPointer((ulong)(Game.Process.PointerSize * iIndex)); if (!this._hDialogAddress.Contains(pointer) && (long)pointer != 0L && (Game.Process.GetString(pointer + (ulong)Game.Resolver["DialogCollection"]["Validate"].Value, 4U, MessageHandlerString.ASCII) == "Vera" || Game.Process.GetString(pointer + (ulong)Game.Resolver["DialogCollection"]["Validate"].Value, 8U, MessageHandlerString.ASCII) == "MYRIADPR")) { this._hDialogList.Add(new Dialog(this._iBase, pointer, iIndex, (Dialog)null)); this._hDialogAddress.Add(pointer); } } this._hDialogList.Sort(); this._iUpdateTime = Game.Time() + 1000U; } return(this); } finally { if (lockTaken) { Monitor.Exit((object)list); } } }
protected HashSet <ulong> _Node(ulong iNode, HashSet <ulong> hFound) { ProcessCommunicationPointer communicationPointer = Game.Process[iNode].ToBuffered((ulong)(Game.Process.PointerSize * 3U)); if (!hFound.Contains(iNode)) { hFound.Add(iNode); } for (uint index = 0; index < 3U; ++index) { ulong pointer; if ((long)(pointer = communicationPointer.GetPointer((ulong)(Game.Process.PointerSize * index))) != 0L && !hFound.Contains(pointer)) { hFound = this._Node(pointer, hFound); } } return(hFound); }