Mana
Loading...
Searching...
No Matches
avatar.h
Go to the documentation of this file.
1/*
2 * The Mana Client
3 * Copyright (C) 2008-2009 The Mana World Development Team
4 * Copyright (C) 2009-2012 The Mana Developers
5 *
6 * This file is part of The Mana Client.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <string>
25
26class Avatar
27{
28public:
29 explicit Avatar(const std::string &name = {});
30
34 const std::string &getName() const { return mName; }
35
39 void setName(const std::string &name) { mName = name; }
40
44 bool getOnline() const { return mOnline; }
45
49 void setOnline(bool online) { mOnline = online; }
50
51 int getHp() const { return mHp; }
52
53 void setHp(int hp) { mHp = hp; }
54
55 int getMaxHp() const { return mMaxHp; }
56
57 void setMaxHp(int maxHp) { mMaxHp = maxHp; }
58
59 bool getDisplayBold() const { return mDisplayBold; }
60
61 void setDisplayBold(bool displayBold) { mDisplayBold = displayBold; }
62
63private:
64 std::string mName;
65 int mHp;
66 int mMaxHp;
67 bool mOnline;
69};
void setDisplayBold(bool displayBold)
Definition avatar.h:61
bool mOnline
Definition avatar.h:67
bool getOnline() const
Returns the avatar's online status.
Definition avatar.h:44
bool mDisplayBold
Definition avatar.h:68
int mHp
Definition avatar.h:65
int mMaxHp
Definition avatar.h:66
std::string mName
Definition avatar.h:64
const std::string & getName() const
Returns the avatar's name.
Definition avatar.h:34
int getMaxHp() const
Definition avatar.h:55
void setOnline(bool online)
Set the avatar's online status.
Definition avatar.h:49
bool getDisplayBold() const
Definition avatar.h:59
void setHp(int hp)
Definition avatar.h:53
void setMaxHp(int maxHp)
Definition avatar.h:57
int getHp() const
Definition avatar.h:51
void setName(const std::string &name)
Set the avatar's name.
Definition avatar.h:39