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