Skip to content

Commit

Permalink
Use qualified name lookup with has_artifact_with() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed May 6, 2020
1 parent 3fc82b4 commit 2a6f66f
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 2a6f66f

Please sign in to comment.