diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-02 04:40:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-02 04:41:47 +0300 |
commit | b90214b9878246ec45e68c0c6c309337d8e15ef2 (patch) | |
tree | ea977f4aaf1bc2ab8cd86f77103d1bc9cee9e1d9 /src/playerrelations.cpp | |
parent | 17631dacf2cb8ebc3acc1dae9df0729a80a150d9 (diff) | |
download | ManaVerse-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.gz ManaVerse-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.bz2 ManaVerse-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.xz ManaVerse-b90214b9878246ec45e68c0c6c309337d8e15ef2.zip |
Add option to yellow bar to change player attack in pvp mode.
Modes: attack all, attack not friends, attack bad relations,
dont attack players.
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 |