mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Separated battle control panel into new class, refactoring of
CGStatusBar to allow shared API with battle console
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "battle/CBattleInterface.h"
|
||||
#include "battle/CBattleFieldController.h"
|
||||
#include "battle/CBattleInterfaceClasses.h"
|
||||
#include "battle/CBattleControlPanel.h"
|
||||
#include "../CCallback.h"
|
||||
#include "windows/CCastleInterface.h"
|
||||
#include "gui/CCursorHandler.h"
|
||||
@@ -1028,19 +1029,19 @@ void CPlayerInterface::battleAttack(const BattleAttack * ba)
|
||||
|
||||
if(ba->lucky()) //lucky hit
|
||||
{
|
||||
battleInt->console->addText(attacker->formatGeneralMessage(-45));
|
||||
battleInt->controlPanel->console->addText(attacker->formatGeneralMessage(-45));
|
||||
battleInt->displayEffect(18, attacker->getPosition());
|
||||
CCS->soundh->playSound(soundBase::GOODLUCK);
|
||||
}
|
||||
if(ba->unlucky()) //unlucky hit
|
||||
{
|
||||
battleInt->console->addText(attacker->formatGeneralMessage(-44));
|
||||
battleInt->controlPanel->console->addText(attacker->formatGeneralMessage(-44));
|
||||
battleInt->displayEffect(48, attacker->getPosition());
|
||||
CCS->soundh->playSound(soundBase::BADLUCK);
|
||||
}
|
||||
if(ba->deathBlow())
|
||||
{
|
||||
battleInt->console->addText(attacker->formatGeneralMessage(365));
|
||||
battleInt->controlPanel->console->addText(attacker->formatGeneralMessage(365));
|
||||
for(auto & elem : ba->bsa)
|
||||
{
|
||||
const CStack * attacked = cb->battleGetStackByID(elem.stackAttacked);
|
||||
|
||||
Reference in New Issue
Block a user