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

* minor changes to code handling cartographer (next time please make more documentation of your code, especially interfaces and especially when it's not consistent with the rest of the engine (map level description in this case) )

This commit is contained in:
mateuszb
2009-08-20 10:30:00 +00:00
parent de886abc0e
commit 9c45f050ef
3 changed files with 24 additions and 23 deletions

View File

@ -4179,18 +4179,14 @@ void CCartographer::buyMap (const CGHeroInstance *h, ui32 accept) const
cb->giveResource (h->tempOwner, 6, -1000);
FoWChange fw;
fw.player = h->tempOwner;
int floor, surface = 0;
int surface = 0;
if (cb->getTile(pos)->tertype == 8) //water
surface = 2;
else
surface = 1;
if (pos.z == 0) //ground
floor = 1;
else
floor = 2;
//reveal apropriate tiles
cb->getAllTiles (fw.tiles, h->tempOwner, floor, surface);
cb->getAllTiles (fw.tiles, h->tempOwner, pos.z, surface);
cb->sendAndApply (&fw);
cb->setObjProperty (id, 10, h->tempOwner);
}