ManaPlus
playerrelation.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2008-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2019 The ManaPlus Developers
6  * Copyright (C) 2019-2021 Andrei Karas
7  *
8  * This file is part of The ManaPlus Client.
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef BEING_PLAYERRELATION_H
25 #define BEING_PLAYERRELATION_H
26 
27 #include "enums/being/relation.h"
28 
29 #include "localconsts.h"
30 
32 {
33  static const unsigned int EMOTE = (1U << 0);
34  static const unsigned int SPEECH_FLOAT = (1U << 1);
35  static const unsigned int SPEECH_LOG = (1U << 2);
36  static const unsigned int WHISPER = (1U << 3);
37  static const unsigned int TRADE = (1U << 4);
38  static const unsigned int INVISIBLE = (1U << 5);
39  static const unsigned int BLACKLIST = (1U << 6);
40  static const unsigned int ENEMY = (1U << 7);
41 
42  static const unsigned int RELATIONS_NR = 7;
43  static const unsigned int RELATION_PERMISSIONS[RELATIONS_NR];
44 
45  static const unsigned int DEFAULT = EMOTE
46  | SPEECH_FLOAT
47  | SPEECH_LOG
48  | WHISPER
49  | TRADE;
50 
51  explicit PlayerRelation(const RelationT relation);
52 
54 
55  RelationT mRelation; // bitmask for all of the above
56 };
57 
58 #endif // BEING_PLAYERRELATION_H
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
Relation ::T RelationT
Definition: relation.h:39
static const unsigned int RELATION_PERMISSIONS[RELATIONS_NR]
static const unsigned int INVISIBLE
static const unsigned int ENEMY
static const unsigned int EMOTE
static const unsigned int SPEECH_FLOAT
RelationT mRelation
static const unsigned int BLACKLIST
PlayerRelation(const RelationT relation)
static const unsigned int DEFAULT
static const unsigned int SPEECH_LOG
static const unsigned int WHISPER
static const unsigned int RELATIONS_NR
static const unsigned int TRADE