Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GetArrayItemInstruction.cs
Go to the documentation of this file.
2
3internal sealed class GetArrayItemInstruction : Instruction
4{
6
7 public override int ConsumedStack => 2;
8
9 public override int ProducedStack => 1;
10
11 public override string InstructionName => "GetArrayItem";
12
14 {
15 }
16
17 public override int Run(InterpretedFrame frame)
18 {
19 int index = ConvertHelper.ToInt32NoNull(frame.Pop());
20 Array array = (Array)frame.Pop();
21 frame.Push(array.GetValue(index));
22 return 1;
23 }
24}