1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

use toEnum instead of getNum for switch'es

This commit is contained in:
Ivan Savenko
2023-11-03 19:20:25 +02:00
parent f1032063bc
commit 04aeea9b68
6 changed files with 7 additions and 7 deletions

View File

@ -556,7 +556,7 @@ void ObjectManager::placeObject(rmg::Object & object, bool guarded, bool updateD
}
}
switch (instance->object().ID.getNum())
switch (instance->object().ID.toEnum())
{
case Obj::RANDOM_TREASURE_ART:
case Obj::RANDOM_MINOR_ART: //In OH3 quest artifacts have higher value than normal arts
@ -586,7 +586,7 @@ void ObjectManager::placeObject(rmg::Object & object, bool guarded, bool updateD
case Obj::MONOLITH_ONE_WAY_EXIT:
*/
switch (object.instances().front()->object().ID.getNum())
switch(object.instances().front()->object().ID.toEnum())
{
case Obj::WATER_WHEEL:
if (auto* m = zone.getModificator<RiverPlacer>())