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