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

◆ TryGetOwner()

bool Terraria.Projectile.TryGetOwner ( [NotNullWhen(true)] out Player? player)
inline

Definition at line 93130 of file Projectile.cs.

93131 {
93132 player = null;
93133 if (npcProj || trap)
93134 {
93135 return false;
93136 }
93137 player = Main.player[owner];
93138 return player.active;
93139 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
bool trap
If true, this projectile was spawned by a trap tile.
bool npcProj
If true, this projectile was spawned by a friendly Town NPC.

References Terraria.Main.player.

Referenced by Terraria.ModLoader.CombinedHooks.ModifyHitNPCWithProj(), and Terraria.ModLoader.CombinedHooks.OnHitNPCWithProj().

+ Here is the caller graph for this function: