diff --git a/client/CCreatureWindow.cpp b/client/CCreatureWindow.cpp index c31ad0630..47aecdc1c 100644 --- a/client/CCreatureWindow.cpp +++ b/client/CCreatureWindow.cpp @@ -43,7 +43,6 @@ CCreatureWindow::CCreatureWindow (const CStack &stack, int Type) : type(Type) { OBJ_CONSTRUCTION_CAPTURING_ALL; - battleStack = &stack; if (stack.base) init(stack.base, &stack, dynamic_cast(stack.base->armyObj)); else @@ -338,7 +337,7 @@ void CCreatureWindow::showAll(SDL_Surface * to) if(stackNode->valOfBonuses(Bonus::SHOTS) && stackNode->hasBonusOfType(Bonus::SHOOTER)) {//only for shooting units - important with wog exp shooters if (type == BATTLE) - printLine(2, CGI->generaltexth->allTexts[198], battleStack->shots); + printLine(2, CGI->generaltexth->allTexts[198], dynamic_cast(stackNode)->shots); else printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS)); } diff --git a/client/CCreatureWindow.h b/client/CCreatureWindow.h index 3cd768221..d3c001bc0 100644 --- a/client/CCreatureWindow.h +++ b/client/CCreatureWindow.h @@ -33,7 +33,6 @@ public: const CStackInstance *stack; const CBonusSystemNode *stackNode; const CGHeroInstance *heroOwner; - const CStack * battleStack; //determine the umber of shots in battle std::vector upgResCost; //cost of upgrade (if not possible then empty) std::vector bonusItems; std::vector spellEffects;