1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

* further fight with hanged scroll tab

* fixed r-click on FoW crash
* fixed crash on opening tavern window after load
* fixed recruiting new heroes after load
* fixed crash on loading map with spell scrolls
* fixed more crashes
* displpaying difficulty level of saved game
* added support for Library of Enlightenment
* added notification when saving is done
This commit is contained in:
Michał W. Urbańczyk
2009-02-01 14:11:41 +00:00
parent a560e9069a
commit 3d29c31deb
16 changed files with 169 additions and 38 deletions

View File

@@ -413,18 +413,19 @@ void CGameHandler::handleConnection(std::set<int> players, CConnection &c)
std::string fname;
Mapa * mapa;
c >> fname;
{
sendMessageTo(c,"Serializing game info...");
CSaveFile save(std::string("Games") + PATHSEPARATOR + fname + ".vlgm1");
char hlp[8] = "VCMISVG";
save << hlp << static_cast<CMapHeader&>(*gs->map) << *VLC << gs;
save << hlp << version << static_cast<CMapHeader&>(*gs->map) << gs->scenarioOps->difficulty << *VLC << gs;
}
{
sendMessageTo(c,"Serializing server info...");
CSaveFile save(std::string("Games") + PATHSEPARATOR + fname + ".vsgm1");
save << *this;
}
sendMessageTo(c,"Game has been succesfully saved!");
break;
}
case 99: //end!
@@ -2342,4 +2343,9 @@ void CGameHandler::setObjProperty( int objid, int prop, int val )
sob.what = prop;
sob.val = val;
sendAndApply(&sob);
}
void CGameHandler::sendMessageTo( CConnection &c, std::string message )
{
c << ui16(95) << message;
}