mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Remove quests from CMap, now solely owned by quest objects
This commit is contained in:
@@ -657,7 +657,7 @@ bool shouldVisit(const Nullkiller * ai, const CGHeroInstance * h, const CGObject
|
||||
{
|
||||
for(auto q : ai->cb->getMyQuests())
|
||||
{
|
||||
if(q.obj == obj)
|
||||
if(q.obj == obj->id)
|
||||
{
|
||||
return false; // do not visit guards or gates when wandering
|
||||
}
|
||||
@@ -670,9 +670,9 @@ bool shouldVisit(const Nullkiller * ai, const CGHeroInstance * h, const CGObject
|
||||
{
|
||||
for(auto q : ai->cb->getMyQuests())
|
||||
{
|
||||
if(q.obj == obj)
|
||||
if(q.obj == obj->id)
|
||||
{
|
||||
if(q.quest->checkQuest(h))
|
||||
if(q.getQuest(cb)->checkQuest(h))
|
||||
return true; //we completed the quest
|
||||
else
|
||||
return false; //we can't complete this quest
|
||||
|
||||
Reference in New Issue
Block a user