mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Smarter implementation of last change.
This commit is contained in:
@ -43,7 +43,6 @@ CCreatureWindow::CCreatureWindow (const CStack &stack, int Type)
|
|||||||
: type(Type)
|
: type(Type)
|
||||||
{
|
{
|
||||||
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
OBJ_CONSTRUCTION_CAPTURING_ALL;
|
||||||
battleStack = &stack;
|
|
||||||
if (stack.base)
|
if (stack.base)
|
||||||
init(stack.base, &stack, dynamic_cast<const CGHeroInstance*>(stack.base->armyObj));
|
init(stack.base, &stack, dynamic_cast<const CGHeroInstance*>(stack.base->armyObj));
|
||||||
else
|
else
|
||||||
@ -338,7 +337,7 @@ void CCreatureWindow::showAll(SDL_Surface * to)
|
|||||||
if(stackNode->valOfBonuses(Bonus::SHOTS) && stackNode->hasBonusOfType(Bonus::SHOOTER))
|
if(stackNode->valOfBonuses(Bonus::SHOTS) && stackNode->hasBonusOfType(Bonus::SHOOTER))
|
||||||
{//only for shooting units - important with wog exp shooters
|
{//only for shooting units - important with wog exp shooters
|
||||||
if (type == BATTLE)
|
if (type == BATTLE)
|
||||||
printLine(2, CGI->generaltexth->allTexts[198], battleStack->shots);
|
printLine(2, CGI->generaltexth->allTexts[198], dynamic_cast<const CStack*>(stackNode)->shots);
|
||||||
else
|
else
|
||||||
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
|
printLine(2, CGI->generaltexth->allTexts[198], stackNode->valOfBonuses(Bonus::SHOTS));
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ public:
|
|||||||
const CStackInstance *stack;
|
const CStackInstance *stack;
|
||||||
const CBonusSystemNode *stackNode;
|
const CBonusSystemNode *stackNode;
|
||||||
const CGHeroInstance *heroOwner;
|
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<SComponent*> upgResCost; //cost of upgrade (if not possible then empty)
|
||||||
std::vector<CBonusItem*> bonusItems;
|
std::vector<CBonusItem*> bonusItems;
|
||||||
std::vector<LRClickableAreaWText*> spellEffects;
|
std::vector<LRClickableAreaWText*> spellEffects;
|
||||||
|
Reference in New Issue
Block a user