diff options
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r-- | src/playerrelations.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp index 18587a91e..1778da0c3 100644 --- a/src/playerrelations.cpp +++ b/src/playerrelations.cpp @@ -409,6 +409,23 @@ void PlayerRelationsManager::ignoreTrade(std::string name) } } +bool PlayerRelationsManager::checkBadRelation(std::string name) +{ + if (name.empty()) + return true; + + PlayerRelation::Relation relation = getRelation(name); + + if (relation == PlayerRelation::IGNORED + || relation == PlayerRelation::DISREGARDED + || relation == PlayerRelation::BLACKLISTED + || relation == PlayerRelation::ERASED + || relation == PlayerRelation::ENEMY2) + { + return true; + } + return false; +} //////////////////////////////////////// // ignore strategies |