summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-12 17:29:22 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-12 17:29:22 +0300
commit707a1570df9146c42411afb6dd7b2e9bc11b0251 (patch)
tree590ecfdf2cde1908c2264ab5370a0495b7aa83b7 /src/being/being.cpp
parent81f319af0c6321474282de8928378366bbb6e44d (diff)
downloadmanaverse-707a1570df9146c42411afb6dd7b2e9bc11b0251.tar.gz
manaverse-707a1570df9146c42411afb6dd7b2e9bc11b0251.tar.bz2
manaverse-707a1570df9146c42411afb6dd7b2e9bc11b0251.tar.xz
manaverse-707a1570df9146c42411afb6dd7b2e9bc11b0251.zip
Move being flags into separate file.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index e06190623..0e06d45fd 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2167,9 +2167,9 @@ bool Being::updateFromCache()
if (mAdvanced)
{
const int flags = entry->getFlags();
- mShop = ((flags & FLAG_SHOP) != 0);
- mAway = ((flags & FLAG_AWAY) != 0);
- mInactive = ((flags & FLAG_INACTIVE) != 0);
+ mShop = ((flags & BeingFlag::SHOP) != 0);
+ mAway = ((flags & BeingFlag::AWAY) != 0);
+ mInactive = ((flags & BeingFlag::INACTIVE) != 0);
if (mShop || mAway || mInactive)
updateName();
}
@@ -2220,11 +2220,11 @@ void Being::addToCache() const
{
int flags = 0;
if (mShop)
- flags += FLAG_SHOP;
+ flags += BeingFlag::SHOP;
if (mAway)
- flags += FLAG_AWAY;
+ flags += BeingFlag::AWAY;
if (mInactive)
- flags += FLAG_INACTIVE;
+ flags += BeingFlag::INACTIVE;
entry->setFlags(flags);
}
else
@@ -2916,9 +2916,9 @@ void Being::saveComment(const std::string &restrict name,
void Being::setState(const uint8_t state)
{
- const bool shop = ((state & FLAG_SHOP) != 0);
- const bool away = ((state & FLAG_AWAY) != 0);
- const bool inactive = ((state & FLAG_INACTIVE) != 0);
+ const bool shop = ((state & BeingFlag::SHOP) != 0);
+ const bool away = ((state & BeingFlag::AWAY) != 0);
+ const bool inactive = ((state & BeingFlag::INACTIVE) != 0);
const bool needUpdate = (shop != mShop || away != mAway
|| inactive != mInactive);
@@ -2938,7 +2938,7 @@ void Being::setState(const uint8_t state)
void Being::setEmote(const uint8_t emotion, const int emote_time)
{
- if ((emotion & FLAG_SPECIAL) == FLAG_SPECIAL)
+ if ((emotion & BeingFlag::SPECIAL) == BeingFlag::SPECIAL)
{
setState(emotion);
mAdvanced = true;