MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / addStat

Method addStat

src/Battlescape/DebriefingState.cpp:305–316  ·  view source on GitHub ↗

* Adds to the debriefing stats. * @param name The untranslated name of the stat. * @param quantity The quantity to add. * @param score The score to add. */

Source from the content-addressed store, hash-verified

303 * @param score The score to add.
304 */
305void DebriefingState::addStat(const std::string &name, int quantity, int score)
306{
307 for (std::vector<DebriefingStat*>::iterator i = _stats.begin(); i != _stats.end(); ++i)
308 {
309 if ((*i)->item == name)
310 {
311 (*i)->qty = (*i)->qty + quantity;
312 (*i)->score = (*i)->score + score;
313 break;
314 }
315 }
316}
317
318/**
319 * Clears the alien base from supply missions that use it.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected