mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
added debug info to skill loading
This commit is contained in:
parent
993b7bf614
commit
d8648288f0
@ -56,6 +56,12 @@ BonusList CSkill::getBonus(int level)
|
||||
return bonusByLevel[level];
|
||||
}
|
||||
|
||||
DLL_LINKAGE std::ostream & operator<<(std::ostream &out, const CSkill &skill)
|
||||
{
|
||||
out << "Skill(" << (int)skill.id << "," << skill.identifier << "): " << skill.bonusByLevel;
|
||||
return out;
|
||||
}
|
||||
|
||||
///CSkillHandler
|
||||
CSkillHandler::CSkillHandler()
|
||||
{
|
||||
@ -109,6 +115,9 @@ CSkill * CSkillHandler::loadFromJson(const JsonNode & json, const std::string &
|
||||
skill->addNewBonus(bonus, level);
|
||||
}
|
||||
}
|
||||
CLogger * logger = CLogger::getLogger(CLoggerDomain("skills"));
|
||||
logger->debugStream() << "loaded secondary skill " << identifier << "(" << (int)skill->id << ")";
|
||||
logger->traceStream() << *skill;
|
||||
|
||||
return skill;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
}
|
||||
|
||||
friend class CSkillHandler;
|
||||
friend std::ostream & operator<<(std::ostream &out, const CSkill &skill);
|
||||
};
|
||||
|
||||
class DLL_LINKAGE CSkillHandler: public CHandlerBase<SecondarySkill, CSkill>
|
||||
|
Loading…
Reference in New Issue
Block a user