mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
* version set to 0.62
* almost redone treasure chest * working gaining levels for heroes (including dialog with skill selection) * corrected another typo i cr_shots
This commit is contained in:
@@ -156,7 +156,7 @@ CClient::CClient(CConnection *con, StartInfo *si)
|
||||
playerint[color]->init(cb);
|
||||
}
|
||||
}
|
||||
CGI->consoleh->cb = new CCallback(gs,-1,this);
|
||||
cb = CGI->consoleh->cb = new CCallback(gs,-1,this);
|
||||
}
|
||||
CClient::~CClient(void)
|
||||
{
|
||||
@@ -220,6 +220,15 @@ void CClient::process(int what)
|
||||
playerint[gs->getHero(sps.id)->tempOwner]->heroPrimarySkillChanged(gs->getHero(sps.id),sps.which,sps.val);
|
||||
break;
|
||||
}
|
||||
case 106:
|
||||
{
|
||||
SetSecSkill sr;
|
||||
*serv >> sr;
|
||||
std::cout << "Changing hero secondary skill"<<std::endl;
|
||||
gs->apply(&sr);
|
||||
//TODO? - maybe inform interfaces
|
||||
break;
|
||||
}
|
||||
case 107:
|
||||
{
|
||||
ShowInInfobox sii;
|
||||
@@ -331,6 +340,28 @@ void CClient::process(int what)
|
||||
gs->mx->unlock();
|
||||
break;
|
||||
}
|
||||
case 2000:
|
||||
{
|
||||
HeroLevelUp bs;
|
||||
*serv >> bs;
|
||||
std::cout << "Hero levels up!" <<std::endl;
|
||||
gs->apply(&bs);
|
||||
CGHeroInstance *h = gs->getHero(bs.heroid);
|
||||
if(vstd::contains(playerint,h->tempOwner))
|
||||
playerint[h->tempOwner]->heroGotLevel(h,bs.primskill,bs.skills,boost::function<void(ui32)>(boost::bind(&CCallback::selectionMade,cb,_1,bs.id)));
|
||||
break;
|
||||
}
|
||||
case 2001:
|
||||
{
|
||||
SelectionDialog sd;
|
||||
*serv >> sd;
|
||||
std::cout << "Showing selection dialog " <<std::endl;
|
||||
std::vector<Component*> comps;
|
||||
for(int i=0;i<sd.components.size();i++)
|
||||
comps.push_back(&sd.components[i]);
|
||||
playerint[sd.player]->showSelDialog(toString(sd.text),comps,sd.id);
|
||||
break;
|
||||
}
|
||||
case 3000:
|
||||
{
|
||||
BattleStart bs;
|
||||
|
||||
Reference in New Issue
Block a user