Skip to content

Commit

Permalink
Merge pull request #40247 from kevingranade/qualified-artifact-lookup
Browse files Browse the repository at this point in the history
Use qualified name lookup with has_artifact_with() calls
  • Loading branch information
ZhilkinSerg authored May 6, 2020
2 parents 687ca3f + 2a6f66f commit 3943971
Showing 1 changed file with 6 additions and 5 deletions.
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

0 comments on commit 3943971

Please sign in to comment.