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

Moved game Modules to config file.

This commit is contained in:
DjWarmonger
2012-08-24 09:37:52 +00:00
parent d56e7c568a
commit 39d433c1c7
11 changed files with 55 additions and 24 deletions

View File

@@ -3,6 +3,7 @@
#include "CCreatureHandler.h"
#include "VCMI_Lib.h"
#include "CModHandler.h"
#include "CObjectHandler.h"
#include "IGameCallback.h"
#include "CGameState.h"
@@ -241,7 +242,7 @@ void CCreatureSet::setStackCount(TSlot slot, TQuantity count)
{
assert(hasStackAtSlot(slot));
assert(stacks[slot]->count + count > 0);
if (GameConstants::STACK_EXP && count > stacks[slot]->count)
if (VLC->modh->modules.STACK_EXP && count > stacks[slot]->count)
stacks[slot]->experience *= (count / static_cast<double>(stacks[slot]->count));
stacks[slot]->count = count;
armyChanged();
@@ -544,7 +545,7 @@ void CStackInstance::setType(const CCreature *c)
if(type)
{
detachFrom(const_cast<CCreature*>(type));
if (type->isMyUpgrade(c) && GameConstants::STACK_EXP)
if (type->isMyUpgrade(c) && VLC->modh->modules.STACK_EXP)
experience *= VLC->creh->expAfterUpgrade / 100.0;
}