Skip to content
Browse files

STOImporter::GetItem: make sure items have at least one charge

fixes ribald selling the ring of air control for only 1gp
  • Loading branch information...
1 parent 596bcde commit e98c2dd975c38a8b88d8218dba30b7711a9e20d7 @lynxlynxlynx lynxlynxlynx committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 gemrb/plugins/STOImporter/STOImporter.cpp
View
4 gemrb/plugins/STOImporter/STOImporter.cpp
@@ -182,6 +182,10 @@ void STOImporter::GetItem(STOItem *it, Store *s)
it->Flags |= IE_INV_ITEM_IDENTIFIED;
}
gamedata->FreeItem( item, it->ItemResRef, false );
+ //make sure it has at least one charge for proper pricing purposes
+ if (!it->Usages[0]) {
+ it->Usages[0] = 1;
+ }
}
str->ReadDword( (ieDword *) &it->InfiniteSupply );
ieDwordSigned tmp;

0 comments on commit e98c2dd

Please sign in to comment.
Something went wrong with that request. Please try again.