mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
fix test & fix build & suggested changes
This commit is contained in:
@@ -396,7 +396,7 @@ void BattleResultProcessor::endBattleConfirm(const CBattleInfoCallback & battle)
|
||||
for (auto armySlot : battle.battleGetArmyObject(loser)->stacks)
|
||||
{
|
||||
auto artifactsWorn = armySlot.second->artifactsWorn;
|
||||
for(auto & artSlot : artifactsWorn)
|
||||
for(const auto & artSlot : artifactsWorn)
|
||||
{
|
||||
MoveArtifact ma;
|
||||
ma.src = ArtifactLocation(finishingBattle->loserHero->id, artSlot.first);
|
||||
|
||||
@@ -17,20 +17,6 @@
|
||||
#include "../../lib/networkPacks/PacksForServer.h"
|
||||
#include "../../lib/serializer/Cast.h"
|
||||
|
||||
struct GetEngagedHeroIds
|
||||
{
|
||||
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CGHeroInstance> & h) const
|
||||
{
|
||||
return h->id;
|
||||
}
|
||||
std::optional<ObjectInstanceID> operator()(const ConstTransitivePtr<CStackInstance> & s) const
|
||||
{
|
||||
if(s->armyObj && s->armyObj->ID == Obj::HERO)
|
||||
return s->armyObj->id;
|
||||
return std::optional<ObjectInstanceID>();
|
||||
}
|
||||
};
|
||||
|
||||
TimerPauseQuery::TimerPauseQuery(CGameHandler * owner, PlayerColor player):
|
||||
CQuery(owner)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user