[Change] Fixed handling of outfit license.

This commit is contained in:
Allanis 2014-04-09 21:47:00 +01:00
parent 8a183c2e22
commit 6483dccab3

View File

@ -383,6 +383,8 @@ static void outfits_update(unsigned int wid, char* str) {
"%s\n",
outfit->name,
outfit_getType(outfit),
(outfit_isLicense(outfit)) ?
player_hasLicense(outfit->name) :
player_outfitOwned(outfitname),
outfit->mass,
pilot_freeSpace(player),
@ -442,7 +444,7 @@ static int outfit_canBuy(Outfit* outfit, int q, int errmsg) {
return 0;
}
/* Needs license. */
else if((outfit->license != NULL) && !player_hasLicense(outfit->name)) {
else if((outfit->license != NULL) && !player_hasLicense(outfit->license)) {
if(errmsg != 0)
dialogue_alert("You need the '%s' license to buy this outfit.",
outfit->license);