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

◆ ApplyEquipFunctional()

void Terraria.Player.ApplyEquipFunctional ( int itemSlot,
Item currentItem )
inlineprivate

Definition at line 13611 of file Player.cs.

13612 {
13613 if (currentItem.expertOnly && !Main.expertMode)
13614 {
13615 return;
13616 }
13617 if (currentItem.type == 3810 || currentItem.type == 3809 || currentItem.type == 3812 || currentItem.type == 3811)
13618 {
13619 dd2Accessory = true;
13620 }
13622 {
13625 }
13626 switch (currentItem.type)
13627 {
13628 case 4056:
13629 chiselSpeed = true;
13630 break;
13631 case 3990:
13632 accRunSpeed = 6f;
13633 autoJump = true;
13634 jumpSpeedBoost += 1.6f;
13635 extraFall += 10;
13636 break;
13637 case 3991:
13638 manaFlower = true;
13639 manaCost -= 0.08f;
13640 aggro -= 400;
13641 break;
13642 case 3992:
13643 kbGlove = true;
13644 autoReuseGlove = true;
13645 meleeScaleGlove = true;
13646 meleeSpeed += 0.12f;
13647 aggro += 400;
13648 break;
13649 case 3993:
13650 accRunSpeed = 6f;
13652 break;
13653 case 4055:
13654 accRunSpeed = 6f;
13655 desertBoots = true;
13656 break;
13657 case 3994:
13658 autoJump = true;
13659 jumpSpeedBoost += 1.6f;
13660 extraFall += 10;
13661 accFlipper = true;
13662 break;
13663 case 3995:
13664 autoJump = true;
13665 jumpSpeedBoost += 1.6f;
13666 extraFall += 10;
13667 accFlipper = true;
13668 spikedBoots += 2;
13669 break;
13670 case 3996:
13671 autoJump = true;
13672 jumpSpeedBoost += 1.6f;
13673 extraFall += 10;
13674 spikedBoots += 2;
13675 break;
13676 case 3998:
13677 aggro += 400;
13678 break;
13679 case 4038:
13680 fireWalk = true;
13681 break;
13682 case 4003:
13683 fireWalk = true;
13684 lavaRose = true;
13685 break;
13686 case 4000:
13687 manaFlower = true;
13688 manaCost -= 0.08f;
13689 manaMagnet = true;
13690 break;
13691 case 4001:
13692 manaFlower = true;
13693 manaCost -= 0.08f;
13696 break;
13697 case 4002:
13698 magicQuiver = true;
13700 hasMoltenQuiver = true;
13701 break;
13702 case 4004:
13703 fireWalk = true;
13704 lavaRose = true;
13705 break;
13706 case 3999:
13707 fireWalk = true;
13708 break;
13709 case 4005:
13710 rangedCrit += 10;
13711 rangedDamage += 0.1f;
13712 aggro -= 400;
13713 break;
13714 case 4006:
13715 aggro -= 400;
13716 magicQuiver = true;
13718 break;
13719 case 4007:
13721 armorPenetration += 5;
13722 break;
13723 case 4341:
13724 case 5126:
13725 portableStoolInfo.SetStats(26, 26, 26);
13726 break;
13727 case 4409:
13728 CanSeeInvisibleBlocks = true;
13729 break;
13730 case 5010:
13731 treasureMagnet = true;
13732 break;
13733 case 3245:
13735 break;
13736 case 5107:
13737 hasMagiluminescence = true;
13738 MountedCenter.ToTileCoordinates();
13739 DelegateMethods.v3_1 = new Vector3(0.9f, 0.8f, 0.5f);
13740 Utils.PlotTileLine(base.Center, base.Center + velocity * 6f, 20f, DelegateMethods.CastLightOpen);
13741 Utils.PlotTileLine(base.Left, base.Right, 20f, DelegateMethods.CastLightOpen);
13742 break;
13743 }
13744 if (currentItem.type == 3015)
13745 {
13746 aggro -= 400;
13747 meleeCrit += 5;
13748 magicCrit += 5;
13749 rangedCrit += 5;
13750 meleeDamage += 0.05f;
13751 magicDamage += 0.05f;
13752 rangedDamage += 0.05f;
13753 minionDamage += 0.05f;
13754 }
13755 if (currentItem.type == 3016)
13756 {
13757 aggro += 400;
13758 }
13759 if (currentItem.type == 2373)
13760 {
13761 accFishingLine = true;
13762 }
13763 if (currentItem.type == 2374)
13764 {
13765 fishingSkill += 10;
13766 }
13767 if (currentItem.type == 5139 || currentItem.type == 5144 || currentItem.type == 5142 || currentItem.type == 5141 || currentItem.type == 5146 || currentItem.type == 5140 || currentItem.type == 5145 || currentItem.type == 5143)
13768 {
13769 accFishingBobber = true;
13770 }
13771 if (currentItem.type == 2375)
13772 {
13773 accTackleBox = true;
13774 }
13775 if (currentItem.type == 4881)
13776 {
13777 accLavaFishing = true;
13778 }
13779 if (currentItem.type == 3721)
13780 {
13781 accFishingLine = true;
13782 accTackleBox = true;
13783 fishingSkill += 10;
13784 }
13785 if (currentItem.type == 5064)
13786 {
13787 accFishingLine = true;
13788 accTackleBox = true;
13789 fishingSkill += 10;
13790 accLavaFishing = true;
13791 }
13792 if (currentItem.type == 3090)
13793 {
13794 npcTypeNoAggro[1] = true;
13795 npcTypeNoAggro[16] = true;
13796 npcTypeNoAggro[59] = true;
13797 npcTypeNoAggro[71] = true;
13798 npcTypeNoAggro[81] = true;
13799 npcTypeNoAggro[138] = true;
13800 npcTypeNoAggro[121] = true;
13801 npcTypeNoAggro[122] = true;
13802 npcTypeNoAggro[141] = true;
13803 npcTypeNoAggro[147] = true;
13804 npcTypeNoAggro[183] = true;
13805 npcTypeNoAggro[184] = true;
13806 npcTypeNoAggro[204] = true;
13807 npcTypeNoAggro[225] = true;
13808 npcTypeNoAggro[244] = true;
13809 npcTypeNoAggro[302] = true;
13810 npcTypeNoAggro[333] = true;
13811 npcTypeNoAggro[335] = true;
13812 npcTypeNoAggro[334] = true;
13813 npcTypeNoAggro[336] = true;
13814 npcTypeNoAggro[537] = true;
13815 npcTypeNoAggro[676] = true;
13816 npcTypeNoAggro[667] = true;
13817 }
13818 if (currentItem.stringColor > 0)
13819 {
13820 yoyoString = true;
13821 }
13822 if (currentItem.type == 3366)
13823 {
13824 counterWeight = 556 + Main.rand.Next(6);
13825 yoyoGlove = true;
13826 yoyoString = true;
13827 }
13828 if (currentItem.type >= 3309 && currentItem.type <= 3314)
13829 {
13830 counterWeight = 556 + currentItem.type - 3309;
13831 }
13832 if (currentItem.type == 3334)
13833 {
13834 yoyoGlove = true;
13835 }
13836 if (currentItem.type == 3337)
13837 {
13838 shinyStone = true;
13839 }
13840 if (currentItem.type == 4989)
13841 {
13842 empressBrooch = true;
13843 moveSpeed += 0.075f;
13844 }
13845 if (currentItem.type == 3336)
13846 {
13848 sporeSac = true;
13849 }
13850 if (currentItem.type == 4987)
13851 {
13853 volatileGelatin = true;
13854 }
13855 switch (currentItem.type)
13856 {
13857 case 3538:
13859 break;
13860 case 3537:
13861 nebulaMonolithShader = true;
13862 break;
13863 case 3536:
13864 vortexMonolithShader = true;
13865 break;
13866 case 3539:
13867 solarMonolithShader = true;
13868 break;
13869 case 4318:
13871 break;
13872 case 4054:
13874 break;
13875 case 5345:
13876 CanSeeInvisibleBlocks = true;
13877 break;
13878 case 5347:
13879 shimmerMonolithShader = true;
13880 break;
13881 }
13882 if (currentItem.type == 5113)
13883 {
13885 }
13886 if (currentItem.type == 2423)
13887 {
13888 autoJump = true;
13889 jumpSpeedBoost += 1.6f;
13890 extraFall += 10;
13891 }
13892 if (currentItem.type == 857)
13893 {
13895 }
13896 if (currentItem.type == 983)
13897 {
13899 jumpBoost = true;
13900 }
13901 if (currentItem.type == 987)
13902 {
13904 }
13905 if (currentItem.type == 1163)
13906 {
13908 jumpBoost = true;
13909 }
13910 if (currentItem.type == 1724)
13911 {
13912 hasJumpOption_Fart = true;
13913 }
13914 if (currentItem.type == 1863)
13915 {
13916 hasJumpOption_Fart = true;
13917 jumpBoost = true;
13918 }
13919 if (currentItem.type == 1164)
13920 {
13921 hasJumpOption_Cloud = true;
13924 jumpBoost = true;
13925 }
13926 if (currentItem.type == 5331)
13927 {
13928 hasJumpOption_Cloud = true;
13931 jumpBoost = true;
13932 noFallDmg = true;
13934 }
13935 if (currentItem.type == 1250)
13936 {
13937 jumpBoost = true;
13938 hasJumpOption_Cloud = true;
13939 noFallDmg = true;
13941 }
13942 if (currentItem.type == 1252)
13943 {
13945 jumpBoost = true;
13946 noFallDmg = true;
13948 }
13949 if (currentItem.type == 1251)
13950 {
13952 jumpBoost = true;
13953 noFallDmg = true;
13955 }
13956 if (currentItem.type == 3250)
13957 {
13958 hasJumpOption_Fart = true;
13959 jumpBoost = true;
13960 noFallDmg = true;
13962 }
13963 if (currentItem.type == 3252)
13964 {
13965 hasJumpOption_Sail = true;
13966 jumpBoost = true;
13967 noFallDmg = true;
13969 }
13970 if (currentItem.type == 3251)
13971 {
13972 jumpBoost = true;
13974 noFallDmg = true;
13976 }
13977 if (currentItem.type == 1249)
13978 {
13979 jumpBoost = true;
13981 }
13982 if (currentItem.type == 3241)
13983 {
13984 jumpBoost = true;
13985 hasJumpOption_Sail = true;
13986 }
13987 if ((currentItem.type == 1253 || currentItem.type == 3997) && (double)statLife <= (double)statLifeMax2 * 0.5)
13988 {
13989 AddBuff(62, 5);
13990 }
13991 if (currentItem.type == 1290)
13992 {
13993 panic = true;
13994 }
13996 {
13997 scope = true;
13998 }
13999 if (currentItem.type == 1858)
14000 {
14001 rangedCrit += 10;
14002 rangedDamage += 0.1f;
14003 }
14004 if (currentItem.type == 1301)
14005 {
14006 meleeCrit += 8;
14007 rangedCrit += 8;
14008 magicCrit += 8;
14009 meleeDamage += 0.1f;
14010 rangedDamage += 0.1f;
14011 magicDamage += 0.1f;
14012 minionDamage += 0.1f;
14013 }
14014 if (currentItem.type == 111)
14015 {
14016 statManaMax2 += 20;
14017 }
14018 if (currentItem.type == 982)
14019 {
14020 statManaMax2 += 20;
14021 manaRegenDelayBonus += 1f;
14022 manaRegenBonus += 25;
14023 }
14024 if (currentItem.type == 1595)
14025 {
14026 statManaMax2 += 20;
14027 magicCuffs = true;
14028 }
14029 if (currentItem.type == 2219)
14030 {
14031 manaMagnet = true;
14032 }
14033 if (currentItem.type == 2220)
14034 {
14035 manaMagnet = true;
14036 magicDamage += 0.15f;
14037 }
14038 if (currentItem.type == 2221)
14039 {
14040 manaMagnet = true;
14041 statManaMax2 += 20;
14042 magicCuffs = true;
14043 }
14044 if (whoAmI == Main.myPlayer && currentItem.type == 1923)
14045 {
14046 tileRangeX++;
14047 tileRangeY++;
14048 }
14049 if (currentItem.type == 1247)
14050 {
14054 }
14055 if (currentItem.type == 1248)
14056 {
14057 meleeCrit += 10;
14058 rangedCrit += 10;
14059 magicCrit += 10;
14060 }
14061 if (currentItem.type == 854)
14062 {
14063 discountEquipped = true;
14064 }
14065 if (currentItem.type == 855)
14066 {
14067 hasLuckyCoin = true;
14068 hasLuck_LuckyCoin = true;
14069 }
14070 if (currentItem.type == 3033)
14071 {
14072 goldRing = true;
14073 }
14074 if (currentItem.type == 3034)
14075 {
14076 goldRing = true;
14077 hasLuckyCoin = true;
14078 hasLuck_LuckyCoin = true;
14079 }
14080 if (currentItem.type == 3035)
14081 {
14082 goldRing = true;
14083 hasLuckyCoin = true;
14084 hasLuck_LuckyCoin = true;
14085 discountEquipped = true;
14086 }
14087 if (currentItem.type == 53)
14088 {
14089 hasJumpOption_Cloud = true;
14090 }
14091 if (currentItem.type == 3201)
14092 {
14093 hasJumpOption_Sail = true;
14094 }
14095 if (currentItem.type == 54)
14096 {
14097 accRunSpeed = 6f;
14098 }
14099 if (currentItem.type == 3068)
14100 {
14101 cordage = true;
14102 }
14103 if (currentItem.type == 1579)
14104 {
14105 accRunSpeed = 6f;
14106 }
14107 if (currentItem.type == 3200)
14108 {
14109 accRunSpeed = 6f;
14110 }
14111 if (currentItem.type == 128)
14112 {
14114 }
14115 if (currentItem.type == 156)
14116 {
14117 noKnockback = true;
14118 }
14119 if (currentItem.type == 158)
14120 {
14121 noFallDmg = true;
14123 }
14124 if (currentItem.type == 934)
14125 {
14126 carpet = true;
14127 }
14128 if (currentItem.type == 953)
14129 {
14130 spikedBoots++;
14131 }
14132 if (currentItem.type == 975)
14133 {
14134 spikedBoots++;
14135 }
14136 if (currentItem.type == 976)
14137 {
14138 spikedBoots += 2;
14139 }
14140 if (currentItem.type == 977)
14141 {
14142 dashType = 1;
14143 }
14144 if (currentItem.type == 3097)
14145 {
14146 dashType = 2;
14147 }
14148 if (currentItem.type == 963)
14149 {
14150 blackBelt = true;
14151 }
14152 if (currentItem.type == 984)
14153 {
14154 blackBelt = true;
14155 dashType = 1;
14156 spikedBoots = 2;
14157 }
14158 if (currentItem.type == 1131)
14159 {
14160 gravControl2 = true;
14161 }
14162 if (currentItem.type == 1132)
14163 {
14165 }
14166 if (currentItem.type == 1578)
14167 {
14169 panic = true;
14170 }
14171 if (currentItem.type == 3224)
14172 {
14173 endurance += 0.17f;
14174 }
14175 if (currentItem.type == 3223)
14176 {
14178 }
14179 if (currentItem.type == 950)
14180 {
14181 iceSkate = true;
14182 }
14183 if (currentItem.type == 159)
14184 {
14185 jumpBoost = true;
14186 }
14187 if (currentItem.type == 3225)
14188 {
14189 jumpBoost = true;
14190 }
14191 if (currentItem.type == 187)
14192 {
14193 accFlipper = true;
14194 }
14195 if (currentItem.type == 211)
14196 {
14197 autoReuseGlove = true;
14198 meleeSpeed += 0.12f;
14199 }
14200 if (currentItem.type == 223)
14201 {
14202 manaCost -= 0.06f;
14203 }
14204 if (currentItem.type == 285)
14205 {
14206 moveSpeed += 0.05f;
14207 }
14208 if (currentItem.type == 212)
14209 {
14210 moveSpeed += 0.1f;
14211 }
14212 if (currentItem.type == 267)
14213 {
14214 killGuide = true;
14215 }
14216 if (currentItem.type == 1307)
14217 {
14218 killClothier = true;
14219 }
14220 if (currentItem.type == 193)
14221 {
14222 fireWalk = true;
14223 }
14224 if (currentItem.type == 861)
14225 {
14226 accMerman = true;
14227 wolfAcc = true;
14229 {
14230 hideMerman = true;
14231 hideWolf = true;
14232 }
14233 }
14234 if (currentItem.type == 862)
14235 {
14237 longInvince = true;
14239 }
14240 if (currentItem.type == 860)
14241 {
14242 pStone = true;
14243 }
14244 if (currentItem.type == 863)
14245 {
14246 waterWalk2 = true;
14247 }
14248 if (currentItem.type == 907)
14249 {
14250 waterWalk2 = true;
14251 fireWalk = true;
14252 }
14253 if (currentItem.type == 5044)
14254 {
14256 }
14257 if (currentItem.type == 908 || currentItem.type == 5000)
14258 {
14259 waterWalk = true;
14260 fireWalk = true;
14261 lavaMax += 420;
14262 lavaRose = true;
14263 }
14264 if ((!mount.Active || mount.Type != 47) && !hideVisibleAccessory[itemSlot] && (currentItem.type == 4822 || currentItem.type == 4874))
14265 {
14267 }
14268 if (currentItem.type == 906 || currentItem.type == 4038 || currentItem.type == 3999 || currentItem.type == 4003)
14269 {
14270 lavaMax += 420;
14271 }
14272 if (currentItem.type == 485)
14273 {
14274 wolfAcc = true;
14276 {
14277 hideWolf = true;
14278 }
14279 }
14280 if (currentItem.type == 486)
14281 {
14282 rulerLine = true;
14283 }
14284 if (currentItem.type == 2799)
14285 {
14286 rulerGrid = true;
14287 }
14288 if (currentItem.type == 394)
14289 {
14290 accFlipper = true;
14291 accDivingHelm = true;
14292 }
14293 if (currentItem.type == 396)
14294 {
14295 noFallDmg = true;
14296 fireWalk = true;
14298 }
14299 if (currentItem.type == 397)
14300 {
14301 noKnockback = true;
14302 fireWalk = true;
14303 }
14304 if (currentItem.type == 399)
14305 {
14306 jumpBoost = true;
14307 hasJumpOption_Cloud = true;
14308 }
14309 if (currentItem.type == 405)
14310 {
14311 accRunSpeed = 6f;
14313 }
14314 if (currentItem.type == 1303)
14315 {
14316 if (!wet)
14317 {
14318 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 0.225f, 0.05f, 0.15f);
14319 }
14320 if (wet)
14321 {
14322 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 1.8f, 0.4f, 1.2f);
14323 }
14324 }
14325 if (currentItem.type == 1860)
14326 {
14327 accFlipper = true;
14328 accDivingHelm = true;
14329 if (!wet)
14330 {
14331 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 0.225f, 0.05f, 0.15f);
14332 }
14333 if (wet)
14334 {
14335 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 1.8f, 0.4f, 1.2f);
14336 }
14337 }
14338 if (currentItem.type == 1861)
14339 {
14340 arcticDivingGear = true;
14341 accFlipper = true;
14342 accDivingHelm = true;
14343 iceSkate = true;
14344 if (!wet)
14345 {
14346 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 0.05f, 0.15f, 0.225f);
14347 }
14348 if (wet)
14349 {
14350 Lighting.AddLight((int)base.Center.X / 16, (int)base.Center.Y / 16, 0.4f, 1.2f, 1.8f);
14351 }
14352 }
14353 if (currentItem.type == 2214)
14354 {
14356 }
14357 if (currentItem.type == 2215)
14358 {
14360 }
14361 if (currentItem.type == 2216)
14362 {
14363 autoPaint = true;
14364 }
14365 if (currentItem.type == 2217)
14366 {
14368 }
14369 if (currentItem.type == 3061)
14370 {
14373 autoPaint = true;
14375 }
14376 if (currentItem.type == 5126)
14377 {
14380 autoPaint = true;
14382 treasureMagnet = true;
14383 chiselSpeed = true;
14384 }
14385 if (currentItem.type == 3624)
14386 {
14387 autoActuator = true;
14388 }
14389 if (currentItem.type == 897)
14390 {
14391 kbGlove = true;
14392 autoReuseGlove = true;
14393 meleeScaleGlove = true;
14394 meleeSpeed += 0.12f;
14395 }
14396 if (currentItem.type == 1343)
14397 {
14398 kbGlove = true;
14399 autoReuseGlove = true;
14400 meleeScaleGlove = true;
14401 meleeSpeed += 0.12f;
14402 meleeDamage += 0.12f;
14403 magmaStone = true;
14404 }
14405 if (currentItem.type == 1167)
14406 {
14407 minionKB += 2f;
14408 minionDamage += 0.15f;
14409 }
14410 if (currentItem.type == 1864)
14411 {
14412 minionKB += 2f;
14413 minionDamage += 0.15f;
14414 maxMinions++;
14415 }
14416 if (currentItem.type == 1845)
14417 {
14418 minionDamage += 0.1f;
14419 maxMinions++;
14420 }
14421 if (currentItem.type == 1321)
14422 {
14423 magicQuiver = true;
14425 }
14426 if (currentItem.type == 1322)
14427 {
14428 magmaStone = true;
14429 }
14430 if (currentItem.type == 1323)
14431 {
14432 lavaRose = true;
14433 }
14434 if (currentItem.type == 3333)
14435 {
14436 strongBees = true;
14437 }
14438 if (currentItem.type == 938 || currentItem.type == 3997 || currentItem.type == 3998)
14439 {
14440 noKnockback = true;
14441 if ((float)statLife > (float)statLifeMax2 * 0.25f)
14442 {
14443 hasPaladinShield = true;
14444 if (whoAmI != Main.myPlayer && miscCounter % 10 == 0)
14445 {
14446 int myPlayer = Main.myPlayer;
14447 if (Main.player[myPlayer].team == team && team != 0)
14448 {
14449 float num = position.X - Main.player[myPlayer].position.X;
14450 float num2 = position.Y - Main.player[myPlayer].position.Y;
14451 if ((float)Math.Sqrt(num * num + num2 * num2) < 800f)
14452 {
14453 Main.player[myPlayer].AddBuff(43, 20);
14454 }
14455 }
14456 }
14457 }
14458 }
14459 if (currentItem.type == 936)
14460 {
14461 kbGlove = true;
14462 autoReuseGlove = true;
14463 meleeScaleGlove = true;
14464 meleeSpeed += 0.12f;
14465 meleeDamage += 0.12f;
14466 }
14467 if (currentItem.type == 898)
14468 {
14469 accRunSpeed = 6.75f;
14471 moveSpeed += 0.08f;
14472 }
14473 if (currentItem.type == 1862)
14474 {
14475 accRunSpeed = 6.75f;
14477 moveSpeed += 0.08f;
14478 iceSkate = true;
14479 }
14480 if (currentItem.type == 5000)
14481 {
14482 accRunSpeed = 6.75f;
14484 moveSpeed += 0.08f;
14485 iceSkate = true;
14486 }
14487 if (currentItem.type == 4874)
14488 {
14489 accRunSpeed = 6f;
14491 }
14492 if (currentItem.type == 3110)
14493 {
14494 accMerman = true;
14495 wolfAcc = true;
14497 {
14498 hideMerman = true;
14499 hideWolf = true;
14500 }
14501 }
14502 if (currentItem.type == 1865 || currentItem.type == 3110)
14503 {
14504 skyStoneEffects = true;
14505 }
14506 if (currentItem.type == 899 && Main.dayTime)
14507 {
14508 skyStoneEffects = true;
14509 }
14510 if (currentItem.type == 900 && (!Main.dayTime || Main.eclipse))
14511 {
14512 skyStoneEffects = true;
14513 }
14514 if (currentItem.type == 407)
14515 {
14516 blockRange++;
14517 }
14518 if (currentItem.type == 489)
14519 {
14520 magicDamage += 0.15f;
14521 }
14522 if (currentItem.type == 490)
14523 {
14524 meleeDamage += 0.15f;
14525 }
14526 if (currentItem.type == 491)
14527 {
14528 rangedDamage += 0.15f;
14529 }
14530 if (currentItem.type == 2998)
14531 {
14532 minionDamage += 0.15f;
14533 }
14534 if (currentItem.type == 935)
14535 {
14536 magicDamage += 0.12f;
14537 meleeDamage += 0.12f;
14538 rangedDamage += 0.12f;
14539 minionDamage += 0.12f;
14540 }
14541 if (currentItem.wingSlot != -1)
14542 {
14544 }
14545 if (currentItem.wingSlot == 26)
14546 {
14547 ignoreWater = true;
14548 }
14549 if (currentItem.type == 5452)
14550 {
14551 remoteVisionForDrone = true;
14552 }
14553 if (currentItem.type == 885)
14554 {
14555 buffImmune[30] = true;
14556 }
14557 if (currentItem.type == 886)
14558 {
14559 buffImmune[36] = true;
14560 }
14561 if (currentItem.type == 887)
14562 {
14563 buffImmune[20] = true;
14564 }
14565 if (currentItem.type == 888)
14566 {
14567 buffImmune[22] = true;
14568 }
14569 if (currentItem.type == 889)
14570 {
14571 buffImmune[32] = true;
14572 }
14573 if (currentItem.type == 890)
14574 {
14575 buffImmune[35] = true;
14576 }
14577 if (currentItem.type == 891)
14578 {
14579 buffImmune[23] = true;
14580 }
14581 if (currentItem.type == 892)
14582 {
14583 buffImmune[33] = true;
14584 }
14585 if (currentItem.type == 893)
14586 {
14587 buffImmune[31] = true;
14588 }
14589 if (currentItem.type == 3781)
14590 {
14591 buffImmune[156] = true;
14592 }
14593 if (currentItem.type == 901)
14594 {
14595 buffImmune[33] = true;
14596 buffImmune[36] = true;
14597 }
14598 if (currentItem.type == 902)
14599 {
14600 buffImmune[30] = true;
14601 buffImmune[20] = true;
14602 }
14603 if (currentItem.type == 903)
14604 {
14605 buffImmune[32] = true;
14606 buffImmune[31] = true;
14607 }
14608 if (currentItem.type == 904)
14609 {
14610 buffImmune[35] = true;
14611 buffImmune[23] = true;
14612 }
14613 if (currentItem.type == 5354)
14614 {
14615 buffImmune[22] = true;
14616 buffImmune[156] = true;
14617 }
14618 if (currentItem.type == 5355 && !controlDownHold)
14619 {
14620 shimmerImmune = true;
14621 }
14622 if (currentItem.type == 1921)
14623 {
14624 buffImmune[46] = true;
14625 buffImmune[47] = true;
14626 }
14627 if (currentItem.type == 1612)
14628 {
14629 buffImmune[33] = true;
14630 buffImmune[36] = true;
14631 buffImmune[30] = true;
14632 buffImmune[20] = true;
14633 buffImmune[32] = true;
14634 buffImmune[31] = true;
14635 buffImmune[35] = true;
14636 buffImmune[23] = true;
14637 buffImmune[22] = true;
14638 buffImmune[156] = true;
14639 }
14640 if (currentItem.type == 1613)
14641 {
14642 buffImmune[46] = true;
14643 noKnockback = true;
14644 fireWalk = true;
14645 buffImmune[33] = true;
14646 buffImmune[36] = true;
14647 buffImmune[30] = true;
14648 buffImmune[20] = true;
14649 buffImmune[32] = true;
14650 buffImmune[31] = true;
14651 buffImmune[35] = true;
14652 buffImmune[23] = true;
14653 buffImmune[22] = true;
14654 buffImmune[156] = true;
14655 }
14656 if (currentItem.type == 497)
14657 {
14658 accMerman = true;
14660 {
14661 hideMerman = true;
14662 }
14663 }
14664 if (currentItem.type == 535)
14665 {
14666 pStone = true;
14667 }
14668 if (currentItem.type == 536)
14669 {
14670 kbGlove = true;
14671 meleeScaleGlove = true;
14672 }
14673 if (currentItem.type == 532)
14674 {
14676 }
14677 if (currentItem.type == 554)
14678 {
14679 longInvince = true;
14680 }
14681 if (currentItem.type == 555)
14682 {
14683 manaFlower = true;
14684 manaCost -= 0.08f;
14685 }
14686 if (Main.myPlayer != whoAmI)
14687 {
14688 return;
14689 }
14690 if (currentItem.type == 5104 || currentItem.type == 5105)
14691 {
14693 }
14694 else if (currentItem.type == 576 && Main.rand.Next(540) == 0 && Main.curMusic > 0 && Main.curMusic <= Main.maxMusic)
14695 {
14697 int num3 = -1;
14698 if (Main.curMusic == 1)
14699 {
14700 num3 = 0;
14701 }
14702 if (Main.curMusic == 2)
14703 {
14704 num3 = 1;
14705 }
14706 if (Main.curMusic == 3)
14707 {
14708 num3 = 2;
14709 }
14710 if (Main.curMusic == 4)
14711 {
14712 num3 = 4;
14713 }
14714 if (Main.curMusic == 5)
14715 {
14716 num3 = 5;
14717 }
14718 if (Main.curMusic == 6)
14719 {
14720 num3 = 3;
14721 }
14722 if (Main.curMusic == 7)
14723 {
14724 num3 = 6;
14725 }
14726 if (Main.curMusic == 8)
14727 {
14728 num3 = 7;
14729 }
14730 if (Main.curMusic == 9)
14731 {
14732 num3 = 9;
14733 }
14734 if (Main.curMusic == 10)
14735 {
14736 num3 = 8;
14737 }
14738 if (Main.curMusic == 11)
14739 {
14740 num3 = 11;
14741 }
14742 if (Main.curMusic == 12)
14743 {
14744 num3 = 10;
14745 }
14746 if (Main.curMusic == 13)
14747 {
14748 num3 = 12;
14749 }
14750 if (Main.curMusic == 28)
14751 {
14752 currentItem.SetDefaults(1963);
14753 }
14754 else if (Main.curMusic == 29)
14755 {
14756 currentItem.SetDefaults(1610);
14757 }
14758 else if (Main.curMusic == 30)
14759 {
14760 currentItem.SetDefaults(1963);
14761 }
14762 else if (Main.curMusic == 31)
14763 {
14764 currentItem.SetDefaults(1964);
14765 }
14766 else if (Main.curMusic == 32)
14767 {
14768 currentItem.SetDefaults(1965);
14769 }
14770 else if (Main.curMusic == 33)
14771 {
14772 currentItem.SetDefaults(2742);
14773 }
14774 else if (Main.curMusic == 34)
14775 {
14776 currentItem.SetDefaults(3370);
14777 }
14778 else if (Main.curMusic == 35)
14779 {
14780 currentItem.SetDefaults(3236);
14781 }
14782 else if (Main.curMusic == 36)
14783 {
14784 currentItem.SetDefaults(3237);
14785 }
14786 else if (Main.curMusic == 37)
14787 {
14788 currentItem.SetDefaults(3235);
14789 }
14790 else if (Main.curMusic == 38)
14791 {
14792 currentItem.SetDefaults(3044);
14793 }
14794 else if (Main.curMusic == 39)
14795 {
14796 currentItem.SetDefaults(3371);
14797 }
14798 else if (Main.curMusic == 40)
14799 {
14800 currentItem.SetDefaults(3796);
14801 }
14802 else if (Main.curMusic == 41)
14803 {
14804 currentItem.SetDefaults(3869);
14805 }
14806 else if (Main.curMusic == 42)
14807 {
14808 currentItem.SetDefaults(4079);
14809 }
14810 else if (Main.curMusic == 43)
14811 {
14812 currentItem.SetDefaults(4077);
14813 }
14814 else if (Main.curMusic == 44)
14815 {
14816 currentItem.SetDefaults(4082);
14817 }
14818 else if (Main.curMusic == 46)
14819 {
14820 currentItem.SetDefaults(4080);
14821 }
14822 else if (Main.curMusic == 47)
14823 {
14824 currentItem.SetDefaults(4081);
14825 }
14826 else if (Main.curMusic == 48)
14827 {
14828 currentItem.SetDefaults(4078);
14829 }
14830 else if (Main.curMusic == 49)
14831 {
14832 currentItem.SetDefaults(4237);
14833 }
14834 else if (Main.curMusic == 51)
14835 {
14836 currentItem.SetDefaults(4356);
14837 }
14838 else if (Main.curMusic == 52)
14839 {
14840 currentItem.SetDefaults(4357);
14841 }
14842 else if (Main.curMusic == 53)
14843 {
14844 currentItem.SetDefaults(4358);
14845 }
14846 else if (Main.curMusic == 54)
14847 {
14848 currentItem.SetDefaults(4421);
14849 }
14850 else if (Main.curMusic == 55)
14851 {
14852 currentItem.SetDefaults(4606);
14853 }
14854 else if (Main.curMusic == 56)
14855 {
14856 currentItem.SetDefaults(4979);
14857 }
14858 else if (Main.curMusic == 57)
14859 {
14860 currentItem.SetDefaults(4985);
14861 }
14862 else if (Main.curMusic == 58)
14863 {
14864 currentItem.SetDefaults(4990);
14865 }
14866 else if (Main.curMusic == 59)
14867 {
14868 currentItem.SetDefaults(4991);
14869 }
14870 else if (Main.curMusic == 60)
14871 {
14872 currentItem.SetDefaults(4992);
14873 }
14874 else if (Main.curMusic == 61)
14875 {
14876 currentItem.SetDefaults(5006);
14877 }
14878 else if (Main.curMusic == 62)
14879 {
14880 currentItem.SetDefaults(5014);
14881 }
14882 else if (Main.curMusic == 63)
14883 {
14884 currentItem.SetDefaults(5015);
14885 }
14886 else if (Main.curMusic == 64)
14887 {
14888 currentItem.SetDefaults(5016);
14889 }
14890 else if (Main.curMusic == 65)
14891 {
14892 currentItem.SetDefaults(5017);
14893 }
14894 else if (Main.curMusic == 66)
14895 {
14896 currentItem.SetDefaults(5018);
14897 }
14898 else if (Main.curMusic == 67)
14899 {
14900 currentItem.SetDefaults(5019);
14901 }
14902 else if (Main.curMusic == 68)
14903 {
14904 currentItem.SetDefaults(5020);
14905 }
14906 else if (Main.curMusic == 69)
14907 {
14908 currentItem.SetDefaults(5021);
14909 }
14910 else if (Main.curMusic == 70)
14911 {
14912 currentItem.SetDefaults(5022);
14913 }
14914 else if (Main.curMusic == 71)
14915 {
14916 currentItem.SetDefaults(5023);
14917 }
14918 else if (Main.curMusic == 72)
14919 {
14920 currentItem.SetDefaults(5024);
14921 }
14922 else if (Main.curMusic == 73)
14923 {
14924 currentItem.SetDefaults(5025);
14925 }
14926 else if (Main.curMusic == 74)
14927 {
14928 currentItem.SetDefaults(5026);
14929 }
14930 else if (Main.curMusic == 75)
14931 {
14932 currentItem.SetDefaults(5027);
14933 }
14934 else if (Main.curMusic == 76)
14935 {
14936 currentItem.SetDefaults(5028);
14937 }
14938 else if (Main.curMusic == 77)
14939 {
14940 currentItem.SetDefaults(5029);
14941 }
14942 else if (Main.curMusic == 78)
14943 {
14944 currentItem.SetDefaults(5030);
14945 }
14946 else if (Main.curMusic == 79)
14947 {
14948 currentItem.SetDefaults(5031);
14949 }
14950 else if (Main.curMusic == 80)
14951 {
14952 currentItem.SetDefaults(5032);
14953 }
14954 else if (Main.curMusic == 81)
14955 {
14956 currentItem.SetDefaults(5033);
14957 }
14958 else if (Main.curMusic == 82)
14959 {
14960 currentItem.SetDefaults(5034);
14961 }
14962 else if (Main.curMusic == 83)
14963 {
14964 currentItem.SetDefaults(5035);
14965 }
14966 else if (Main.curMusic == 84)
14967 {
14968 currentItem.SetDefaults(5036);
14969 }
14970 else if (Main.curMusic == 85)
14971 {
14972 currentItem.SetDefaults(5037);
14973 }
14974 else if (Main.curMusic == 86)
14975 {
14976 currentItem.SetDefaults(5038);
14977 }
14978 else if (Main.curMusic == 87)
14979 {
14980 currentItem.SetDefaults(5039);
14981 }
14982 else if (Main.curMusic == 88)
14983 {
14984 currentItem.SetDefaults(5040);
14985 }
14986 else if (Main.curMusic == 89)
14987 {
14988 currentItem.SetDefaults(5044);
14989 }
14990 else if (Main.curMusic == 90)
14991 {
14992 currentItem.SetDefaults(5112);
14993 }
14994 else if (Main.curMusic == 91)
14995 {
14996 currentItem.SetDefaults(5362);
14997 }
14998 else if (Main.curMusic > 13)
14999 {
15000 currentItem.SetDefaults(1596 + Main.curMusic - 14);
15001 }
15002 else if (num3 != -1)
15003 {
15004 currentItem.SetDefaults(num3 + 562);
15005 }
15006 }
15008 }
static double Sqrt(double d)
static void PlaySound(int type, Vector2 position, int style=1)
Vector2 velocity
Definition Entity.cs:16
static int Bullet
Definition AmmoID.cs:114
static int CandyCorn
Definition AmmoID.cs:130
static int Stake
Definition AmmoID.cs:134
static int Solution
Definition AmmoID.cs:122
static readonly LegacySoundStyle Item166
Definition SoundID.cs:746
int useAmmo
Definition Item.cs:243
bool Active
Definition Mount.cs:345
float moveSpeed
Definition Player.cs:2047
bool equippedAnyWallSpeedAcc
Definition Player.cs:2587
bool[] buffImmune
Definition Player.cs:1197
bool accTackleBox
Definition Player.cs:961
bool hasLuck_LuckyHorseshoe
Definition Player.cs:2227
bool controlDownHold
Definition Player.cs:1449
bool hasMagiluminescence
Definition Player.cs:1627
bool accDivingHelm
Definition Player.cs:2221
bool hasJumpOption_Sandstorm
Definition Player.cs:2235
float arrowDamageAdditiveStack
Definition Player.cs:2031
bool hasMoltenQuiver
Definition Player.cs:1605
bool bloodMoonMonolithShader
Definition Player.cs:1657
float rangedDamage
Definition Player.cs:2027
bool remoteVisionForDrone
Definition Player.cs:1981
int manaRegenBonus
Definition Player.cs:803
bool empressBrooch
Definition Player.cs:1621
Item brainOfConfusionItem
Definition Player.cs:917
bool hasJumpOption_Fart
Definition Player.cs:2247
bool skyStoneEffects
Definition Player.cs:2299
float meleeSpeed
Definition Player.cs:2043
float accRunSpeed
Definition Player.cs:821
bool vortexMonolithShader
Definition Player.cs:1651
bool[] npcTypeNoAggro
Definition Player.cs:2547
void UpdateBootVisualEffects(Item item)
Definition Player.cs:34913
bool stardustMonolithShader
Definition Player.cs:1647
bool hasLuckyCoin
Definition Player.cs:2215
bool autoActuator
Definition Player.cs:2057
bool nebulaMonolithShader
Definition Player.cs:1649
bool solarMonolithShader
Definition Player.cs:1653
Vector2 MountedCenter
Definition Player.cs:2853
bool killClothier
Definition Player.cs:2337
int vanityRocketBoots
Definition Player.cs:2325
float meleeDamage
Definition Player.cs:2023
Item starCloakItem_beeCloakOverrideItem
Definition Player.cs:1989
void UpdateFishingBobber(Item item)
Definition Player.cs:34882
bool moonLordMonolithShader
Definition Player.cs:1655
Item honeyCombItem
Definition Player.cs:2423
PortableStoolUsage portableStoolInfo
Definition Player.cs:1071
bool gravControl2
Definition Player.cs:2421
bool hasJumpOption_Sail
Definition Player.cs:2253
bool[] hideVisibleAccessory
Definition Player.cs:1367
int counterWeight
Definition Player.cs:669
bool accFishingBobber
Definition Player.cs:959
void ApplyWilsonBeard(Item currentItem)
Definition Player.cs:15010
static int tileRangeX
Definition Player.cs:2075
float minionDamage
Definition Player.cs:2039
bool equippedAnyTileSpeedAcc
Definition Player.cs:2585
void ApplyMusicBox(Item currentItem)
Definition Player.cs:15026
float jumpSpeedBoost
Definition Player.cs:2289
bool hasJumpOption_Cloud
Definition Player.cs:2229
bool hasPaladinShield
Definition Player.cs:1087
bool discountEquipped
Definition Player.cs:2211
bool yoyoString
Definition Player.cs:671
float manaRegenDelayBonus
Definition Player.cs:805
bool CanSeeInvisibleBlocks
Definition Player.cs:2375
bool accLavaFishing
Definition Player.cs:963
Item starCloakItem
Definition Player.cs:1983
bool dd2Accessory
Definition Player.cs:609
bool hasLuck_LuckyCoin
Definition Player.cs:2225
WingStats GetWingStats(int wingID)
Definition Player.cs:13602
bool chiselSpeed
Definition Player.cs:717
bool volatileGelatin
Definition Player.cs:1623
bool shimmerImmune
Definition Player.cs:1583
float magicDamage
Definition Player.cs:2025
void SporeSac(Item sourceItem)
Definition Player.cs:40477
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Definition Player.cs:4441
static int tileRangeY
Definition Player.cs:2077
bool dontStarveShader
Definition Player.cs:1631
float endurance
Definition Player.cs:899
bool meleeScaleGlove
Definition Player.cs:1977
bool manaMagnet
Definition Player.cs:711
void DoBootsEffect(Utils.TileActionAttempt theEffectMethod)
Definition Player.cs:13400
int armorPenetration
Definition Player.cs:1551
bool hasCreditsSceneMusicBox
Definition Player.cs:2343
bool treasureMagnet
Definition Player.cs:715
bool accFishingLine
Definition Player.cs:957
bool hasJumpOption_Blizzard
Definition Player.cs:2241
bool autoReuseGlove
Definition Player.cs:1975
Item[] inventory
Definition Player.cs:1257
void VolatileGelatin(Item sourceItem)
Definition Player.cs:40558
bool equippedAnyTileRangeAcc
Definition Player.cs:2583
bool DoBootsEffect_PlaceFlamesOnTile(int X, int Y)
Definition Player.cs:13410
Item boneGloveItem
Definition Player.cs:2217
bool shimmerMonolithShader
Definition Player.cs:1659
Item starCloakItem_manaCloakOverrideItem
Definition Player.cs:1985
bool arcticDivingGear
Definition Player.cs:1715
Item starCloakItem_starVeilOverrideItem
Definition Player.cs:1987
void SetStats(int heightBoost, int visualYOffset, int mapYOffset)

References Terraria.Lighting.AddLight(), Terraria.ID.AmmoID.Bullet, Terraria.ID.AmmoID.CandyCorn, Terraria.DelegateMethods.CastLightOpen(), Terraria.Main.curMusic, Terraria.Main.dayTime, Terraria.Main.eclipse, Terraria.Main.expertMode, Terraria.ID.SoundID.Item166, Terraria.Main.maxMusic, Terraria.Main.myPlayer, Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Utils.PlotTileLine(), Terraria.Main.rand, Terraria.DataStructures.PortableStoolUsage.SetStats(), Terraria.ID.AmmoID.Solution, System.Math.Sqrt(), Terraria.ID.AmmoID.Stake, and Terraria.Item.useAmmo.