TModLoader v1.4.4.9
TModLoader 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 1314 of file Chest.cs.

1315 {
1316 if (minimumRarity <= 4 && playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1317 {
1318 it = 3309;
1319 }
1320 if (minimumRarity <= 3 && playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1321 {
1322 it = 3314;
1323 }
1324 if (playerWithHighestLuck.RollLuck(rarity[5]) == 0)
1325 {
1326 it = 1987;
1327 }
1328 if (minimumRarity > 4)
1329 {
1330 return;
1331 }
1332 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0 && Main.hardMode)
1333 {
1334 it = 2270;
1335 }
1336 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0 && Main.hardMode)
1337 {
1338 it = 4760;
1339 }
1340 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1341 {
1342 it = 2278;
1343 }
1344 if (playerWithHighestLuck.RollLuck(rarity[4]) == 0)
1345 {
1346 it = 2271;
1347 }
1348 if (minimumRarity > 3)
1349 {
1350 return;
1351 }
1352 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && Main.hardMode && NPC.downedMechBoss1 && NPC.downedMechBoss2 && NPC.downedMechBoss3)
1353 {
1354 it = 2223;
1355 }
1356 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1357 {
1358 it = 2272;
1359 }
1360 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1361 {
1362 it = 2276;
1363 }
1364 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1365 {
1366 it = 2284;
1367 }
1368 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1369 {
1370 it = 2285;
1371 }
1372 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1373 {
1374 it = 2286;
1375 }
1376 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1377 {
1378 it = 2287;
1379 }
1380 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1381 {
1382 it = 4744;
1383 }
1384 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && NPC.downedBoss3)
1385 {
1386 it = 2296;
1387 }
1388 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1389 {
1390 it = 3628;
1391 }
1392 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0 && Main.hardMode)
1393 {
1394 it = 4091;
1395 }
1396 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1397 {
1398 it = 4603;
1399 }
1400 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1401 {
1402 it = 4604;
1403 }
1404 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1405 {
1406 it = 5297;
1407 }
1408 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1409 {
1410 it = 4605;
1411 }
1412 if (playerWithHighestLuck.RollLuck(rarity[3]) == 0)
1413 {
1414 it = 4550;
1415 }
1416 if (minimumRarity > 2)
1417 {
1418 return;
1419 }
1420 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1421 {
1422 it = 2268;
1423 }
1424 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && WorldGen.shadowOrbSmashed)
1425 {
1426 it = 2269;
1427 }
1428 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1429 {
1430 it = 1988;
1431 }
1432 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1433 {
1434 it = 2275;
1435 }
1436 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1437 {
1438 it = 2279;
1439 }
1440 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1441 {
1442 it = 2277;
1443 }
1444 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1445 {
1446 it = 4555;
1447 }
1448 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1449 {
1450 it = 4321;
1451 }
1452 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1453 {
1454 it = 4323;
1455 }
1456 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1457 {
1458 it = 5390;
1459 }
1460 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1461 {
1462 it = 4549;
1463 }
1464 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1465 {
1466 it = 4561;
1467 }
1468 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1469 {
1470 it = 4774;
1471 }
1472 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1473 {
1474 it = 5136;
1475 }
1476 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1477 {
1478 it = 5305;
1479 }
1480 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1481 {
1482 it = 4562;
1483 }
1484 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1485 {
1486 it = 4558;
1487 }
1488 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1489 {
1490 it = 4559;
1491 }
1492 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1493 {
1494 it = 4563;
1495 }
1496 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0)
1497 {
1498 it = 4666;
1499 }
1500 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && (NPC.downedBoss1 || NPC.downedBoss2 || NPC.downedBoss3 || NPC.downedQueenBee || Main.hardMode))
1501 {
1502 it = 4347;
1503 if (Main.hardMode)
1504 {
1505 it = 4348;
1506 }
1507 }
1508 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && NPC.downedBoss1)
1509 {
1510 it = 3262;
1511 }
1512 if (playerWithHighestLuck.RollLuck(rarity[2]) == 0 && NPC.downedMechBossAny)
1513 {
1514 it = 3284;
1515 }
1516 if (minimumRarity > 1)
1517 {
1518 return;
1519 }
1520 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1521 {
1522 it = 2267;
1523 }
1524 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1525 {
1526 it = 2214;
1527 }
1528 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1529 {
1530 it = 2215;
1531 }
1532 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1533 {
1534 it = 2216;
1535 }
1536 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1537 {
1538 it = 2217;
1539 }
1540 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1541 {
1542 it = 3624;
1543 }
1544 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1545 {
1546 if (Main.remixWorld)
1547 {
1548 it = 671;
1549 }
1550 else
1551 {
1552 it = 2273;
1553 }
1554 }
1555 if (playerWithHighestLuck.RollLuck(rarity[1]) == 0)
1556 {
1557 it = 2274;
1558 }
1559 if (minimumRarity <= 0)
1560 {
1561 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1562 {
1563 it = 2266;
1564 }
1565 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1566 {
1567 it = 2281 + Main.rand.Next(3);
1568 }
1569 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1570 {
1571 it = 2258;
1572 }
1573 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1574 {
1575 it = 2242;
1576 }
1577 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1578 {
1579 it = 2260;
1580 }
1581 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1582 {
1583 it = 3637;
1584 }
1585 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1586 {
1587 it = 4420;
1588 }
1589 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1590 {
1591 it = 3119;
1592 }
1593 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1594 {
1595 it = 3118;
1596 }
1597 if (playerWithHighestLuck.RollLuck(rarity[0]) == 0)
1598 {
1599 it = 3099;
1600 }
1601 }
1602 }

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().

+ Here is the caller graph for this function: