mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
* fixed crash on closing application
* unified yes/no and selection dialog interface calls * VCMI won't anymore be always giving all three stacks in the starting armies * fix for drawing starting army creatures count * support for School of Magic * support for School of War * support for Pillar of Fire * minor changes
This commit is contained in:
@@ -282,28 +282,11 @@ void HeroLevelUp::applyCl( CClient *cl )
|
||||
}
|
||||
}
|
||||
|
||||
void SelectionDialog::applyCl( CClient *cl )
|
||||
void BlockingDialog::applyCl( CClient *cl )
|
||||
{
|
||||
std::vector<Component*> comps;
|
||||
for(size_t i=0; i < components.size(); ++i) {
|
||||
comps.push_back(&components[i]);
|
||||
}
|
||||
std::string str = toString(text);
|
||||
if(vstd::contains(cl->playerint,player))
|
||||
cl->playerint[player]->showSelDialog(str,comps,id);
|
||||
else
|
||||
tlog2 << "We received SelectionDialog for not our player...\n";
|
||||
}
|
||||
|
||||
void YesNoDialog::applyCl( CClient *cl )
|
||||
{
|
||||
std::vector<Component*> comps;
|
||||
for(size_t i=0; i < components.size(); ++i) {
|
||||
comps.push_back(&components[i]);
|
||||
}
|
||||
std::string str = toString(text);
|
||||
if(vstd::contains(cl->playerint,player))
|
||||
cl->playerint[player]->showYesNoDialog(str,comps,id);
|
||||
cl->playerint[player]->showBlockingDialog(str,components,id,selection(),cancel());
|
||||
else
|
||||
tlog2 << "We received YesNoDialog for not our player...\n";
|
||||
}
|
||||
@@ -417,7 +400,7 @@ void EndAction::applyCl( CClient *cl )
|
||||
void SystemMessage::applyCl( CClient *cl )
|
||||
{
|
||||
std::ostringstream str;
|
||||
str << "System message from server: " << text;
|
||||
str << "System message: " << text;
|
||||
|
||||
tlog4 << str.str() << std::endl;
|
||||
if(LOCPLINT)
|
||||
|
||||
Reference in New Issue
Block a user