diff --git a/include/vcmi/Skill.h b/include/vcmi/Skill.h index 363e67869..16ce88767 100644 --- a/include/vcmi/Skill.h +++ b/include/vcmi/Skill.h @@ -19,7 +19,8 @@ class SecondarySkill; class DLL_LINKAGE Skill : public EntityT { public: - + virtual std::string getDescriptionTextID(int level) const = 0; + virtual std::string getDescriptionTranslated(int level) const = 0; }; diff --git a/include/vcmi/SkillService.h b/include/vcmi/SkillService.h index ce0fa8b12..6e8618898 100644 --- a/include/vcmi/SkillService.h +++ b/include/vcmi/SkillService.h @@ -15,9 +15,9 @@ VCMI_LIB_NAMESPACE_BEGIN class SecondarySkill; -class CSkill; +class Skill; -class DLL_LINKAGE SkillService : public EntityServiceT +class DLL_LINKAGE SkillService : public EntityServiceT { public: }; diff --git a/lib/CSkillHandler.h b/lib/CSkillHandler.h index bf48b18f4..ec3b87ca5 100644 --- a/lib/CSkillHandler.h +++ b/lib/CSkillHandler.h @@ -63,8 +63,8 @@ public: std::string getNameTextID() const override; std::string getNameTranslated() const override; - std::string getDescriptionTextID(int level) const; - std::string getDescriptionTranslated(int level) const; + std::string getDescriptionTextID(int level) const override; + std::string getDescriptionTranslated(int level) const override; const LevelInfo & at(int level) const; LevelInfo & at(int level); @@ -89,7 +89,7 @@ public: friend DLL_LINKAGE std::ostream & operator<<(std::ostream & out, const CSkill::LevelInfo & info); }; -class DLL_LINKAGE CSkillHandler: public CHandlerBase +class DLL_LINKAGE CSkillHandler: public CHandlerBase { public: CSkillHandler(); diff --git a/scripting/lua/api/Artifact.cpp b/scripting/lua/api/Artifact.cpp index 405e03ca0..0fe72a1c9 100644 --- a/scripting/lua/api/Artifact.cpp +++ b/scripting/lua/api/Artifact.cpp @@ -31,13 +31,13 @@ const std::vector ArtifactProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, {"getId", LuaMethodWrapper::getId), &EntityT::getId>::invoke, false}, {"accessBonuses", LuaMethodWrapper::accessBonuses), &EntityWithBonuses::accessBonuses>::invoke, false}, - {"getDescription", LuaMethodWrapper::invoke, false}, - {"getEventText", LuaMethodWrapper::invoke, false}, + {"getDescription", LuaMethodWrapper::invoke, false}, + {"getEventText", LuaMethodWrapper::invoke, false}, {"isBig", LuaMethodWrapper::invoke, false}, {"isTradable", LuaMethodWrapper::invoke, false}, {"getPrice", LuaMethodWrapper::invoke, false}, diff --git a/scripting/lua/api/BattleCb.cpp b/scripting/lua/api/BattleCb.cpp index 222e6403c..de4e87a83 100644 --- a/scripting/lua/api/BattleCb.cpp +++ b/scripting/lua/api/BattleCb.cpp @@ -88,7 +88,7 @@ int BattleCbProxy::getTerrainType(lua_State * L) if(!S.tryGet(1, object)) return S.retVoid(); - return LuaStack::quickRetInt(L, object->battleTerrainType()); + return LuaStack::quickRetInt(L, object->battleTerrainType().getNum()); } int BattleCbProxy::getUnitByPos(lua_State * L) diff --git a/scripting/lua/api/Creature.cpp b/scripting/lua/api/Creature.cpp index 0b4713a83..bf6ed9e9c 100644 --- a/scripting/lua/api/Creature.cpp +++ b/scripting/lua/api/Creature.cpp @@ -31,12 +31,12 @@ const std::vector CreatureProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, {"accessBonuses", LuaMethodWrapper::accessBonuses), &EntityWithBonuses::accessBonuses>::invoke, false}, {"getMaxHealth", LuaMethodWrapper::invoke, false}, - {"getPluralName", LuaMethodWrapper::invoke, false}, - {"getSingularName", LuaMethodWrapper::invoke, false}, + {"getPluralName", LuaMethodWrapper::invoke, false}, + {"getSingularName", LuaMethodWrapper::invoke, false}, {"getAdvMapAmountMin", LuaMethodWrapper::invoke, false}, {"getAdvMapAmountMax", LuaMethodWrapper::invoke, false}, diff --git a/scripting/lua/api/Faction.cpp b/scripting/lua/api/Faction.cpp index 358c43dcb..07cce7462 100644 --- a/scripting/lua/api/Faction.cpp +++ b/scripting/lua/api/Faction.cpp @@ -30,7 +30,7 @@ const std::vector FactionProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, {"hasTown", LuaMethodWrapper::invoke, false}, }; diff --git a/scripting/lua/api/HeroClass.cpp b/scripting/lua/api/HeroClass.cpp index 03835c4e5..31f0c88bf 100644 --- a/scripting/lua/api/HeroClass.cpp +++ b/scripting/lua/api/HeroClass.cpp @@ -29,7 +29,7 @@ const std::vector HeroClassProxy::REGISTER_CUSTOM {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, }; } diff --git a/scripting/lua/api/HeroType.cpp b/scripting/lua/api/HeroType.cpp index c48ee8f48..87a4d8410 100644 --- a/scripting/lua/api/HeroType.cpp +++ b/scripting/lua/api/HeroType.cpp @@ -30,7 +30,7 @@ const std::vector HeroTypeProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, }; diff --git a/scripting/lua/api/Skill.cpp b/scripting/lua/api/Skill.cpp index bf00a0cca..eb08e3832 100644 --- a/scripting/lua/api/Skill.cpp +++ b/scripting/lua/api/Skill.cpp @@ -29,7 +29,7 @@ const std::vector SkillProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, }; } diff --git a/scripting/lua/api/Spell.cpp b/scripting/lua/api/Spell.cpp index cd3eb9a3f..4460b2deb 100644 --- a/scripting/lua/api/Spell.cpp +++ b/scripting/lua/api/Spell.cpp @@ -33,7 +33,7 @@ const std::vector SpellProxy::REGISTER_CUSTOM = {"getIconIndex", LuaMethodWrapper::invoke, false}, {"getIndex", LuaMethodWrapper::invoke, false}, {"getJsonKey", LuaMethodWrapper::invoke, false}, - {"getName", LuaMethodWrapper::invoke, false}, + {"getName", LuaMethodWrapper::invoke, false}, {"isAdventure", LuaMethodWrapper::invoke, false}, {"isCombat", LuaMethodWrapper::invoke, false}, @@ -48,7 +48,7 @@ const std::vector SpellProxy::REGISTER_CUSTOM = {"getCost", LuaMethodWrapper::invoke, false}, {"getBasePower", LuaMethodWrapper::invoke, false}, {"getLevelPower", LuaMethodWrapper::invoke, false}, - {"getLevelDescription", LuaMethodWrapper::invoke, false}, + {"getLevelDescription", LuaMethodWrapper::invoke, false}, }; }