1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-01 12:06:43 +00:00

Issue #314: Moved ingredients and potions to a different type of record list

This commit is contained in:
Marc Zinnschlag 2012-07-13 13:01:30 +02:00
parent 29b4a5e5f7
commit 182017b8e9
6 changed files with 15 additions and 7 deletions

View file

@ -187,7 +187,7 @@ int main(int argc, char**argv)
case REC_ALCH: case REC_ALCH:
{ {
Potion p; Potion p;
p.load(esm); p.load(esm, id);
if(quiet) break; if(quiet) break;
cout << " Name: " << p.name << endl; cout << " Name: " << p.name << endl;
break; break;

View file

@ -2,8 +2,10 @@
namespace ESM namespace ESM
{ {
void Potion::load(ESMReader &esm) void Potion::load(ESMReader &esm, const std::string& id)
{ {
mId = id;
model = esm.getHNString("MODL"); model = esm.getHNString("MODL");
icon = esm.getHNOString("TEXT"); // not ITEX here for some reason icon = esm.getHNOString("TEXT"); // not ITEX here for some reason
script = esm.getHNOString("SCRI"); script = esm.getHNOString("SCRI");

View file

@ -24,7 +24,9 @@ struct Potion
std::string name, model, icon, script; std::string name, model, icon, script;
EffectList effects; EffectList effects;
void load(ESMReader &esm); std::string mId;
void load(ESMReader &esm, const std::string& id);
}; };
} }
#endif #endif

View file

@ -3,8 +3,10 @@
namespace ESM namespace ESM
{ {
void Ingredient::load(ESMReader &esm) void Ingredient::load(ESMReader &esm, const std::string& id)
{ {
mId = id;
model = esm.getHNString("MODL"); model = esm.getHNString("MODL");
name = esm.getHNString("FNAM"); name = esm.getHNString("FNAM");
esm.getHNT(data, "IRDT", 56); esm.getHNT(data, "IRDT", 56);

View file

@ -24,7 +24,9 @@ struct Ingredient
IRDTstruct data; IRDTstruct data;
std::string name, model, icon, script; std::string name, model, icon, script;
void load(ESMReader &esm); std::string mId;
void load(ESMReader &esm, const std::string& id);
}; };
} }
#endif #endif

View file

@ -30,7 +30,7 @@ namespace ESMS
// Each individual list // Each individual list
RecListT<Activator> activators; RecListT<Activator> activators;
RecListT<Potion> potions; RecListWithIDT<Potion> potions;
RecListT<Apparatus> appas; RecListT<Apparatus> appas;
RecListT<Armor> armors; RecListT<Armor> armors;
RecListT<BodyPart> bodyParts; RecListT<BodyPart> bodyParts;
@ -47,7 +47,7 @@ namespace ESMS
RecListT<Enchantment> enchants; RecListT<Enchantment> enchants;
RecListT<Faction> factions; RecListT<Faction> factions;
RecListT<Global> globals; RecListT<Global> globals;
RecListT<Ingredient> ingreds; RecListWithIDT<Ingredient> ingreds;
RecListT<CreatureLevList> creatureLists; RecListT<CreatureLevList> creatureLists;
RecListT<ItemLevList> itemLists; RecListT<ItemLevList> itemLists;
RecListT<Light> lights; RecListT<Light> lights;