1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-16 09:28:24 +02:00

Enabled new secondary skills to be created (#438)

* Universities, Scholars and Witch Huts may offer new skills
* Moved encode/decodeSkill to CSkillHandler
* Refactored CSkill interface and CSkill::LevelInfo image storage
* Legacy game constants renamed to ORIGINAL_XXX_QUANTITY
This commit is contained in:
Henning Koehler
2018-03-31 18:56:40 +13:00
committed by ArseniyShestakov
parent b09a54fa9c
commit 6ddcb079a4
21 changed files with 207 additions and 124 deletions
+2 -1
View File
@@ -18,6 +18,7 @@
#include "../CGameState.h"
#include "CGTownInstance.h"
#include "../CModHandler.h"
#include "../CSkillHandler.h"
///helpers
static void openWindow(const OpenWindow::EWindow type, const int id1, const int id2 = -1)
@@ -299,7 +300,7 @@ void CGBlackMarket::newTurn(CRandomGenerator & rand) const
void CGUniversity::initObj(CRandomGenerator & rand)
{
std::vector<int> toChoose;
for(int i = 0; i < GameConstants::SKILL_QUANTITY; ++i)
for(int i = 0; i < VLC->skillh->size(); ++i)
{
if(cb->isAllowed(2, i))
{