// PB: Realistic Ship Purchase -->
GameInterface.scrollitems.(attributeName).navyship = false;
GameInterface.scrollitems.(attributeName).pirateship = false;
if(REALISTIC_SHIP_PURCHASE == 1 && LAi_IsCapturedLocation == false)
{
if(GetCurrentLocationNation() == PIRATE)
{
if(GetLocalShipAttrib(arCurShip, ShipsTypes[st],"Nation") == PIRATE) GameInterface.scrollitems.(attributeName).pirateship = true;
if(PChar.nation == PIRATE && GetFame(PChar, PIRATE) > PIRATE_REQFAME) GameInterface.scrollitems.(attributeName).pirateship = false;
}
else
{
if(GetLocalShipAttrib(arCurShip, ShipsTypes[st],"Type.War") == true && GetLocalShipAttrib(arCurShip, ShipsTypes[st],"Type.Trade") == false && GetCurrentLocationNation() != PIRATE)
{
switch(sti(GetLocalShipAttrib(arCurShip, ShipsTypes[st],"Class")))
{
case 1:
if(RANK_FOR_FIRST_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_FIRST_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_FIRST_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 2:
if(RANK_FOR_SECOND_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_SECOND_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_SECOND_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 3:
if(RANK_FOR_THIRD_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_THIRD_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_THIRD_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 4:
if(RANK_FOR_FOURTH_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_FOURTH_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_FOURTH_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 5:
if(RANK_FOR_FIFTH_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_FIFTH_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_FIFTH_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 6:
if(RANK_FOR_SIXTH_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_SIXTH_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_SIXTH_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 7:
if(RANK_FOR_SEVENTH_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_SEVENTH_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_SEVENTH_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
case 8:
if(RANK_FOR_EIGHTH_RATE == 0 && !HaveLetterOfMarque(GetCurrentLocationNation()))
{GameInterface.scrollitems.(attributeName).navyship = true;}
if(RANK_FOR_EIGHTH_RATE > 0 && GetRank(GetMainCharacter(), GetCurrentLocationNation()) <= RANK_FOR_EIGHTH_RATE)
{GameInterface.scrollitems.(attributeName).navyship = true;}
break;
}
}
}
}
if(GameInterface.scrollitems.(attributeName).navyship)
{
GameInterface.scrollitems.(attributeName).spec2 = true;
GameInterface.scrollitems.(attributeName).skipsell = true;
}
if(GameInterface.scrollitems.(attributeName).pirateship)
{
GameInterface.scrollitems.(attributeName).spec2 = true;
GameInterface.scrollitems.(attributeName).skipsell = true;
}
// PB: Realistic Ship Purchase <--