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

◆ ItemCheck_HackHoldStyles()

void Terraria.Player.ItemCheck_HackHoldStyles ( Item sItem)
inlineprivate

Definition at line 49386 of file Player.cs.

49387 {
49388 if (sItem.fishingPole > 0)
49389 {
49390 sItem.holdStyle = 0;
49391 if (ItemTimeIsZero && itemAnimation == 0)
49392 {
49393 for (int i = 0; i < 1000; i++)
49394 {
49395 if (Main.projectile[i].active && Main.projectile[i].owner == whoAmI && Main.projectile[i].bobber)
49396 {
49397 sItem.holdStyle = 1;
49398 }
49399 }
49400 }
49401 }
49402 if (!ItemID.Sets.IsAKite[sItem.type])
49403 {
49404 return;
49405 }
49406 sItem.holdStyle = 0;
49407 if (!ItemTimeIsZero || itemAnimation != 0)
49408 {
49409 return;
49410 }
49411 for (int j = 0; j < 1000; j++)
49412 {
49413 if (Main.projectile[j].active && Main.projectile[j].owner == whoAmI && Main.projectile[j].type == sItem.shoot)
49414 {
49415 sItem.holdStyle = 1;
49416 ChangeDir((!(Main.projectile[j].Center.X - base.Center.X < 0f)) ? 1 : (-1));
49417 }
49418 }
49419 }
static bool[] IsAKite
Definition ItemID.cs:130
bool ItemTimeIsZero
Definition Player.cs:3525
void ChangeDir(int dir)
Definition Player.cs:40136

References Terraria.ID.ItemID.Sets.IsAKite, and Terraria.Main.projectile.