forked from teamnwah/openmw-tes3coop
per NPC ID interaction tracking
This commit is contained in:
parent
5bdc7bcacf
commit
a34bdb9623
2 changed files with 16 additions and 0 deletions
|
@ -227,3 +227,13 @@ int MWMechanics::NpcStats::getLevelupAttributeMultiplier(int attribute) const
|
|||
else
|
||||
return 5;
|
||||
}
|
||||
|
||||
void MWMechanics::NpcStats::flagAsUsed (const std::string& id)
|
||||
{
|
||||
mUsedIds.insert (id);
|
||||
}
|
||||
|
||||
bool MWMechanics::NpcStats::hasBeenUsed (const std::string& id) const
|
||||
{
|
||||
return mUsedIds.find (id)!=mUsedIds.end();
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace MWMechanics
|
|||
|
||||
std::vector<int> mSkillIncreases; // number of skill increases for each attribute
|
||||
|
||||
std::set<std::string> mUsedIds;
|
||||
|
||||
public:
|
||||
|
||||
NpcStats();
|
||||
|
@ -86,6 +88,10 @@ namespace MWMechanics
|
|||
int getLevelupAttributeMultiplier(int attribute) const;
|
||||
|
||||
void levelUp();
|
||||
|
||||
void flagAsUsed (const std::string& id);
|
||||
|
||||
bool hasBeenUsed (const std::string& id) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue