TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ HoldoutOffset()

static void Terraria.ModLoader.ItemLoader.HoldoutOffset ( float gravDir,
int type,
ref Vector2 offset )
inlinestatic

Definition at line 2305 of file ItemLoader.cs.

2306 {
2307 //IL_001d: Unknown result type (might be due to invalid IL or missing references)
2308 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
2309 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
2310 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
2311 ModItem modItem = GetItem(type);
2312 if (modItem != null)
2313 {
2314 Vector2? modOffset2 = modItem.HoldoutOffset();
2315 if (modOffset2.HasValue)
2316 {
2317 offset.X = modOffset2.Value.X;
2318 offset.Y += gravDir * modOffset2.Value.Y;
2319 }
2320 }
2322 for (int i = 0; i < readOnlySpan.Length; i++)
2323 {
2324 Vector2? modOffset = readOnlySpan[i].HoldoutOffset(type);
2325 if (modOffset.HasValue)
2326 {
2327 offset.X = modOffset.Value.X;
2328 offset.Y = (float)TextureAssets.Item[type].Value.Height / 2f + gravDir * modOffset.Value.Y;
2329 }
2330 }
2331 }
static Asset< Texture2D >[] Item
static ModItem GetItem(int type)
Gets the ModItem template instance corresponding to the specified type (not the clone/new instance wh...
static GlobalHookList< GlobalItem > HookHoldoutOffset

References Terraria.ModLoader.ItemLoader.GetItem(), Terraria.ModLoader.ItemLoader.HookHoldoutOffset, and Terraria.GameContent.TextureAssets.Item.

Referenced by Terraria.Main.DrawPlayerItemPos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: