1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

enabled config of skill descriptions

This commit is contained in:
Henning Koehler
2017-08-25 13:35:02 +12:00
parent 8c7895239e
commit 0357a4fe3b
12 changed files with 128 additions and 48 deletions

View File

@@ -9,6 +9,8 @@
*/
#include "StdInc.h"
#include "CGameInfo.h"
#include "CSkillHandler.h"
#include "CGeneralTextHandler.h"
#include "../lib/VCMI_Lib.h"
@@ -32,5 +34,14 @@ void CGameInfo::setFromLib()
heroh = VLC->heroh;
objh = VLC->objh;
spellh = VLC->spellh;
skillh = VLC->skillh;
objtypeh = VLC->objtypeh;
}
const std::string & CGameInfo::skillInfo(int skill, int level) const
{
const std::string & desc = (*skillh)[SecondarySkill(skill)]->getDescription(level);
if(desc.size() > 0)
return desc;
return generaltexth->skillInfoTexts[skill][level-1];
}