summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-02 04:40:58 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-02 04:41:47 +0300
commitb90214b9878246ec45e68c0c6c309337d8e15ef2 (patch)
treeea977f4aaf1bc2ab8cd86f77103d1bc9cee9e1d9 /src/playerrelations.cpp
parent17631dacf2cb8ebc3acc1dae9df0729a80a150d9 (diff)
downloadmanaplus-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.gz
manaplus-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.bz2
manaplus-b90214b9878246ec45e68c0c6c309337d8e15ef2.tar.xz
manaplus-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.cpp17
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