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

Use qualified name lookup with has_artifact_with() calls #40247

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use qualified name lookup with has_artifact_with() calls
  • Loading branch information
kevingranade committed May 6, 2020
commit 2a6f66fde9bd23f9a706db07a1a1150355f0bba8
11 changes: 6 additions & 5 deletions src/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1715,15 +1715,16 @@ void Character::recalc_sight_limits()
vision_mode_cache.set( IR_VISION );
}

if( has_artifact_with( AEP_SUPER_CLAIRVOYANCE ) ) {
// Since this is called from the player constructor,
// these are going to resolve to Character::has_artifact_with() anyway
// This case should be harmless to apply artifact effects to NPCs.
if( Character::has_artifact_with( AEP_SUPER_CLAIRVOYANCE ) ) {
vision_mode_cache.set( VISION_CLAIRVOYANCE_SUPER );
}

if( has_artifact_with( AEP_CLAIRVOYANCE_PLUS ) ) {
if( Character::has_artifact_with( AEP_CLAIRVOYANCE_PLUS ) ) {
vision_mode_cache.set( VISION_CLAIRVOYANCE_PLUS );
}

if( has_artifact_with( AEP_CLAIRVOYANCE ) ) {
if( Character::has_artifact_with( AEP_CLAIRVOYANCE ) ) {
vision_mode_cache.set( VISION_CLAIRVOYANCE );
}
}
Expand Down