Closed qingpengchen2011 closed 2 years ago
My shot is the two functions are actually the same: 0x00f16ae0
calls 0x00f16b68
(in fact, System.Collections.Generic.Dictionary.KeyCollection
implements System.Collections.Generic.ICollection
).
So it's irrelevant the one you pick.
Could you verify that?
Thanks for your reply. You're right. I've verified that. Would you please tell me how to iterate a System.Collections.Generic.Dictionary. Even thourgh I can do it by a very tricky way. Here is my code:
const entries = upgradeInfoDict.field<Il2Cpp.Array<Il2Cpp.Object>>("entries").value;
const count = upgradeInfoDict.method<number>("get_Count").invoke();
for (var i = 0; i < count; i++) {
const entry = entries.get(i);
const key = entry.field<number>("key").value;
const value = entry.field<Il2Cpp.Object>("value").value;
}
The type of upgradeInfoDict is System.Collections.Generic.Dictionary<System.Int32,RC.Game.ClassA>
Here are the functions: System.Collections.Generic.Dictionary.KeyCollection<System.Int32,RC.Game.ClassA> get_Keys(); // 0x00f16ae0 System.Collections.Generic.ICollection System.Collections.Generic.IDictionary<TKey,TValue>.get_Keys(); // 0x00f16b68
How can I make the call the function at 0x00f16b68(second function)