Material fix, custom reaction items seem to work again with offset update and bars work

develop
reverb 2010-10-27 22:30:58 -05:00
parent df012b4bae
commit 5e507163b8
2 changed files with 10 additions and 7 deletions

@ -1751,6 +1751,9 @@
<PETimeStamp value="0x4CA9D544" /> <PETimeStamp value="0x4CA9D544" />
<MD5 value="702b3ebaae468f73eb1411af54863013" /> <MD5 value="702b3ebaae468f73eb1411af54863013" />
<Offsets> <Offsets>
<Group name="Materials">
<Address name="other" value="0x16A21FC"/> 0x16445F0 + 0x5DC0C see code at 0x9CFB01
</Group>
<Group name="Creatures"> <Group name="Creatures">
<Address name="current_civ" value="0x1484868 0x14848b8" /> <Address name="current_civ" value="0x1484868 0x14848b8" />
<Address name="current_race" value="0x1484874 0x14848c4" /> <Address name="current_race" value="0x1484874 0x14848c4" />

@ -459,7 +459,7 @@ void Materials::ReadAllMaterials(void)
this->ReadCreatureTypes(); this->ReadCreatureTypes();
this->ReadCreatureTypesEx(); this->ReadCreatureTypesEx();
this->ReadDescriptorColors(); this->ReadDescriptorColors();
//this->ReadOthers(); this->ReadOthers();
} }
std::string Materials::getDescription(t_material & mat) std::string Materials::getDescription(t_material & mat)
@ -476,14 +476,14 @@ std::string Materials::getDescription(t_material & mat)
return "?"; return "?";
else else
{ {
if (mat.itemType == 0) {
if(mat.subIndex<0)
return "any inorganic";
else
return this->inorganic[mat.subIndex].id;
}
if (mat.subIndex>=this->other.size()) if (mat.subIndex>=this->other.size())
{ {
if (mat.itemType == 0) {
if(mat.subIndex<0)
return "any inorganic";
else
return this->inorganic[mat.subIndex].id;
}
if(mat.subIndex<0) if(mat.subIndex<0)
return "any"; return "any";
if(mat.subIndex>=this->raceEx.size()) if(mat.subIndex>=this->raceEx.size())