mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
* battle console displays notifications about wait/defend commands
This commit is contained in:
parent
5a36e61c32
commit
7405549733
@ -2076,6 +2076,48 @@ void CPlayerInterface::actionStarted(const BattleAction* action)
|
||||
else
|
||||
battleInt->attackingHero->setPhase(4);
|
||||
}
|
||||
if(action->actionType == 3) //defend
|
||||
{
|
||||
char txt[2000];
|
||||
CStack * stack = cb->battleGetStackByID(action->stackNumber);
|
||||
if(stack)
|
||||
{
|
||||
if(stack->amount == 1)
|
||||
{
|
||||
sprintf(txt, CGI->generaltexth->allTexts[120].c_str(), stack->creature->nameSing.c_str(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(txt, CGI->generaltexth->allTexts[121].c_str(), stack->creature->namePl.c_str(), 0);
|
||||
}
|
||||
LOCPLINT->battleInt->console->addText(txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
tlog1<<"Somthing wrong with stackNumber in actionStarted -> actionType 3"<<std::endl;
|
||||
}
|
||||
}
|
||||
if(action->actionType == 8) //wait
|
||||
{
|
||||
char txt[2000];
|
||||
CStack * stack = cb->battleGetStackByID(action->stackNumber);
|
||||
if(stack)
|
||||
{
|
||||
if(stack->amount == 1)
|
||||
{
|
||||
sprintf(txt, CGI->generaltexth->allTexts[136].c_str(), stack->creature->nameSing.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(txt, CGI->generaltexth->allTexts[137].c_str(), stack->creature->namePl.c_str());
|
||||
}
|
||||
LOCPLINT->battleInt->console->addText(txt);
|
||||
}
|
||||
else
|
||||
{
|
||||
tlog1<<"Somthing wrong with stackNumber in actionStarted -> actionType 8"<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CPlayerInterface::actionFinished(const BattleAction* action)
|
||||
|
@ -46,9 +46,9 @@ public:
|
||||
std::vector<std::string> restypes;
|
||||
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
||||
|
||||
//sec skills
|
||||
std::vector <std::string> skillName;
|
||||
std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
|
||||
//sec skills
|
||||
std::vector <std::string> skillName;
|
||||
std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
|
||||
std::vector<std::string> levels;
|
||||
|
||||
std::string getTitle(std::string text);
|
||||
|
Loading…
Reference in New Issue
Block a user