Skip to content

Commit

Permalink
NWN2: Clear personal rep
Browse files Browse the repository at this point in the history
  • Loading branch information
rjshae authored and DrMcCoy committed Nov 23, 2018
1 parent c8843da commit 68864cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/engines/nwn2/faction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ void PersonalReputation::clearPersonalRep(Object *subject) {
// Clean out decayed reputations
decayPersonalRep();

// TODO
// Cycle through the stored reputations, looking for a matching ID
uint32 id = subject->getID();
for (std::vector<PersonalRep>::const_iterator it = _reputation.begin(); it != _reputation.end(); ++it) {
if (id == it->objectId) {
// Erase the matching rep
_reputation.erase(it);

// Reset the iterator
it = _reputation.begin();
}
}
}

/* ---- FactionList class ---- */
Expand Down

0 comments on commit 68864cf

Please sign in to comment.