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

* improved Events handling

* fixed saving town available creatures info
* minor improvements
This commit is contained in:
Michał W. Urbańczyk
2009-07-15 22:46:00 +00:00
parent 48661bd714
commit 23803c9f17
8 changed files with 34 additions and 27 deletions

View File

@@ -34,6 +34,7 @@
DLL_EXPORT void SetResource::applyGs( CGameState *gs )
{
amax(val, 0); //new value must be >= 0
gs->getPlayer(player)->resources[resid] = val;
}
@@ -141,6 +142,7 @@ DLL_EXPORT void ChangeSpells::applyGs( CGameState *gs )
DLL_EXPORT void SetMana::applyGs( CGameState *gs )
{
CGHeroInstance *hero = gs->getHero(hid);
amax(val, 0); //not less than 0
hero->mana = val;
}
@@ -424,10 +426,6 @@ DLL_EXPORT void GiveHero::applyGs( CGameState *gs )
h->inTownGarrison = false;
}
DLL_EXPORT void OpenWindow::applyGs(CGameState *gs)
{
}
DLL_EXPORT void NewTurn::applyGs( CGameState *gs )
{
gs->day = day;