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

◆ NPCAddHeight()

static float Terraria.Main.NPCAddHeight ( NPC theNPC)
inlinestatic

Definition at line 20492 of file Main.cs.

20493 {
20494 float num = 0f;
20495 if (theNPC.type == 125)
20496 {
20497 num = 30f;
20498 }
20499 else if (theNPC.type == 54)
20500 {
20501 num = 2f;
20502 }
20503 else if (theNPC.type == 205)
20504 {
20505 num = 8f;
20506 }
20507 else if (theNPC.type == 182)
20508 {
20509 num = 24f;
20510 }
20511 else if (theNPC.type == 178)
20512 {
20513 num = 2f;
20514 }
20515 else if (theNPC.type == 126)
20516 {
20517 num = 30f;
20518 }
20519 else if (theNPC.type == 6 || theNPC.type == 173)
20520 {
20521 num = 26f;
20522 }
20523 else if (theNPC.type == 94)
20524 {
20525 num = 14f;
20526 }
20527 else if (theNPC.type == 7 || theNPC.type == 8 || theNPC.type == 9)
20528 {
20529 num = 13f;
20530 }
20531 else if (theNPC.type == 98 || theNPC.type == 99 || theNPC.type == 100)
20532 {
20533 num = 13f;
20534 }
20535 else if (theNPC.type == 95 || theNPC.type == 96 || theNPC.type == 97)
20536 {
20537 num = 13f;
20538 }
20539 else if (theNPC.type == 10 || theNPC.type == 11 || theNPC.type == 12)
20540 {
20541 num = 8f;
20542 }
20543 else if (theNPC.type == 13 || theNPC.type == 14 || theNPC.type == 15)
20544 {
20545 num = 26f;
20546 }
20547 else if (theNPC.type == 175)
20548 {
20549 num = 4f;
20550 }
20551 else if (theNPC.type == 520)
20552 {
20553 num = 2f;
20554 }
20555 else if (theNPC.type >= 412 && theNPC.type <= 414)
20556 {
20557 num = 18f;
20558 }
20559 else if (theNPC.type == 48)
20560 {
20561 num = 32f;
20562 }
20563 else if (theNPC.type == 49 || theNPC.type == 51)
20564 {
20565 num = 4f;
20566 }
20567 else if (theNPC.type == 60)
20568 {
20569 num = 10f;
20570 }
20571 else if (theNPC.type == 62 || theNPC.type == 66 || theNPC.type == 156)
20572 {
20573 num = 14f;
20574 }
20575 else if (theNPC.type == 63 || theNPC.type == 64 || theNPC.type == 103)
20576 {
20577 num = 4f;
20578 }
20579 else if (theNPC.type == 65)
20580 {
20581 num = 5f;
20582 }
20583 else if (theNPC.type == 69)
20584 {
20585 num = 4f;
20586 }
20587 else if (theNPC.type == 70)
20588 {
20589 num = -4f;
20590 }
20591 else if (theNPC.type == 72)
20592 {
20593 num = -2f;
20594 }
20595 else if (theNPC.type == 83 || theNPC.type == 84)
20596 {
20597 num = 20f;
20598 }
20599 else if (theNPC.type == 150 || theNPC.type == 151 || theNPC.type == 158)
20600 {
20601 num = 10f;
20602 }
20603 else if (theNPC.type == 152)
20604 {
20605 num = 6f;
20606 }
20607 else if (theNPC.type == 153 || theNPC.type == 154)
20608 {
20609 num = 2f;
20610 }
20611 else if (theNPC.type == 165 || theNPC.type == 237 || theNPC.type == 238 || theNPC.type == 240 || theNPC.type == 531)
20612 {
20613 num = 10f;
20614 }
20615 else if (theNPC.type == 39 || theNPC.type == 40 || theNPC.type == 41)
20616 {
20617 num = 26f;
20618 }
20619 else if (theNPC.type >= 87 && theNPC.type <= 92)
20620 {
20621 num = 56f;
20622 }
20623 else if (theNPC.type >= 134 && theNPC.type <= 136)
20624 {
20625 num = 30f;
20626 }
20627 else if (theNPC.type == 169)
20628 {
20629 num = 8f;
20630 }
20631 else if (theNPC.type == 174)
20632 {
20633 num = 6f;
20634 }
20635 else if (theNPC.type == 369)
20636 {
20637 num = 2f;
20638 }
20639 else if (theNPC.type == 376)
20640 {
20641 num = 6f;
20642 }
20643 else if (theNPC.type == 579)
20644 {
20645 num = -2f;
20646 }
20647 else if (theNPC.type == 613 || theNPC.type == 612)
20648 {
20649 num = 2f;
20650 }
20651 switch (theNPC.type)
20652 {
20653 case 269:
20654 case 270:
20655 case 271:
20656 case 274:
20657 case 277:
20658 num -= 2f;
20659 break;
20660 }
20661 if (theNPC.townNPC && theNPC.ai[0] == 5f)
20662 {
20663 num -= 4f;
20664 if (theNPC.type == 637 || theNPC.type == 656 || NPCID.Sets.IsTownSlime[theNPC.type])
20665 {
20666 num -= 10f;
20667 }
20668 }
20669 if (theNPC.type == 671 || theNPC.type == 672 || theNPC.type == 673 || theNPC.type == 674 || theNPC.type == 675)
20670 {
20671 num += 10f;
20672 }
20673 return num * theNPC.scale;
20674 }
static bool[] IsTownSlime
Definition NPCID.cs:4101

References Terraria.ID.NPCID.Sets.IsTownSlime.

Referenced by Terraria.Main.DrawInterface_14_EntityHealthBars(), and Terraria.Main.DrawNPCDirect().