Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2160 dismissing a VIP hero #176

Merged
merged 1 commit into from Jan 27, 2016
Merged

Conversation

vmarkovtsev
Copy link
Contributor

@@ -1454,3 +1455,27 @@ bool CGHeroInstance::hasVisions(const CGObjectInstance * target, const int subty

return (distance < visionsRange) && (target->pos.z == pos.z);
}

bool CGHeroInstance::isMissionCritical(const CMap* map) const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map objects should not use map pointers from outside. For now they should use IObjectInterface::cb for game state access.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for triggeredEvents it may be IObjectInterface::cb->getMapHeader()->triggeredEvents

@vmarkovtsev
Copy link
Contributor Author

@alexvins did what you said, API got better anyway +1

@alexvins alexvins self-assigned this Jan 27, 2016
alexvins added a commit that referenced this pull request Jan 27, 2016
Fix 2160 dismissing a VIP hero.
@alexvins alexvins merged commit 1472ed9 into vcmi:develop Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants