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

◆ MouseText_DrawItemTooltip_GetLinesInfo()

static void Terraria.Main.MouseText_DrawItemTooltip_GetLinesInfo ( Item item,
ref int yoyoLogo,
ref int researchLine,
float oldKB,
ref int numLines,
string[] toolTipLine,
bool[] preFixLine,
bool[] badPreFixLine )
inlinestatic

Definition at line 19206 of file Main.cs.

19207 {
19208 toolTipLine[0] = item.HoverName;
19209 if (item.favorited)
19210 {
19211 toolTipLine[numLines++] = Lang.tip[56].Value;
19212 toolTipLine[numLines++] = Lang.tip[57].Value;
19213 if (LocalPlayer.chest != -1)
19214 {
19217 {
19218 toolTipLine[numLines++] = Language.GetTextValue("UI.ItemCannotBePlacedInsideItself");
19219 }
19220 }
19221 }
19222 if (item.social)
19223 {
19224 toolTipLine[numLines] = Lang.tip[0].Value;
19225 numLines++;
19226 toolTipLine[numLines] = Lang.tip[1].Value;
19227 numLines++;
19228 }
19229 else
19230 {
19231 if (item.damage > 0 && (!item.notAmmo || item.useStyle != 0) && (item.type < 71 || item.type > 74 || player[myPlayer].HasItem(905)))
19232 {
19233 float num = 5E-06f;
19234 int damage = item.damage;
19235 damage = (int)((float)damage * ItemID.Sets.ToolTipDamageMultiplier[item.type]);
19236 if (item.melee)
19237 {
19238 toolTipLine[numLines] = string.Concat((int)(LocalPlayer.meleeDamage * (float)damage + num));
19239 toolTipLine[numLines] += Lang.tip[2].Value;
19240 }
19241 else if (item.ranged)
19242 {
19243 float num2 = LocalPlayer.rangedDamage;
19244 if (item.useAmmo == AmmoID.Arrow || item.useAmmo == AmmoID.Stake)
19245 {
19246 num2 = LocalPlayer.bowEffectiveDamage;
19247 if (LocalPlayer.archery)
19248 {
19249 num2 *= 1.1f;
19250 }
19251 }
19252 if (item.useAmmo == AmmoID.Bullet || item.useAmmo == AmmoID.CandyCorn)
19253 {
19254 num2 = LocalPlayer.gunEffectiveDamage;
19255 }
19256 if (item.useAmmo == AmmoID.Rocket || item.useAmmo == AmmoID.StyngerBolt || item.useAmmo == AmmoID.JackOLantern || item.useAmmo == AmmoID.NailFriendly || item.useAmmo == AmmoID.Coin || item.useAmmo == AmmoID.Flare || item.useAmmo == AmmoID.Dart || item.useAmmo == AmmoID.Snowball || item.useAmmo == AmmoID.Sand || item.useAmmo == AmmoID.FallenStar || item.useAmmo == AmmoID.Gel)
19257 {
19258 num2 = LocalPlayer.specialistEffectiveDamage;
19259 }
19260 if (item.type == 1156 || item.type == 3350 || item.type == 3210 || item.type == 160 || item.type == 3821)
19261 {
19262 num2 = LocalPlayer.specialistEffectiveDamage;
19263 }
19264 toolTipLine[numLines] = string.Concat((int)(num2 * (float)damage + num));
19265 toolTipLine[numLines] += Lang.tip[3].Value;
19266 }
19267 else if (item.magic)
19268 {
19269 toolTipLine[numLines] = string.Concat((int)(LocalPlayer.magicDamage * (float)damage + num));
19270 toolTipLine[numLines] += Lang.tip[4].Value;
19271 }
19272 else if (item.summon)
19273 {
19274 toolTipLine[numLines] = string.Concat((int)(LocalPlayer.minionDamage * (float)damage + num));
19275 toolTipLine[numLines] += Lang.tip[53].Value;
19276 }
19277 else
19278 {
19279 toolTipLine[numLines] = string.Concat(damage);
19280 toolTipLine[numLines] += Lang.tip[55].Value;
19281 }
19282 numLines++;
19283 if (item.melee)
19284 {
19285 int num3 = player[myPlayer].meleeCrit - player[myPlayer].inventory[player[myPlayer].selectedItem].crit + item.crit;
19286 toolTipLine[numLines] = num3 + Lang.tip[5].Value;
19287 numLines++;
19288 }
19289 else if (item.ranged)
19290 {
19291 int num4 = player[myPlayer].rangedCrit - player[myPlayer].inventory[player[myPlayer].selectedItem].crit + item.crit;
19292 toolTipLine[numLines] = num4 + Lang.tip[5].Value;
19293 numLines++;
19294 }
19295 else if (item.magic)
19296 {
19297 int num5 = player[myPlayer].magicCrit - player[myPlayer].inventory[player[myPlayer].selectedItem].crit + item.crit;
19298 toolTipLine[numLines] = num5 + Lang.tip[5].Value;
19299 numLines++;
19300 }
19301 if (item.useStyle != 0 && !item.summon)
19302 {
19303 if (item.useAnimation <= 8)
19304 {
19305 toolTipLine[numLines] = Lang.tip[6].Value;
19306 }
19307 else if (item.useAnimation <= 20)
19308 {
19309 toolTipLine[numLines] = Lang.tip[7].Value;
19310 }
19311 else if (item.useAnimation <= 25)
19312 {
19313 toolTipLine[numLines] = Lang.tip[8].Value;
19314 }
19315 else if (item.useAnimation <= 30)
19316 {
19317 toolTipLine[numLines] = Lang.tip[9].Value;
19318 }
19319 else if (item.useAnimation <= 35)
19320 {
19321 toolTipLine[numLines] = Lang.tip[10].Value;
19322 }
19323 else if (item.useAnimation <= 45)
19324 {
19325 toolTipLine[numLines] = Lang.tip[11].Value;
19326 }
19327 else if (item.useAnimation <= 55)
19328 {
19329 toolTipLine[numLines] = Lang.tip[12].Value;
19330 }
19331 else
19332 {
19333 toolTipLine[numLines] = Lang.tip[13].Value;
19334 }
19335 numLines++;
19336 }
19337 float num6 = item.knockBack;
19338 if (item.summon)
19339 {
19340 num6 += player[myPlayer].minionKB;
19341 }
19342 if ((player[myPlayer].magicQuiver && item.useAmmo == AmmoID.Arrow) || item.useAmmo == AmmoID.Stake)
19343 {
19344 num6 = (int)(num6 * 1.1f);
19345 }
19346 if (player[myPlayer].inventory[player[myPlayer].selectedItem].type == 3106 && item.type == 3106)
19347 {
19348 num6 += num6 * (1f - player[myPlayer].stealth);
19349 }
19350 if (num6 == 0f)
19351 {
19352 toolTipLine[numLines] = Lang.tip[14].Value;
19353 }
19354 else if ((double)num6 <= 1.5)
19355 {
19356 toolTipLine[numLines] = Lang.tip[15].Value;
19357 }
19358 else if (num6 <= 3f)
19359 {
19360 toolTipLine[numLines] = Lang.tip[16].Value;
19361 }
19362 else if (num6 <= 4f)
19363 {
19364 toolTipLine[numLines] = Lang.tip[17].Value;
19365 }
19366 else if (num6 <= 6f)
19367 {
19368 toolTipLine[numLines] = Lang.tip[18].Value;
19369 }
19370 else if (num6 <= 7f)
19371 {
19372 toolTipLine[numLines] = Lang.tip[19].Value;
19373 }
19374 else if (num6 <= 9f)
19375 {
19376 toolTipLine[numLines] = Lang.tip[20].Value;
19377 }
19378 else if (num6 <= 11f)
19379 {
19380 toolTipLine[numLines] = Lang.tip[21].Value;
19381 }
19382 else
19383 {
19384 toolTipLine[numLines] = Lang.tip[22].Value;
19385 }
19386 numLines++;
19387 }
19388 if (item.fishingPole > 0)
19389 {
19390 toolTipLine[numLines] = Language.GetTextValue("GameUI.PrecentFishingPower", item.fishingPole);
19391 numLines++;
19392 toolTipLine[numLines] = Language.GetTextValue("GameUI.BaitRequired");
19393 numLines++;
19394 }
19395 if (item.bait > 0)
19396 {
19397 toolTipLine[numLines] = Language.GetTextValue("GameUI.BaitPower", item.bait);
19398 numLines++;
19399 }
19400 if (item.headSlot > 0 || item.bodySlot > 0 || item.legSlot > 0 || item.accessory || projHook[item.shoot] || item.mountType != -1 || (item.buffType > 0 && (lightPet[item.buffType] || vanityPet[item.buffType])))
19401 {
19402 if ((item.type == 854 || item.type == 3035) && npcShop > 0)
19403 {
19404 toolTipLine[numLines] = Lang.tip[60].Value;
19405 }
19406 else
19407 {
19408 toolTipLine[numLines] = Lang.tip[23].Value;
19409 }
19410 numLines++;
19411 }
19412 if (item.tileWand > 0)
19413 {
19414 toolTipLine[numLines] = Lang.tip[52].Value + Lang.GetItemNameValue(item.tileWand);
19415 numLines++;
19416 }
19417 if (item.questItem)
19418 {
19419 toolTipLine[numLines] = Lang.inter[65].Value;
19420 numLines++;
19421 }
19422 if (item.vanity)
19423 {
19424 toolTipLine[numLines] = Lang.tip[24].Value;
19425 numLines++;
19426 }
19427 if (item.defense > 0)
19428 {
19429 toolTipLine[numLines] = item.defense + Lang.tip[25].Value;
19430 numLines++;
19431 }
19432 if (item.pick > 0)
19433 {
19434 toolTipLine[numLines] = item.pick + Lang.tip[26].Value;
19435 numLines++;
19436 }
19437 if (item.axe > 0)
19438 {
19439 toolTipLine[numLines] = item.axe * 5 + Lang.tip[27].Value;
19440 numLines++;
19441 }
19442 if (item.hammer > 0)
19443 {
19444 toolTipLine[numLines] = item.hammer + Lang.tip[28].Value;
19445 numLines++;
19446 }
19447 if (item.tileBoost != 0)
19448 {
19449 int tileBoost = item.tileBoost;
19450 if (tileBoost > 0)
19451 {
19452 toolTipLine[numLines] = "+" + tileBoost + Lang.tip[54].Value;
19453 }
19454 else
19455 {
19456 toolTipLine[numLines] = tileBoost + Lang.tip[54].Value;
19457 }
19458 numLines++;
19459 }
19460 if (item.healLife > 0)
19461 {
19462 if (item.type == 3001)
19463 {
19464 int healLife = item.healLife;
19465 int num7 = 120;
19466 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.RestoresLifeRange", healLife, num7);
19467 }
19468 else
19469 {
19470 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.RestoresLife", item.healLife);
19471 }
19472 numLines++;
19473 }
19474 if (item.healMana > 0)
19475 {
19476 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.RestoresMana", item.healMana);
19477 numLines++;
19478 }
19479 if (item.mana > 0 && (item.type != 127 || !player[myPlayer].spaceGun))
19480 {
19481 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.UsesMana", (int)((float)item.mana * player[myPlayer].manaCost));
19482 numLines++;
19483 }
19484 if (item.createWall > 0 || item.createTile > -1)
19485 {
19486 if (item.type != 213 && item.type != 5295 && item.tileWand < 1)
19487 {
19488 toolTipLine[numLines] = Lang.tip[33].Value;
19489 numLines++;
19490 }
19491 }
19492 else if (item.ammo > 0 && !item.notAmmo)
19493 {
19494 toolTipLine[numLines] = Lang.tip[34].Value;
19495 numLines++;
19496 }
19497 else if (item.consumable && !item.chlorophyteExtractinatorConsumable)
19498 {
19499 toolTipLine[numLines] = Lang.tip[35].Value;
19500 numLines++;
19501 }
19502 if (item.material)
19503 {
19504 toolTipLine[numLines] = Lang.tip[36].Value;
19505 numLines++;
19506 }
19507 if (item.ToolTip != null)
19508 {
19509 for (int i = 0; i < item.ToolTip.Lines; i++)
19510 {
19511 if (i == 0 && ItemID.Sets.UsesCursedByPlanteraTooltip[item.type] && !NPC.downedPlantBoss)
19512 {
19513 toolTipLine[numLines] = Lang.tip[59].Value;
19514 numLines++;
19515 }
19516 else
19517 {
19518 toolTipLine[numLines] = item.ToolTip.GetLine(i);
19519 numLines++;
19520 }
19521 }
19522 }
19523 if (tenthAnniversaryWorld && item.type == 238)
19524 {
19525 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.WizardHatDuringAnniversary");
19526 numLines++;
19527 }
19528 if (getGoodWorld && remixWorld)
19529 {
19530 if (item.type == 556 || item.type == 557 || item.type == 544)
19531 {
19532 numLines--;
19533 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.MechSummonDuringEverything");
19534 numLines++;
19535 }
19536 }
19537 else if (item.type == 5334)
19538 {
19539 numLines--;
19540 toolTipLine[numLines] = "";
19541 numLines--;
19542 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.MechdusaSummonNotDuringEverything");
19543 numLines++;
19544 }
19545 if ((item.type == 3818 || item.type == 3819 || item.type == 3820 || item.type == 3824 || item.type == 3825 || item.type == 3826 || item.type == 3829 || item.type == 3830 || item.type == 3831 || item.type == 3832 || item.type == 3833 || item.type == 3834) && !player[myPlayer].downedDD2EventAnyDifficulty)
19546 {
19547 toolTipLine[numLines] = Lang.misc[104].Value;
19548 numLines++;
19549 }
19550 if (item.buffType > 0 && BuffID.Sets.IsWellFed[item.buffType] && expertMode)
19551 {
19552 toolTipLine[numLines] = Lang.misc[40].Value;
19553 numLines++;
19554 }
19555 if (item.buffTime > 0)
19556 {
19557 string text = ((item.buffTime / 60 < 60) ? Language.GetTextValue("CommonItemTooltip.SecondDuration", Math.Round((double)item.buffTime / 60.0)) : Language.GetTextValue("CommonItemTooltip.MinuteDuration", Math.Round((double)(item.buffTime / 60) / 60.0)));
19559 numLines++;
19560 }
19561 if (item.type == 3262 || item.type == 3282 || item.type == 3283 || item.type == 3284 || item.type == 3285 || item.type == 3286 || item.type == 3316 || item.type == 3315 || item.type == 3317 || item.type == 3291 || item.type == 3389)
19562 {
19563 toolTipLine[numLines] = " ";
19565 numLines++;
19566 }
19567 if (item.prefix > 0)
19568 {
19570 if (item2 == null || item2.netID != item.netID)
19571 {
19572 item2 = new Item();
19573 item2.netDefaults(item.netID);
19574 }
19575 if (item2.damage != item.damage)
19576 {
19577 double num8 = (float)item.damage - (float)item2.damage;
19578 num8 = num8 / (double)item2.damage * 100.0;
19579 num8 = Math.Round(num8);
19580 if (num8 > 0.0)
19581 {
19582 toolTipLine[numLines] = "+" + num8 + Lang.tip[39].Value;
19583 }
19584 else
19585 {
19586 toolTipLine[numLines] = num8 + Lang.tip[39].Value;
19587 }
19588 if (num8 < 0.0)
19589 {
19590 badPreFixLine[numLines] = true;
19591 }
19592 preFixLine[numLines] = true;
19593 numLines++;
19594 }
19595 if (item2.useAnimation != item.useAnimation)
19596 {
19597 double num9 = (float)item.useAnimation - (float)item2.useAnimation;
19598 num9 = num9 / (double)item2.useAnimation * 100.0;
19599 num9 = Math.Round(num9);
19600 num9 *= -1.0;
19601 if (num9 > 0.0)
19602 {
19603 toolTipLine[numLines] = "+" + num9 + Lang.tip[40].Value;
19604 }
19605 else
19606 {
19607 toolTipLine[numLines] = num9 + Lang.tip[40].Value;
19608 }
19609 if (num9 < 0.0)
19610 {
19611 badPreFixLine[numLines] = true;
19612 }
19613 preFixLine[numLines] = true;
19614 numLines++;
19615 }
19616 if (item2.crit != item.crit)
19617 {
19618 double num10 = (float)item.crit - (float)item2.crit;
19619 if (num10 > 0.0)
19620 {
19621 toolTipLine[numLines] = "+" + num10 + Lang.tip[41].Value;
19622 }
19623 else
19624 {
19625 toolTipLine[numLines] = num10 + Lang.tip[41].Value;
19626 }
19627 if (num10 < 0.0)
19628 {
19629 badPreFixLine[numLines] = true;
19630 }
19631 preFixLine[numLines] = true;
19632 numLines++;
19633 }
19634 if (item2.mana != item.mana)
19635 {
19636 double num11 = (float)item.mana - (float)item2.mana;
19637 num11 = num11 / (double)item2.mana * 100.0;
19638 num11 = Math.Round(num11);
19639 if (num11 > 0.0)
19640 {
19641 toolTipLine[numLines] = "+" + num11 + Lang.tip[42].Value;
19642 }
19643 else
19644 {
19645 toolTipLine[numLines] = num11 + Lang.tip[42].Value;
19646 }
19647 if (num11 > 0.0)
19648 {
19649 badPreFixLine[numLines] = true;
19650 }
19651 preFixLine[numLines] = true;
19652 numLines++;
19653 }
19654 if (item2.scale != item.scale)
19655 {
19656 double num12 = item.scale - item2.scale;
19657 num12 = num12 / (double)item2.scale * 100.0;
19658 num12 = Math.Round(num12);
19659 if (num12 > 0.0)
19660 {
19661 toolTipLine[numLines] = "+" + num12 + Lang.tip[43].Value;
19662 }
19663 else
19664 {
19665 toolTipLine[numLines] = num12 + Lang.tip[43].Value;
19666 }
19667 if (num12 < 0.0)
19668 {
19669 badPreFixLine[numLines] = true;
19670 }
19671 preFixLine[numLines] = true;
19672 numLines++;
19673 }
19674 if (item2.shootSpeed != item.shootSpeed)
19675 {
19676 double num13 = item.shootSpeed - item2.shootSpeed;
19677 num13 = num13 / (double)item2.shootSpeed * 100.0;
19678 num13 = Math.Round(num13);
19679 if (num13 > 0.0)
19680 {
19681 toolTipLine[numLines] = "+" + num13 + Lang.tip[44].Value;
19682 }
19683 else
19684 {
19685 toolTipLine[numLines] = num13 + Lang.tip[44].Value;
19686 }
19687 if (num13 < 0.0)
19688 {
19689 badPreFixLine[numLines] = true;
19690 }
19691 preFixLine[numLines] = true;
19692 numLines++;
19693 }
19694 if (item2.knockBack != oldKB)
19695 {
19696 double num14 = oldKB - item2.knockBack;
19697 num14 = num14 / (double)item2.knockBack * 100.0;
19698 num14 = Math.Round(num14);
19699 if (num14 > 0.0)
19700 {
19701 toolTipLine[numLines] = "+" + num14 + Lang.tip[45].Value;
19702 }
19703 else
19704 {
19705 toolTipLine[numLines] = num14 + Lang.tip[45].Value;
19706 }
19707 if (num14 < 0.0)
19708 {
19709 badPreFixLine[numLines] = true;
19710 }
19711 preFixLine[numLines] = true;
19712 numLines++;
19713 }
19714 if (item.prefix == 62)
19715 {
19716 toolTipLine[numLines] = "+1" + Lang.tip[25].Value;
19717 preFixLine[numLines] = true;
19718 numLines++;
19719 }
19720 if (item.prefix == 63)
19721 {
19722 toolTipLine[numLines] = "+2" + Lang.tip[25].Value;
19723 preFixLine[numLines] = true;
19724 numLines++;
19725 }
19726 if (item.prefix == 64)
19727 {
19728 toolTipLine[numLines] = "+3" + Lang.tip[25].Value;
19729 preFixLine[numLines] = true;
19730 numLines++;
19731 }
19732 if (item.prefix == 65)
19733 {
19734 toolTipLine[numLines] = "+4" + Lang.tip[25].Value;
19735 preFixLine[numLines] = true;
19736 numLines++;
19737 }
19738 if (item.prefix == 66)
19739 {
19740 toolTipLine[numLines] = "+20 " + Lang.tip[31].Value;
19741 preFixLine[numLines] = true;
19742 numLines++;
19743 }
19744 if (item.prefix == 67)
19745 {
19746 toolTipLine[numLines] = "+2" + Lang.tip[5].Value;
19747 preFixLine[numLines] = true;
19748 numLines++;
19749 }
19750 if (item.prefix == 68)
19751 {
19752 toolTipLine[numLines] = "+4" + Lang.tip[5].Value;
19753 preFixLine[numLines] = true;
19754 numLines++;
19755 }
19756 if (item.prefix == 69)
19757 {
19758 toolTipLine[numLines] = "+1" + Lang.tip[39].Value;
19759 preFixLine[numLines] = true;
19760 numLines++;
19761 }
19762 if (item.prefix == 70)
19763 {
19764 toolTipLine[numLines] = "+2" + Lang.tip[39].Value;
19765 preFixLine[numLines] = true;
19766 numLines++;
19767 }
19768 if (item.prefix == 71)
19769 {
19770 toolTipLine[numLines] = "+3" + Lang.tip[39].Value;
19771 preFixLine[numLines] = true;
19772 numLines++;
19773 }
19774 if (item.prefix == 72)
19775 {
19776 toolTipLine[numLines] = "+4" + Lang.tip[39].Value;
19777 preFixLine[numLines] = true;
19778 numLines++;
19779 }
19780 if (item.prefix == 73)
19781 {
19782 toolTipLine[numLines] = "+1" + Lang.tip[46].Value;
19783 preFixLine[numLines] = true;
19784 numLines++;
19785 }
19786 if (item.prefix == 74)
19787 {
19788 toolTipLine[numLines] = "+2" + Lang.tip[46].Value;
19789 preFixLine[numLines] = true;
19790 numLines++;
19791 }
19792 if (item.prefix == 75)
19793 {
19794 toolTipLine[numLines] = "+3" + Lang.tip[46].Value;
19795 preFixLine[numLines] = true;
19796 numLines++;
19797 }
19798 if (item.prefix == 76)
19799 {
19800 toolTipLine[numLines] = "+4" + Lang.tip[46].Value;
19801 preFixLine[numLines] = true;
19802 numLines++;
19803 }
19804 if (item.prefix == 77)
19805 {
19806 toolTipLine[numLines] = "+1" + Lang.tip[47].Value;
19807 preFixLine[numLines] = true;
19808 numLines++;
19809 }
19810 if (item.prefix == 78)
19811 {
19812 toolTipLine[numLines] = "+2" + Lang.tip[47].Value;
19813 preFixLine[numLines] = true;
19814 numLines++;
19815 }
19816 if (item.prefix == 79)
19817 {
19818 toolTipLine[numLines] = "+3" + Lang.tip[47].Value;
19819 preFixLine[numLines] = true;
19820 numLines++;
19821 }
19822 if (item.prefix == 80)
19823 {
19824 toolTipLine[numLines] = "+4" + Lang.tip[47].Value;
19825 preFixLine[numLines] = true;
19826 numLines++;
19827 }
19828 }
19829 if (item.wornArmor && player[myPlayer].setBonus != "")
19830 {
19831 toolTipLine[numLines] = Lang.tip[48].Value + " " + player[myPlayer].setBonus;
19832 numLines++;
19833 }
19834 }
19835 if (item.expert)
19836 {
19837 toolTipLine[numLines] = Language.GetTextValue("GameUI.Expert");
19838 numLines++;
19839 }
19840 if (item.rare == -13)
19841 {
19842 toolTipLine[numLines] = Language.GetTextValue("GameUI.Master");
19843 numLines++;
19844 }
19845 if ((item.tooltipContext == 0 || item.tooltipContext == 2 || item.tooltipContext == 1 || item.tooltipContext == 3 || item.tooltipContext == 4 || item.tooltipContext == 32 || item.tooltipContext == 15 || item.tooltipContext == 6 || item.tooltipContext == 22 || item.tooltipContext == 7 || item.tooltipContext == 5) && LocalPlayer.difficulty == 3 && CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(item.type, out var amountNeeded))
19846 {
19847 int sacrificeCount = LocalPlayerCreativeTracker.ItemSacrifices.GetSacrificeCount(item.type);
19848 if (amountNeeded - sacrificeCount > 0)
19849 {
19850 toolTipLine[numLines] = Language.GetTextValue("CommonItemTooltip.CreativeSacrificeNeeded", amountNeeded - sacrificeCount);
19852 numLines++;
19853 }
19854 }
19855 string bestiaryNotes = item.BestiaryNotes;
19856 if (!string.IsNullOrWhiteSpace(bestiaryNotes))
19857 {
19858 string[] array = bestiaryNotes.Split('\n');
19859 foreach (string text2 in array)
19860 {
19862 }
19863 }
19864 }
static decimal Round(decimal d)
Definition Math.cs:1096
static int Bullet
Definition AmmoID.cs:114
static int Sand
Definition AmmoID.cs:116
static int CandyCorn
Definition AmmoID.cs:130
static int Flare
Definition AmmoID.cs:124
static int Dart
Definition AmmoID.cs:118
static int FallenStar
Definition AmmoID.cs:112
static int Gel
Definition AmmoID.cs:106
static int Arrow
Definition AmmoID.cs:108
static int Rocket
Definition AmmoID.cs:120
static int Snowball
Definition AmmoID.cs:126
static int Coin
Definition AmmoID.cs:110
static int JackOLantern
Definition AmmoID.cs:132
static int StyngerBolt
Definition AmmoID.cs:128
static int Stake
Definition AmmoID.cs:134
static int NailFriendly
Definition AmmoID.cs:136
static bool[] IsWellFed
Definition BuffID.cs:18
static bool[] UsesCursedByPlanteraTooltip
Definition ItemID.cs:128
static float[] ToolTipDamageMultiplier
Definition ItemID.cs:221
static string GetTextValue(string key)
Definition Language.cs:15
static CreativeUnlocksTracker LocalPlayerCreativeTracker
Definition Main.cs:2831
static bool[] vanityPet
Definition Main.cs:778
static Item[] item
Definition Main.cs:1681
static int myPlayer
Definition Main.cs:1801
static bool expertMode
Definition Main.cs:2737
static Item tooltipPrefixComparisonItem
Definition Main.cs:2385
static bool getGoodWorld
Definition Main.cs:341
static bool[] lightPet
Definition Main.cs:780
static int npcShop
Definition Main.cs:2833
static bool tenthAnniversaryWorld
Definition Main.cs:343
static Player LocalPlayer
Definition Main.cs:2829
static Player[] player
Definition Main.cs:1803
static bool[] projHook
Definition Main.cs:772
static bool remixWorld
Definition Main.cs:349
static bool IsBlockedFromTransferIntoChest(Item item, Item[] container)
Definition ChestUI.cs:1380
static void GetContainerUsageInfo(out bool sync, out Item[] chestinv)
Definition ChestUI.cs:1352

References System.array, Terraria.ID.AmmoID.Arrow, Terraria.ID.AmmoID.Bullet, Terraria.ID.AmmoID.CandyCorn, Terraria.ID.AmmoID.Coin, Terraria.ID.AmmoID.Dart, Terraria.NPC.downedPlantBoss, System.E, Terraria.Main.expertMode, Terraria.ID.AmmoID.FallenStar, Terraria.ID.AmmoID.Flare, Terraria.ID.AmmoID.Gel, Terraria.UI.ChestUI.GetContainerUsageInfo(), Terraria.Main.getGoodWorld, Terraria.Lang.GetItemNameValue(), Terraria.Localization.Language.GetTextValue(), System.Text.RegularExpressions.i, Terraria.GameContent.Creative.CreativeItemSacrificesCatalog.Instance, Terraria.Lang.inter, Terraria.UI.ChestUI.IsBlockedFromTransferIntoChest(), Terraria.ID.BuffID.Sets.IsWellFed, Terraria.Main.item, Terraria.ID.AmmoID.JackOLantern, Terraria.Main.lightPet, Terraria.Main.LocalPlayer, Terraria.Main.LocalPlayerCreativeTracker, Terraria.Lang.misc, Terraria.Main.myPlayer, Terraria.ID.AmmoID.NailFriendly, Terraria.Main.npcShop, Terraria.Main.player, Terraria.Main.projHook, Terraria.Main.remixWorld, Terraria.ID.AmmoID.Rocket, System.Math.Round(), Terraria.ID.AmmoID.Sand, Terraria.ID.AmmoID.Snowball, Terraria.ID.AmmoID.Stake, Terraria.ID.AmmoID.StyngerBolt, Terraria.Main.tenthAnniversaryWorld, System.text, Terraria.Lang.tip, Terraria.ID.ItemID.Sets.ToolTipDamageMultiplier, Terraria.Main.tooltipPrefixComparisonItem, System.type, Terraria.ID.ItemID.Sets.UsesCursedByPlanteraTooltip, and Terraria.Main.vanityPet.

Referenced by Terraria.GameContent.Creative.ItemFilters.BySearch.FitsFilter(), and Terraria.Main.MouseText_DrawItemTooltip().