|
@@ -94,7 +94,7 @@ void LRClickableAreaWTextComp::clickLeft(tribool down, bool previousState)
|
|
|
}
|
|
|
|
|
|
LRClickableAreaWTextComp::LRClickableAreaWTextComp(const Rect &Pos, int BaseType)
|
|
|
- : LRClickableAreaWText(Pos), baseType(BaseType), bonusValue(-1)
|
|
|
+ : LRClickableAreaWText(Pos), baseType(BaseType), bonusValue(-1), type(-1)
|
|
|
{
|
|
|
}
|
|
|
|
|
@@ -170,8 +170,8 @@ void LRClickableAreaOpenTown::clickRight(tribool down, bool previousState)
|
|
|
LOCPLINT->openTownWindow(town);//TODO: popup?
|
|
|
}
|
|
|
|
|
|
-LRClickableAreaOpenTown::LRClickableAreaOpenTown()
|
|
|
- : LRClickableAreaWTextComp(Rect(0,0,0,0), -1)
|
|
|
+LRClickableAreaOpenTown::LRClickableAreaOpenTown(const Rect & Pos, const CGTownInstance * Town)
|
|
|
+ : LRClickableAreaWTextComp(Pos, -1), town(Town)
|
|
|
{
|
|
|
}
|
|
|
|
|
@@ -376,9 +376,9 @@ void MoraleLuckBox::set(const IBonusBearer *node)
|
|
|
baseType = componentType[morale];
|
|
|
text = CGI->generaltexth->arraytxt[textId[morale]];
|
|
|
boost::algorithm::replace_first(text,"%s",CGI->generaltexth->arraytxt[neutralDescr[morale]-mrlt]);
|
|
|
-
|
|
|
- if (morale && node && (node->hasBonusOfType(Bonus::UNDEAD)
|
|
|
- || node->hasBonusOfType(Bonus::BLOCK_MORALE)
|
|
|
+
|
|
|
+ if (morale && node && (node->hasBonusOfType(Bonus::UNDEAD)
|
|
|
+ || node->hasBonusOfType(Bonus::BLOCK_MORALE)
|
|
|
|| node->hasBonusOfType(Bonus::NON_LIVING)))
|
|
|
{
|
|
|
text += CGI->generaltexth->arraytxt[113]; //unaffected by morale
|