mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there. * Declared existing Entity APIs. * Added basic script context caching * Started Lua script module * Started Lua spell effect API * Started script state persistence * Started battle info callback binding * CommitPackage removed * Extracted spells::Caster to own header; Expanded Spell API. * implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C * !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented * Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key) * Re-enabled VERM macros. * !?GM0 added * !?TM implemented * Added !!MF:N * Started !?OB, !!BM, !!HE, !!OW, !!UN * Added basic support of w-variables * Added support for ERM indirect variables * Made !?FU regular trigger * !!re (ERA loop receiver) implemented * Fixed ERM receivers with zero args.
This commit is contained in:
@@ -163,7 +163,7 @@ std::string InfoBoxAbstractHeroData::getNameText()
|
||||
case HERO_EXPERIENCE:
|
||||
return CGI->generaltexth->jktexts[6];
|
||||
case HERO_SPECIAL:
|
||||
return CGI->heroh->heroes[getSubID()]->specName;
|
||||
return CGI->heroh->objects[getSubID()]->specName;
|
||||
case HERO_SECONDARY_SKILL:
|
||||
if (getValue())
|
||||
return CGI->skillh->skillName(getSubID());
|
||||
@@ -229,7 +229,7 @@ size_t InfoBoxAbstractHeroData::getImageIndex()
|
||||
switch (type)
|
||||
{
|
||||
case HERO_SPECIAL:
|
||||
return VLC->heroh->heroes[getSubID()]->imageIndex;
|
||||
return CGI->heroh->objects[getSubID()]->imageIndex;
|
||||
case HERO_PRIMARY_SKILL:
|
||||
return getSubID();
|
||||
case HERO_MANA:
|
||||
@@ -256,7 +256,7 @@ void InfoBoxAbstractHeroData::prepareMessage(std::string & text, std::shared_ptr
|
||||
switch (type)
|
||||
{
|
||||
case HERO_SPECIAL:
|
||||
text = CGI->heroh->heroes[getSubID()]->specDescr;
|
||||
text = CGI->heroh->objects[getSubID()]->specDescr;
|
||||
break;
|
||||
case HERO_PRIMARY_SKILL:
|
||||
text = CGI->generaltexth->arraytxt[2+getSubID()];
|
||||
|
||||
Reference in New Issue
Block a user