1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

* campaign against magic numbers

* ArtifactID was misleading and wrongly used in one place -- renamed and fixed
* minor changes
This commit is contained in:
mateuszb
2012-09-23 18:01:04 +00:00
parent 3fcba4fb5c
commit 6a81c8b1af
32 changed files with 567 additions and 511 deletions

View File

@ -502,7 +502,7 @@ void CKingdomInterface::generateObjectsList(const std::vector<const CGObjectInst
BOOST_FOREACH(const CGObjectInstance * object, ownedObjects)
{
//Dwellings
if ( object->ID == 17 )
if ( object->ID == Obj::CREATURE_GENERATOR1 )
{
OwnedObjectInfo &info = visibleObjects[object->subID];
if (info.count++ == 0)
@ -566,7 +566,7 @@ void CKingdomInterface::generateMinesList(const std::vector<const CGObjectInstan
BOOST_FOREACH(const CGObjectInstance * object, ownedObjects)
{
//Mines
if ( object->ID == 53 )
if ( object->ID == Obj::MINE )
{
const CGMine *mine = dynamic_cast<const CGMine*>(object);
assert(mine);