mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
artifactMoved assertion fix
This commit is contained in:
parent
738a89bb99
commit
ca0f7aee7d
@ -287,13 +287,7 @@ void CWindowWithArtifacts::artifactMoved(const ArtifactLocation & srcLoc, const
|
||||
// Transition state. Nothing to do here. Just skip. Need to wait for final state.
|
||||
return;
|
||||
|
||||
// When moving one artifact onto another it leads to two art movements: dst->TRANSITION_POS; src->dst
|
||||
// However after first movement we pick the art from TRANSITION_POS and the second movement coming when
|
||||
// we have a different artifact may look surprising... but it's valid.
|
||||
|
||||
auto pickedArtInst = std::get<const CArtifactInstance*>(curState.value());
|
||||
assert(!pickedArtInst || destLoc.artHolder == std::get<const CGHeroInstance*>(curState.value())->id);
|
||||
|
||||
auto artifactMovedBody = [this, withRedraw, &destLoc, &pickedArtInst](auto artSetWeak) -> void
|
||||
{
|
||||
auto artSetPtr = artSetWeak.lock();
|
||||
|
Loading…
Reference in New Issue
Block a user