|
|
@@ -1971,13 +1971,13 @@ JsonNode ILimiter::toJsonNode() const
|
|
|
|
|
|
int CCreatureTypeLimiter::limit(const BonusLimitationContext &context) const
|
|
|
{
|
|
|
- const CCreature *c = retrieveCreature(&context.node);
|
|
|
- if(!c)
|
|
|
- return true;
|
|
|
- return c != creature && (!includeUpgrades || !creature->isMyUpgrade(c));
|
|
|
- //drop bonus if it's not our creature and (we don`t check upgrades or its not our upgrade)
|
|
|
-}
|
|
|
-
|
|
|
+ const CCreature *c = retrieveCreature(&context.node);
|
|
|
+ if(!c)
|
|
|
+ return true;
|
|
|
+ return c->getId() != creature->getId() && (!includeUpgrades || !creature->isMyUpgrade(c));
|
|
|
+ //drop bonus if it's not our creature and (we don`t check upgrades or its not our upgrade)
|
|
|
+}
|
|
|
+
|
|
|
CCreatureTypeLimiter::CCreatureTypeLimiter(const CCreature & creature_, bool IncludeUpgrades)
|
|
|
: creature(&creature_), includeUpgrades(IncludeUpgrades)
|
|
|
{
|