1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Fixed blue tint for clones

This commit is contained in:
Ivan Savenko 2023-01-04 19:36:18 +02:00
parent d157735846
commit 21196e822f
3 changed files with 8 additions and 2 deletions

View File

@ -225,7 +225,7 @@ void BattleStacksController::stackAdded(const CStack * stack, bool instant)
{
addNewAnim(new ColorTransformAnimation(owner, stack, "summonFadeIn", nullptr));
if (stack->isClone())
addNewAnim(new ColorTransformAnimation(owner, stack, "cloning", nullptr));
addNewAnim(new ColorTransformAnimation(owner, stack, "cloning", SpellID(SpellID::CLONE).toSpell() ));
});
}
}
@ -816,7 +816,7 @@ void BattleStacksController::removeExpiredColorFilters()
{
if (filter.persistent)
return false;
if (filter.effect == ColorFilter::genEmptyShifter())
if (filter.effect != ColorFilter::genEmptyShifter())
return false;
if (filter.source && filter.target->hasBonus(Selector::source(Bonus::SPELL_EFFECT, filter.source->id), Selector::all))
return false;

View File

@ -34,6 +34,11 @@ SDL_Color ColorFilter::shiftColor(const SDL_Color & in) const
};
}
bool ColorFilter::operator != (const ColorFilter & other) const
{
return !(this->operator==(other));
}
bool ColorFilter::operator == (const ColorFilter & other) const
{
return

View File

@ -35,6 +35,7 @@ public:
SDL_Color shiftColor(const SDL_Color & in) const;
bool operator == (const ColorFilter & other) const;
bool operator != (const ColorFilter & other) const;
/// Generates empty object that has no effect on image
static ColorFilter genEmptyShifter();