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

◆ vampireHeal()

void Terraria.Projectile.vampireHeal ( int dmg,
Vector2 Position,
Entity victim )
inline

Definition at line 11230 of file Projectile.cs.

11231 {
11232 //IL_004c: Unknown result type (might be due to invalid IL or missing references)
11233 //IL_0052: Unknown result type (might be due to invalid IL or missing references)
11234 float num = (float)dmg * 0.075f;
11235 if ((int)num != 0 && !(Main.player[Main.myPlayer].lifeSteal <= 0f))
11236 {
11237 Main.player[Main.myPlayer].lifeSteal -= num;
11238 int num2 = owner;
11239 NewProjectile(GetProjectileSource_OnHit(victim, 18), Position.X, Position.Y, 0f, 0f, 305, 0, 0f, owner, num2, num);
11240 }
11241 }
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
IEntitySource GetProjectileSource_OnHit(Entity victim, int projectileSourceId)
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...

References Terraria.Projectile.GetProjectileSource_OnHit(), Terraria.Main.myPlayer, Terraria.Projectile.NewProjectile(), Terraria.Projectile.owner, and Terraria.Main.player.

Referenced by Terraria.Projectile.Damage().

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