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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user