From 2a6f66fde9bd23f9a706db07a1a1150355f0bba8 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Wed, 6 May 2020 07:45:55 +0000 Subject: [PATCH] Use qualified name lookup with has_artifact_with() calls --- src/character.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/character.cpp b/src/character.cpp index 1488bc29326c5..85b040625a561 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -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 ); } }