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

◆ ItemCheck_EmitHammushProjectiles()

void Terraria.Player.ItemCheck_EmitHammushProjectiles ( int i,
Item sItem,
Rectangle itemRectangle,
int damage )
inlineprivate

Definition at line 42358 of file Player.cs.

42359 {
42360 if (sItem.type != 787)
42361 {
42362 return;
42363 }
42364 int num = itemAnimationMax;
42365 if (itemAnimation != (int)((double)num * 0.1) && itemAnimation != (int)((double)num * 0.3) && itemAnimation != (int)((double)num * 0.5) && itemAnimation != (int)((double)num * 0.7) && itemAnimation != (int)((double)num * 0.9))
42366 {
42367 return;
42368 }
42369 float num2 = 0f;
42370 float num3 = 0f;
42371 float num4 = 0f;
42372 float num5 = 0f;
42373 if (itemAnimation == (int)((double)num * 0.9))
42374 {
42375 num2 = -7f;
42376 }
42377 if (itemAnimation == (int)((double)num * 0.7))
42378 {
42379 num2 = -6f;
42380 num3 = 2f;
42381 }
42382 if (itemAnimation == (int)((double)num * 0.5))
42383 {
42384 num2 = -4f;
42385 num3 = 4f;
42386 }
42387 if (itemAnimation == (int)((double)num * 0.3))
42388 {
42389 num2 = -2f;
42390 num3 = 6f;
42391 }
42392 if (itemAnimation == (int)((double)num * 0.1))
42393 {
42394 num3 = 7f;
42395 }
42396 if (itemAnimation == (int)((double)num * 0.7))
42397 {
42398 num5 = 26f;
42399 }
42400 if (itemAnimation == (int)((double)num * 0.3))
42401 {
42402 num5 -= 4f;
42403 num4 -= 20f;
42404 }
42405 if (itemAnimation == (int)((double)num * 0.1))
42406 {
42407 num4 += 6f;
42408 }
42409 if (direction == -1)
42410 {
42411 if (itemAnimation == (int)((double)num * 0.9))
42412 {
42413 num5 -= 8f;
42414 }
42415 if (itemAnimation == (int)((double)num * 0.7))
42416 {
42417 num5 -= 6f;
42418 }
42419 }
42420 num2 *= 1.5f;
42421 num3 *= 1.5f;
42422 num5 *= (float)direction;
42423 num4 *= gravDir;
42424 Projectile.NewProjectile(GetProjectileSource_Item(sItem), (float)(itemRectangle.X + itemRectangle.Width / 2) + num5, (float)(itemRectangle.Y + itemRectangle.Height / 2) + num4, (float)direction * num3, num2 * gravDir, 131, damage / 2, 0f, i);
42425 }
int itemAnimationMax
Definition Player.cs:2567
IEntitySource GetProjectileSource_Item(Item item)
Definition Player.cs:9272

References Terraria.Projectile.NewProjectile().