mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fix build
This commit is contained in:
@@ -183,7 +183,7 @@ void CPlayerInterface::playerStartsTurn(PlayerColor player)
|
|||||||
|
|
||||||
// close window from another player
|
// close window from another player
|
||||||
if(auto w = GH.windows().topWindow<CInfoWindow>())
|
if(auto w = GH.windows().topWindow<CInfoWindow>())
|
||||||
if(w->ID == -1 && player != playerID)
|
if(w->ID == QueryID::NONE && player != playerID)
|
||||||
w->close();
|
w->close();
|
||||||
|
|
||||||
// remove all dialogs that do not expect query answer
|
// remove all dialogs that do not expect query answer
|
||||||
|
|||||||
@@ -101,62 +101,53 @@ std::string CBonusTypeHandler::bonusToGraphics(const std::shared_ptr<Bonus> & bo
|
|||||||
}
|
}
|
||||||
case BonusType::SPELL_DAMAGE_REDUCTION: //Spell damage reduction for all schools
|
case BonusType::SPELL_DAMAGE_REDUCTION: //Spell damage reduction for all schools
|
||||||
{
|
{
|
||||||
switch(bonus->subtype)
|
if (bonus->subtype == SpellSchool::ANY.getNum())
|
||||||
{
|
|
||||||
case SpellSchool(ESpellSchool::ANY):
|
|
||||||
fileName = "E_GOLEM.bmp";
|
fileName = "E_GOLEM.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::AIR):
|
if (bonus->subtype == SpellSchool::AIR.getNum())
|
||||||
fileName = "E_LIGHT.bmp";
|
fileName = "E_LIGHT.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::FIRE):
|
if (bonus->subtype == SpellSchool::FIRE.getNum())
|
||||||
fileName = "E_FIRE.bmp";
|
fileName = "E_FIRE.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::WATER):
|
if (bonus->subtype == SpellSchool::WATER.getNum())
|
||||||
fileName = "E_COLD.bmp";
|
fileName = "E_COLD.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::EARTH):
|
if (bonus->subtype == SpellSchool::EARTH.getNum())
|
||||||
fileName = "E_SPEATH1.bmp"; //No separate icon for earth damage
|
fileName = "E_SPEATH1.bmp"; //No separate icon for earth damage
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BonusType::SPELL_SCHOOL_IMMUNITY: //for all school
|
case BonusType::SPELL_SCHOOL_IMMUNITY: //for all school
|
||||||
{
|
{
|
||||||
switch(bonus->subtype)
|
if (bonus->subtype == SpellSchool::AIR.getNum())
|
||||||
{
|
|
||||||
case SpellSchool(ESpellSchool::AIR):
|
|
||||||
fileName = "E_SPAIR.bmp";
|
fileName = "E_SPAIR.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::FIRE):
|
if (bonus->subtype == SpellSchool::FIRE.getNum())
|
||||||
fileName = "E_SPFIRE.bmp";
|
fileName = "E_SPFIRE.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::WATER):
|
if (bonus->subtype == SpellSchool::WATER.getNum())
|
||||||
fileName = "E_SPWATER.bmp";
|
fileName = "E_SPWATER.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::EARTH):
|
if (bonus->subtype == SpellSchool::EARTH.getNum())
|
||||||
fileName = "E_SPEATH.bmp";
|
fileName = "E_SPEATH.bmp";
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BonusType::NEGATIVE_EFFECTS_IMMUNITY:
|
case BonusType::NEGATIVE_EFFECTS_IMMUNITY:
|
||||||
{
|
{
|
||||||
switch(bonus->subtype)
|
if (bonus->subtype == SpellSchool::AIR.getNum())
|
||||||
{
|
|
||||||
case SpellSchool(ESpellSchool::AIR):
|
|
||||||
fileName = "E_SPAIR1.bmp";
|
fileName = "E_SPAIR1.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::FIRE):
|
if (bonus->subtype == SpellSchool::FIRE.getNum())
|
||||||
fileName = "E_SPFIRE1.bmp";
|
fileName = "E_SPFIRE1.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::WATER):
|
if (bonus->subtype == SpellSchool::WATER.getNum())
|
||||||
fileName = "E_SPWATER1.bmp";
|
fileName = "E_SPWATER1.bmp";
|
||||||
break;
|
|
||||||
case SpellSchool(ESpellSchool::EARTH):
|
if (bonus->subtype == SpellSchool::EARTH.getNum())
|
||||||
fileName = "E_SPEATH1.bmp";
|
fileName = "E_SPEATH1.bmp";
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BonusType::LEVEL_SPELL_IMMUNITY:
|
case BonusType::LEVEL_SPELL_IMMUNITY:
|
||||||
|
|||||||
@@ -914,6 +914,4 @@ using River = RiverId;
|
|||||||
using Road = RoadId;
|
using Road = RoadId;
|
||||||
using ETerrainId = TerrainId;
|
using ETerrainId = TerrainId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
VCMI_LIB_NAMESPACE_BEGIN
|
||||||
|
|
||||||
enum class PrimarySkill : int8_t
|
enum class PrimarySkill : int8_t
|
||||||
{
|
{
|
||||||
NONE = -1,
|
NONE = -1,
|
||||||
|
|||||||
@@ -213,5 +213,4 @@ namespace MappedKeys
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ namespace detail
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
struct IsRegularClass
|
struct IsRegularClass
|
||||||
{
|
{
|
||||||
static constexpr auto value = std::is_class<T>::value && !std::is_base_of<IdTag, T>::value;
|
static constexpr auto value = std::is_class<T>::value && !std::is_base_of<IdentifierBase, T>::value;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct IsIdClass
|
struct IsIdClass
|
||||||
{
|
{
|
||||||
static constexpr auto value = std::is_class<T>::value && std::is_base_of<IdTag, T>::value;
|
static constexpr auto value = std::is_class<T>::value && std::is_base_of<IdentifierBase, T>::value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
template<typename T, typename std::enable_if< detail::IsIdClass<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if< detail::IsIdClass<T>::value, int>::type = 0>
|
||||||
void push(const T & value)
|
void push(const T & value)
|
||||||
{
|
{
|
||||||
pushInteger(static_cast<lua_Integer>(value.toEnum()));
|
pushInteger(static_cast<lua_Integer>(value.getNum()));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename std::enable_if<detail::IsRegularClass<T>::value, int>::type = 0>
|
template<typename T, typename std::enable_if<detail::IsRegularClass<T>::value, int>::type = 0>
|
||||||
|
|||||||
Reference in New Issue
Block a user