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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user