1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Smarter implementation of last change.

This commit is contained in:
DjWarmonger 2011-08-06 07:15:21 +00:00
parent e67b7b9da4
commit d3a014ee94
2 changed files with 1 additions and 3 deletions

View File

@ -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<const CGHeroInstance*>(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<const CStack*>(stackNode)->shots);
else
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
}

View File

@ -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<SComponent*> upgResCost; //cost of upgrade (if not possible then empty)
std::vector<CBonusItem*> bonusItems;
std::vector<LRClickableAreaWText*> spellEffects;