1
0
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:
Michał W. Urbańczyk
2009-04-11 01:32:50 +00:00
parent 7a9e323297
commit d72d988a9c
20 changed files with 362 additions and 248 deletions

View File

@@ -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)