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

Converted creature ID and spell ID to new form

This commit is contained in:
Ivan Savenko
2023-08-19 20:48:28 +03:00
parent ec8d31bbfc
commit 17d3d663ee
33 changed files with 135 additions and 171 deletions

View File

@ -355,7 +355,7 @@ int3 CMap::guardingCreaturePosition (int3 pos) const
return int3(-1, -1, -1);
}
const CGObjectInstance * CMap::getObjectiveObjectFrom(const int3 & pos, Obj::EObj type)
const CGObjectInstance * CMap::getObjectiveObjectFrom(const int3 & pos, Obj type)
{
for (CGObjectInstance * object : getTile(pos).visitableObjects)
{
@ -418,7 +418,7 @@ void CMap::checkForObjectives()
case EventCondition::CONTROL:
if (isInTheMap(cond.position))
cond.object = getObjectiveObjectFrom(cond.position, static_cast<Obj::EObj>(cond.objectType));
cond.object = getObjectiveObjectFrom(cond.position, static_cast<Obj>(cond.objectType));
if (cond.object)
{
@ -433,7 +433,7 @@ void CMap::checkForObjectives()
case EventCondition::DESTROY:
if (isInTheMap(cond.position))
cond.object = getObjectiveObjectFrom(cond.position, static_cast<Obj::EObj>(cond.objectType));
cond.object = getObjectiveObjectFrom(cond.position, static_cast<Obj>(cond.objectType));
if (cond.object)
{