1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

* added "Next hero" button functionality

* minor improvement for prison (hero appears at proper tile)
* only one spell can be casted per turn
* minor changes
This commit is contained in:
Michał W. Urbańczyk
2009-02-20 10:36:15 +00:00
parent c1109452d6
commit 6a3bfbee46
11 changed files with 93 additions and 17 deletions

View File

@ -18,7 +18,7 @@
#include "../CGameState.h"
#include "../lib/NetPacks.h"
#include "../StartInfo.h"
#include "../Map.h"
#include "../map.h"
std::map<int,std::map<int, std::vector<int> > > CGTeleport::objs;
IGameCallback * IObjectInterface::cb = NULL;
@ -554,6 +554,7 @@ void CGHeroInstance::onHeroVisit(const CGHeroInstance * h) const
{
if(cb->getHeroCount(h->tempOwner,false) < 8) //free hero slot
{
cb->changeObjPos(id,pos+int3(1,0,0),0);
cb->setObjProperty(id,6,34); //set ID to 34
cb->giveHero(id,h->tempOwner); //recreates def and adds hero to player