mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +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:
committed by
ArseniyShestakov
parent
b09a54fa9c
commit
6ddcb079a4
@@ -24,6 +24,7 @@
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/CCreatureHandler.h"
|
||||
#include "CBitmapHandler.h"
|
||||
#include "../lib/CSkillHandler.h"
|
||||
#include "../lib/spells/CSpellHandler.h"
|
||||
#include "../lib/CGameState.h"
|
||||
#include "../lib/JsonNode.h"
|
||||
@@ -443,4 +444,16 @@ void Graphics::initializeImageLists()
|
||||
addImageListEntry(spell->id, "SPELLBON", spell->iconScenarioBonus);
|
||||
addImageListEntry(spell->id, "SPELLSCR", spell->iconScroll);
|
||||
}
|
||||
|
||||
for(const CSkill * skill : CGI->skillh->objects)
|
||||
{
|
||||
for(int level = 1; level <= 3; level++)
|
||||
{
|
||||
int frame = 2 + level + 3 * skill->id;
|
||||
const CSkill::LevelInfo & skillAtLevel = skill->at(level);
|
||||
addImageListEntry(frame, "SECSK32", skillAtLevel.iconSmall);
|
||||
addImageListEntry(frame, "SECSKILL", skillAtLevel.iconMedium);
|
||||
addImageListEntry(frame, "SECSK82", skillAtLevel.iconLarge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user