1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

* resting in town with mage guild will replenih all the mana points

* battle will end when one side has only war machines
* fixed crasbug occurring on revisiting objects (by pressing space)
* started writing support for artifacts
This commit is contained in:
Michał W. Urbańczyk
2009-04-03 22:34:31 +00:00
parent f794644c2a
commit 1983aee1b2
16 changed files with 447 additions and 153 deletions

View File

@@ -211,9 +211,21 @@ void SetHeroesInTown::applyCl( CClient *cl )
void SetHeroArtifacts::applyCl( CClient *cl )
{
CGHeroInstance *t = GS(cl)->getHero(hid);
if(vstd::contains(cl->playerint,t->tempOwner))
cl->playerint[t->tempOwner]->heroArtifactSetChanged(t);
CGHeroInstance *h = GS(cl)->getHero(hid);
CGameInterface *player = (vstd::contains(cl->playerint,h->tempOwner) ? cl->playerint[h->tempOwner] : NULL);
if(!player)
return;
player->heroArtifactSetChanged(h);
BOOST_FOREACH(HeroBonus *bonus, gained)
{
player->heroBonusChanged(h,*bonus,true);
}
BOOST_FOREACH(HeroBonus *bonus, lost)
{
player->heroBonusChanged(h,*bonus,false);
}
}
void HeroRecruited::applyCl( CClient *cl )