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

◆ SetupTravelShop_GetItem()

static void Terraria.Chest.SetupTravelShop_GetItem ( Player playerWithHighestLuck,
int[] rarity,
ref int it,
int minimumRarity = 0 )
inlinestatic

Definition at line 1013 of file Chest.cs.

1014 {
1015 if (minimumRarity <= 4 && playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1016 {
1017 it = 3309;
1018 }
1019 if (minimumRarity <= 3 && playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1020 {
1021 it = 3314;
1022 }
1023 if (playerWithHighestLuck.RollLuck(rarity[5]) == 0)
1024 {
1025 it = 1987;
1026 }
1027 if (minimumRarity > 4)
1028 {
1029 return;
1030 }
1031 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0 && Main.hardMode)
1032 {
1033 it = 2270;
1034 }
1035 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0 && Main.hardMode)
1036 {
1037 it = 4760;
1038 }
1039 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1040 {
1041 it = 2278;
1042 }
1043 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1044 {
1045 it = 2271;
1046 }
1047 if (minimumRarity > 3)
1048 {
1049 return;
1050 }
1051 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3)
1052 {
1053 it = 2223;
1054 }
1055 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1056 {
1057 it = 2272;
1058 }
1059 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1060 {
1061 it = 2276;
1062 }
1063 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1064 {
1065 it = 2284;
1066 }
1067 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1068 {
1069 it = 2285;
1070 }
1071 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1072 {
1073 it = 2286;
1074 }
1075 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1076 {
1077 it = 2287;
1078 }
1079 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1080 {
1081 it = 4744;
1082 }
1083 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && NPC.downedBoss3)
1084 {
1085 it = 2296;
1086 }
1087 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1088 {
1089 it = 3628;
1090 }
1091 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && Main.hardMode)
1092 {
1093 it = 4091;
1094 }
1095 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1096 {
1097 it = 4603;
1098 }
1099 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1100 {
1101 it = 4604;
1102 }
1103 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1104 {
1105 it = 5297;
1106 }
1107 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1108 {
1109 it = 4605;
1110 }
1111 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1112 {
1113 it = 4550;
1114 }
1115 if (minimumRarity > 2)
1116 {
1117 return;
1118 }
1119 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1120 {
1121 it = 2268;
1122 }
1123 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && WorldGen.shadowOrbSmashed)
1124 {
1125 it = 2269;
1126 }
1127 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1128 {
1129 it = 1988;
1130 }
1131 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1132 {
1133 it = 2275;
1134 }
1135 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1136 {
1137 it = 2279;
1138 }
1139 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1140 {
1141 it = 2277;
1142 }
1143 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1144 {
1145 it = 4555;
1146 }
1147 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1148 {
1149 it = 4321;
1150 }
1151 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1152 {
1153 it = 4323;
1154 }
1155 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1156 {
1157 it = 5390;
1158 }
1159 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1160 {
1161 it = 4549;
1162 }
1163 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1164 {
1165 it = 4561;
1166 }
1167 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1168 {
1169 it = 4774;
1170 }
1171 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1172 {
1173 it = 5136;
1174 }
1175 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1176 {
1177 it = 5305;
1178 }
1179 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1180 {
1181 it = 4562;
1182 }
1183 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1184 {
1185 it = 4558;
1186 }
1187 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1188 {
1189 it = 4559;
1190 }
1191 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1192 {
1193 it = 4563;
1194 }
1195 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1196 {
1197 it = 4666;
1198 }
1199 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3 || NPC.downedQueenBee || Main.hardMode))
1200 {
1201 it = 4347;
1202 if (Main.hardMode)
1203 {
1204 it = 4348;
1205 }
1206 }
1207 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && NPC.downedBoss1)
1208 {
1209 it = 3262;
1210 }
1211 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && NPC.downedMechBossAny)
1212 {
1213 it = 3284;
1214 }
1215 if (minimumRarity > 1)
1216 {
1217 return;
1218 }
1219 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1220 {
1221 it = 2267;
1222 }
1223 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1224 {
1225 it = 2214;
1226 }
1227 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1228 {
1229 it = 2215;
1230 }
1231 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1232 {
1233 it = 2216;
1234 }
1235 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1236 {
1237 it = 2217;
1238 }
1239 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1240 {
1241 it = 3624;
1242 }
1243 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1244 {
1245 if (Main.remixWorld)
1246 {
1247 it = 671;
1248 }
1249 else
1250 {
1251 it = 2273;
1252 }
1253 }
1254 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1255 {
1256 it = 2274;
1257 }
1258 if (minimumRarity <= 0)
1259 {
1260 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1261 {
1262 it = 2266;
1263 }
1264 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1265 {
1266 it = 2281 + Main.rand.Next(3);
1267 }
1268 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1269 {
1270 it = 2258;
1271 }
1272 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1273 {
1274 it = 2242;
1275 }
1276 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1277 {
1278 it = 2260;
1279 }
1280 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1281 {
1282 it = 3637;
1283 }
1284 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1285 {
1286 it = 4420;
1287 }
1288 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1289 {
1290 it = 3119;
1291 }
1292 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1293 {
1294 it = 3118;
1295 }
1296 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1297 {
1298 it = 3099;
1299 }
1300 }
1301 }

References Terraria.NPC.downedBoss1, Terraria.NPC.downedBoss2, Terraria.NPC.downedBoss3, Terraria.NPC.downedMechBoss1, Terraria.NPC.downedMechBoss2, Terraria.NPC.downedMechBoss3, Terraria.NPC.downedMechBossAny, Terraria.NPC.downedQueenBee, Terraria.Main.hardMode, Terraria.Main.rand, Terraria.Main.remixWorld, and Terraria.WorldGen.shadowOrbSmashed.

Referenced by Terraria.Chest.SetupTravelShop().