Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
CastToEnumInstruction.cs
Go to the documentation of this file.
2
4{
5 private readonly Type _t;
6
8 {
9 _t = t;
10 }
11
12 public override int Run(InterpretedFrame frame)
13 {
14 object obj = frame.Pop();
15 frame.Push((obj == null) ? null : Enum.ToObject(_t, obj));
16 return 1;
17 }
18}
static object ToObject(Type enumType, object value)
Definition Enum.cs:874