|
@@ -1327,6 +1327,9 @@ DLL_LINKAGE std::ostream & operator<<(std::ostream &out, const Bonus &bonus)
|
|
|
printField(effectRange);
|
|
printField(effectRange);
|
|
|
#undef printField
|
|
#undef printField
|
|
|
|
|
|
|
|
|
|
+ if(bonus.updater)
|
|
|
|
|
+ out << "\tUpdater: " << bonus.updater->toString() << "\n";
|
|
|
|
|
+
|
|
|
return out;
|
|
return out;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1571,6 +1574,11 @@ IUpdater::~IUpdater()
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+std::string IUpdater::toString() const
|
|
|
|
|
+{
|
|
|
|
|
+ return typeid(*this).name();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
ScalingUpdater::ScalingUpdater() : valPer20(0), stepSize(1)
|
|
ScalingUpdater::ScalingUpdater() : valPer20(0), stepSize(1)
|
|
|
{
|
|
{
|
|
|
}
|
|
}
|
|
@@ -1596,6 +1604,13 @@ bool ScalingUpdater::update(Bonus & b, const CBonusSystemNode & context) const
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+std::string ScalingUpdater::toString() const
|
|
|
|
|
+{
|
|
|
|
|
+ char buf[100];
|
|
|
|
|
+ sprintf(buf, "ScalingUpdater(valPer20=%d, stepSize=%d)", valPer20, stepSize);
|
|
|
|
|
+ return std::string(buf);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
std::shared_ptr<Bonus> Bonus::addUpdater(TUpdaterPtr Updater)
|
|
std::shared_ptr<Bonus> Bonus::addUpdater(TUpdaterPtr Updater)
|
|
|
{
|
|
{
|
|
|
updater = Updater;
|
|
updater = Updater;
|