1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
vcmi/lib/gameState/RumorState.cpp

34 lines
588 B
C++
Raw Normal View History

/*
* RumorState.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#include "StdInc.h"
#include "RumorState.h"
2024-07-12 14:15:30 +02:00
VCMI_LIB_NAMESPACE_BEGIN
bool RumorState::update(int id, int extra)
{
if(vstd::contains(last, type))
{
if(last[type].first != id)
{
last[type].first = id;
last[type].second = extra;
}
else
return false;
}
else
last[type] = std::make_pair(id, extra);
return true;
}
2024-07-12 14:15:30 +02:00
VCMI_LIB_NAMESPACE_END