added missing attribute columns to faction table

actorid
Marc Zinnschlag 12 years ago
parent b5eaa464ad
commit 7136ac0079

@ -679,10 +679,10 @@ void Record<ESM::Faction>::print()
std::cout << " Hidden: " << mData.mData.mIsHidden << std::endl; std::cout << " Hidden: " << mData.mData.mIsHidden << std::endl;
if (mData.mData.mUnknown != -1) if (mData.mData.mUnknown != -1)
std::cout << " Unknown: " << mData.mData.mUnknown << std::endl; std::cout << " Unknown: " << mData.mData.mUnknown << std::endl;
std::cout << " Attribute1: " << attributeLabel(mData.mData.mAttributes[0]) std::cout << " Attribute1: " << attributeLabel(mData.mData.mAttribute[0])
<< " (" << mData.mData.mAttributes[0] << ")" << std::endl; << " (" << mData.mData.mAttribute[0] << ")" << std::endl;
std::cout << " Attribute2: " << attributeLabel(mData.mData.mAttributes[1]) std::cout << " Attribute2: " << attributeLabel(mData.mData.mAttribute[1])
<< " (" << mData.mData.mAttributes[1] << ")" << std::endl; << " (" << mData.mData.mAttribute[1] << ")" << std::endl;
for (int i = 0; i != 6; i++) for (int i = 0; i != 6; i++)
if (mData.mData.mSkills[i] != -1) if (mData.mData.mSkills[i] != -1)
std::cout << " Skill: " << skillLabel(mData.mData.mSkills[i]) std::cout << " Skill: " << skillLabel(mData.mData.mSkills[i])

@ -29,7 +29,7 @@ void CSMTools::FactionCheckStage::perform (int stage, std::vector<std::string>&
messages.push_back (id.toString() + "|" + faction.mId + " has an empty name"); messages.push_back (id.toString() + "|" + faction.mId + " has an empty name");
// test for invalid attributes // test for invalid attributes
if (faction.mData.mAttributes[0]==faction.mData.mAttributes[1] && faction.mData.mAttributes[0]!=-1) if (faction.mData.mAttribute[0]==faction.mData.mAttribute[1] && faction.mData.mAttribute[0]!=-1)
{ {
std::ostringstream stream; std::ostringstream stream;

@ -60,6 +60,8 @@ CSMWorld::Data::Data()
mFactions.addColumn (new StringIdColumn<ESM::Faction>); mFactions.addColumn (new StringIdColumn<ESM::Faction>);
mFactions.addColumn (new RecordStateColumn<ESM::Faction>); mFactions.addColumn (new RecordStateColumn<ESM::Faction>);
mFactions.addColumn (new NameColumn<ESM::Faction>); mFactions.addColumn (new NameColumn<ESM::Faction>);
mFactions.addColumn (new AttributesColumn<ESM::Faction> (0));
mFactions.addColumn (new AttributesColumn<ESM::Faction> (1));
mFactions.addColumn (new HiddenColumn<ESM::Faction>); mFactions.addColumn (new HiddenColumn<ESM::Faction>);
for (int i=0; i<6; ++i) for (int i=0; i<6; ++i)
mFactions.addColumn (new SkillsColumn<ESM::Faction> (i)); mFactions.addColumn (new SkillsColumn<ESM::Faction> (i));

@ -569,8 +569,8 @@ bool MWDialogue::Filter::hasFactionRankSkillRequirements (const MWWorld::Ptr& ac
MWMechanics::CreatureStats& stats = MWWorld::Class::get (actor).getCreatureStats (actor); MWMechanics::CreatureStats& stats = MWWorld::Class::get (actor).getCreatureStats (actor);
return stats.getAttribute (faction.mData.mAttributes[0]).getBase()>=faction.mData.mRankData[rank].mAttribute1 && return stats.getAttribute (faction.mData.mAttribute[0]).getBase()>=faction.mData.mRankData[rank].mAttribute1 &&
stats.getAttribute (faction.mData.mAttributes[1]).getBase()>=faction.mData.mRankData[rank].mAttribute2; stats.getAttribute (faction.mData.mAttribute[1]).getBase()>=faction.mData.mRankData[rank].mAttribute2;
} }
bool MWDialogue::Filter::hasFactionRankReputationRequirements (const MWWorld::Ptr& actor, bool MWDialogue::Filter::hasFactionRankReputationRequirements (const MWWorld::Ptr& actor,

@ -500,8 +500,8 @@ void StatsWindow::updateSkillArea()
text += std::string("\n\n#DDC79E#{sNextRank} ") + faction->mRanks[it->second+1]; text += std::string("\n\n#DDC79E#{sNextRank} ") + faction->mRanks[it->second+1];
ESM::RankData rankData = faction->mData.mRankData[it->second+1]; ESM::RankData rankData = faction->mData.mRankData[it->second+1];
const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttributes[0]); const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[0]);
const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttributes[1]); const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[1]);
assert(attr1 && attr2); assert(attr1 && attr2);
text += "\n#BF9959#{" + attr1->mName + "}: " + boost::lexical_cast<std::string>(rankData.mAttribute1) text += "\n#BF9959#{" + attr1->mName + "}: " + boost::lexical_cast<std::string>(rankData.mAttribute1)

@ -71,7 +71,7 @@ void Faction::save(ESMWriter &esm)
void Faction::blank() void Faction::blank()
{ {
mName.clear(); mName.clear();
mData.mAttributes[0] = mData.mAttributes[1] = 0; mData.mAttribute[0] = mData.mAttribute[1] = 0;
mData.mUnknown = -1; mData.mUnknown = -1;
mData.mIsHidden = 0; mData.mIsHidden = 0;

@ -34,7 +34,7 @@ struct Faction
struct FADTstruct struct FADTstruct
{ {
// Which attributes we like // Which attributes we like
int mAttributes[2]; int mAttribute[2];
RankData mRankData[10]; RankData mRankData[10];

Loading…
Cancel
Save