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

◆ SetupTravelShop_AddToShop()

static void Terraria.Chest.SetupTravelShop_AddToShop ( int it,
ref int added,
ref int count )
inlinestatic

Definition at line 764 of file Chest.cs.

765 {
766 if (it == 0)
767 {
768 return;
769 }
770 added++;
771 Main.travelShop[count] = it;
772 count++;
773 if (it == 2260)
774 {
775 Main.travelShop[count] = 2261;
776 count++;
777 Main.travelShop[count] = 2262;
778 count++;
779 }
780 if (it == 4555)
781 {
782 Main.travelShop[count] = 4556;
783 count++;
784 Main.travelShop[count] = 4557;
785 count++;
786 }
787 if (it == 4321)
788 {
789 Main.travelShop[count] = 4322;
790 count++;
791 }
792 if (it == 4323)
793 {
794 Main.travelShop[count] = 4324;
795 count++;
796 Main.travelShop[count] = 4365;
797 count++;
798 }
799 if (it == 5390)
800 {
801 Main.travelShop[count] = 5386;
802 count++;
803 Main.travelShop[count] = 5387;
804 count++;
805 }
806 if (it == 4666)
807 {
808 Main.travelShop[count] = 4664;
809 count++;
810 Main.travelShop[count] = 4665;
811 count++;
812 }
813 if (it == 3637)
814 {
815 count--;
816 switch (Main.rand.Next(6))
817 {
818 case 0:
819 Main.travelShop[count++] = 3637;
820 Main.travelShop[count++] = 3642;
821 break;
822 case 1:
823 Main.travelShop[count++] = 3621;
824 Main.travelShop[count++] = 3622;
825 break;
826 case 2:
827 Main.travelShop[count++] = 3634;
828 Main.travelShop[count++] = 3639;
829 break;
830 case 3:
831 Main.travelShop[count++] = 3633;
832 Main.travelShop[count++] = 3638;
833 break;
834 case 4:
835 Main.travelShop[count++] = 3635;
836 Main.travelShop[count++] = 3640;
837 break;
838 case 5:
839 Main.travelShop[count++] = 3636;
840 Main.travelShop[count++] = 3641;
841 break;
842 }
843 }
844 }

References Terraria.Main.rand, and Terraria.Main.travelShop.

Referenced by Terraria.Chest.SetupTravelShop().