1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

* fixed crashes when town is placed out of the map boundaries

* for screen is updated after buying creatures
* fixed crashbug on maps with random monster
* proper images of war machines are displayed in blacksmith
* picking starting hero should work again
* Ice Elemental will be treated as two-hex creature
* minor fixes
This commit is contained in:
Michał W. Urbańczyk
2008-08-29 21:41:32 +00:00
parent 7722d058f0
commit bca18a31c3
18 changed files with 164 additions and 68 deletions

View File

@@ -350,7 +350,9 @@ void CClient::process(int what)
*serv >> ns;
std::cout << "Setting available creatures in " << ns.tid << std::endl;
gs->apply(&ns);
//TODO: do we need to inform interface?
CGTownInstance *t = gs->getTown(ns.tid);
if(vstd::contains(playerint,t->tempOwner))
playerint[t->tempOwner]->availableCreaturesChanged(t);
break;
}
case 508:
@@ -527,8 +529,13 @@ void CClient::process(int what)
}
void CClient::waitForMoveAndSend(int color)
{
BattleAction ba = playerint[color]->activeStack(gs->curB->activeStack);
*serv << ui16(3002) << ba;
try
{
BattleAction ba = playerint[color]->activeStack(gs->curB->activeStack);
*serv << ui16(3002) << ba;
return;
}HANDLE_EXCEPTION
std::cout << "We should not be here!" << std::endl;
}
void CClient::run()
{