0% found this document useful (0 votes)
7 views3 pages

ParticleOrchestrator - Spawn - ItemTransfer - After

The document contains a code snippet from the Terraria game, specifically related to the ParticleOrchestrator's Spawn_ItemTransfer method. It outlines the function's arguments, local variables, and the sequence of operations performed to manage item transfer particles within the game. The code includes vector calculations and interactions with the game's item and particle systems.

Uploaded by

devgen322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

ParticleOrchestrator - Spawn - ItemTransfer - After

The document contains a code snippet from the Terraria game, specifically related to the ParticleOrchestrator's Spawn_ItemTransfer method. It outlines the function's arguments, local variables, and the sequence of operations performed to manage item transfer particles within the game. The code includes vector calculations and interactions with the game's item and particle systems.

Uploaded by

devgen322
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

[09Mar2025 - 21:56:14]

// ILCursor: Terraria.GameContent.Drawing.ParticleOrchestrator::Spawn_ItemTransfer

// Arguments:
[0] Terraria.GameContent.Drawing.ParticleOrchestraSettings settings

// Locals:
[0] Microsoft.Xna.Framework.Vector2 V_0
[1] Microsoft.Xna.Framework.Vector2 V_1
[2] Microsoft.Xna.Framework.Vector2 V_2
[3] System.Int32 V_3
[4] Terraria.Item V_4
[5] System.Int32 V_5
[6] Terraria.Graphics.Renderers.ItemTransferParticle V_6
[7] Microsoft.Xna.Framework.Vector2 V_7

// Body:
IL_00000: ldarg.0
IL_00001: ldfld Microsoft.Xna.Framework.Vector2
Terraria.GameContent.Drawing.ParticleOrchestraSettings::PositionInWorld
IL_00006: ldarg.0
IL_00007: ldfld Microsoft.Xna.Framework.Vector2
Terraria.GameContent.Drawing.ParticleOrchestraSettings::MovementVector
IL_0000C: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Addition(Microsoft.Xna.Framework.Vector2,Micros
oft.Xna.Framework.Vector2)
IL_00011: call Terraria.Utilities.UnifiedRandom Terraria.Main::get_rand()
IL_00016: ldc.r4 32
IL_0001B: ldc.r4 32
IL_00020: call Microsoft.Xna.Framework.Vector2
Terraria.Utils::NextVector2Circular(Terraria.Utilities.UnifiedRandom,System.Single,
System.Single)
IL_00025: stloc.0
IL_00026: ldarg.0
IL_00027: ldfld Microsoft.Xna.Framework.Vector2
Terraria.GameContent.Drawing.ParticleOrchestraSettings::PositionInWorld
IL_0002C: ldloc.0
IL_0002D: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Addition(Microsoft.Xna.Framework.Vector2,Micros
oft.Xna.Framework.Vector2)
IL_00032: stloc.1
IL_00033: ldloc.1
IL_00034: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Subtraction(Microsoft.Xna.Framework.Vector2,Mic
rosoft.Xna.Framework.Vector2)
IL_00039: stloc.2
IL_0003A: ldarg.0
IL_0003B: ldfld System.Int32
Terraria.GameContent.Drawing.ParticleOrchestraSettings::UniqueInfoPiece
IL_00040: stloc.3
IL_00041: ldsfld
System.Collections.Generic.Dictionary`2<System.Int32,Terraria.Item>
Terraria.ID.ContentSamples::ItemsByType
IL_00046: ldloc.3
IL_00047: ldloca.s V_4
IL_00049: callvirt System.Boolean
System.Collections.Generic.Dictionary`2<System.Int32,Terraria.Item>::TryGetValue(TK
ey,TValue&)
IL_0004E: brfalse.s IL_000E4
IL_00050: ldloc.s V_4
IL_00052: callvirt System.Boolean Terraria.Item::get_IsAir()
IL_00057: brtrue.s IL_000E4
IL_00059: ldloc.s V_4
IL_0005B: ldfld System.Int32 Terraria.Item::type
IL_00060: stloc.3
IL_00061: call Terraria.Utilities.UnifiedRandom Terraria.Main::get_rand()
IL_00066: ldc.i4.s 60
IL_00068: ldc.i4.s 80
IL_0006A: callvirt System.Int32
Terraria.Utilities.UnifiedRandom::Next(System.Int32,System.Int32)
IL_0006F: stloc.s V_5
IL_00071: ldloc.1
IL_00072: ldloc.2
IL_00073: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Addition(Microsoft.Xna.Framework.Vector2,Micros
oft.Xna.Framework.Vector2)
IL_00078: ldc.r4 -8
IL_0007D: ldc.r4 -8
IL_00082: newobj System.Void
Microsoft.Xna.Framework.Vector2::.ctor(System.Single,System.Single)
IL_00087: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Addition(Microsoft.Xna.Framework.Vector2,Micros
oft.Xna.Framework.Vector2)
IL_0008C: stloc V_7
IL_00090: ldloc V_7
IL_00094: ldloc.s V_5
IL_00096: ldc.i4.s 10
IL_00098: add
IL_00099: call System.Void
Terraria.Chest::AskForChestToEatItem(Microsoft.Xna.Framework.Vector2,System.Int32)
IL_0009E: ldloc V_7
IL_000A2: ldloc V_5
IL_000A6: ldc.i4 383
IL_000AB: ldc.i4 28757574
IL_000B0: call T
MonoMod.Utils.DynamicReferenceManager::GetValueTUnsafe<System.Delegate>(System.Int3
2,System.Int32)
IL_000B5: call System.Void
MonoMod.Cil.FastDelegateInvokers::InvokeVoidVal2<Microsoft.Xna.Framework.Vector2,Sy
stem.Int32>(T0,T1,MonoMod.Cil.FastDelegateInvokers/VoidVal2`2<T0,T1>)
IL_000BA: ldsfld
Terraria.Graphics.Renderers.ParticlePool`1<Terraria.Graphics.Renderers.ItemTransfer
Particle> Terraria.GameContent.Drawing.ParticleOrchestrator::_poolItemTransfer
IL_000BF: callvirt T
Terraria.Graphics.Renderers.ParticlePool`1<Terraria.Graphics.Renderers.ItemTransfer
Particle>::RequestParticle()
IL_000C4: stloc.s V_6
IL_000C6: ldloc.s V_6
IL_000C8: ldloc.3
IL_000C9: ldloc.s V_5
IL_000CB: ldloc.1
IL_000CC: ldloc.1
IL_000CD: ldloc.2
IL_000CE: call Microsoft.Xna.Framework.Vector2
Microsoft.Xna.Framework.Vector2::op_Addition(Microsoft.Xna.Framework.Vector2,Micros
oft.Xna.Framework.Vector2)
IL_000D3: callvirt System.Void
Terraria.Graphics.Renderers.ItemTransferParticle::Prepare(System.Int32,System.Int32
,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2)
IL_000D8: ldsfld Terraria.Graphics.Renderers.ParticleRenderer
Terraria.Main::ParticleSystem_World_OverPlayers
IL_000DD: ldloc.s V_6
IL_000DF: callvirt System.Void
Terraria.Graphics.Renderers.ParticleRenderer::Add(Terraria.Graphics.Renderers.IPart
icle)
IL_000E4: ret

You might also like