mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Drop battle elapsed time measurement, restore avHexes.
Github validation report fixes.
This commit is contained in:
@@ -58,7 +58,7 @@ void LuaSpellEffect::adjustTargetTypes(std::vector<TargetType> & types) const
|
||||
|
||||
}
|
||||
|
||||
void LuaSpellEffect::adjustAffectedHexes(std::set<BattleHex> & hexes, const Mechanics * m, const Target & spellTarget) const
|
||||
void LuaSpellEffect::adjustAffectedHexes(BattleHexArray & hexes, const Mechanics * m, const Target & spellTarget) const
|
||||
{
|
||||
|
||||
}
|
||||
@@ -98,7 +98,7 @@ bool LuaSpellEffect::applicable(Problem & problem, const Mechanics * m, const Ef
|
||||
for(const auto & dest : target)
|
||||
{
|
||||
JsonNode targetData;
|
||||
targetData.Vector().emplace_back(dest.hexValue.hex);
|
||||
targetData.Vector().emplace_back(static_cast<si16>(dest.hexValue));
|
||||
|
||||
if(dest.unitValue)
|
||||
targetData.Vector().emplace_back(dest.unitValue->unitId());
|
||||
@@ -141,7 +141,7 @@ void LuaSpellEffect::apply(ServerCallback * server, const Mechanics * m, const E
|
||||
for(const auto & dest : target)
|
||||
{
|
||||
JsonNode targetData;
|
||||
targetData.Vector().emplace_back(dest.hexValue.hex);
|
||||
targetData.Vector().emplace_back(static_cast<si16>(dest.hexValue));
|
||||
|
||||
if(dest.unitValue)
|
||||
targetData.Vector().emplace_back(dest.unitValue->unitId());
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
void adjustTargetTypes(std::vector<TargetType> & types) const override;
|
||||
|
||||
void adjustAffectedHexes(std::set<BattleHex> & hexes, const Mechanics * m, const Target & spellTarget) const override;
|
||||
void adjustAffectedHexes(BattleHexArray & hexes, const Mechanics * m, const Target & spellTarget) const override;
|
||||
|
||||
bool applicable(Problem & problem, const Mechanics * m) const override;
|
||||
bool applicable(Problem & problem, const Mechanics * m, const EffectTarget & target) const override;
|
||||
|
||||
@@ -99,11 +99,13 @@ int BattleCbProxy::getUnitByPos(lua_State * L)
|
||||
if(!S.tryGet(1, object))
|
||||
return S.retVoid();
|
||||
|
||||
BattleHex hex;
|
||||
si16 hexVal;
|
||||
|
||||
if(!S.tryGet(2, hex.hex))
|
||||
if(!S.tryGet(2, hexVal))
|
||||
return S.retNil();
|
||||
|
||||
BattleHex hex(hexVal);
|
||||
|
||||
bool onlyAlive;
|
||||
|
||||
if(!S.tryGet(3, onlyAlive))
|
||||
|
||||
@@ -47,7 +47,7 @@ int BattleStackMovedProxy::addTileToMove(lua_State * L)
|
||||
lua_Integer hex = 0;
|
||||
if(!S.tryGetInteger(2, hex))
|
||||
return S.retVoid();
|
||||
object->tilesToMove.emplace_back(hex);
|
||||
object->tilesToMove.insert(hex);
|
||||
return S.retVoid();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user