summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 01:04:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 01:04:05 +0300
commitea0b61e18f36f28806940b00a2cddaef912c3340 (patch)
tree616205f44832d4ced4fc0b50b650eedb0fbf435c /src/gui
parent814e88e5ca69bc54837be27429dbf42dd41f7ac6 (diff)
downloadplus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.gz
plus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.bz2
plus-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.xz
plus-ea0b61e18f36f28806940b00a2cddaef912c3340.zip
Move actor type into separate file.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/beingpopup.cpp2
-rw-r--r--src/gui/popups/popupmenu.cpp84
-rw-r--r--src/gui/viewport.cpp34
-rw-r--r--src/gui/widgets/avatarlistbox.cpp6
-rw-r--r--src/gui/windows/botcheckerwindow.cpp4
-rw-r--r--src/gui/windows/charcreatedialog.cpp2
-rw-r--r--src/gui/windows/chatwindow.cpp8
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/minimap.cpp18
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/shopwindow.cpp4
-rw-r--r--src/gui/windows/socialwindow.cpp6
-rw-r--r--src/gui/windows/whoisonline.cpp6
13 files changed, 89 insertions, 89 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 07d4b064a..dd1aaf028 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -94,7 +94,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
b->updateComment();
- if (b->getType() == Being::NPC && b->getComment().empty())
+ if (b->getType() == ActorType::NPC && b->getComment().empty())
{
setVisible(false);
return;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index f997c0549..524758719 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -112,7 +112,7 @@ PopupMenu::PopupMenu() :
mButton(nullptr),
mNick(),
mTextField(nullptr),
- mType(static_cast<int>(Being::UNKNOWN)),
+ mType(static_cast<int>(ActorType::UNKNOWN)),
mX(0),
mY(0)
{
@@ -122,7 +122,7 @@ PopupMenu::PopupMenu() :
mRenameListener.setDialog(nullptr);
mPlayerListener.setNick("");
mPlayerListener.setDialog(nullptr);
- mPlayerListener.setType(static_cast<int>(Being::UNKNOWN));
+ mPlayerListener.setType(static_cast<int>(ActorType::UNKNOWN));
mScrollArea = new ScrollArea(this, mBrowserBox, false);
mScrollArea->setVerticalScrollPolicy(ScrollArea::SHOW_AUTO);
}
@@ -149,7 +149,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
switch (being->getType())
{
- case ActorSprite::PLAYER:
+ case ActorType::PLAYER:
{
// TRANSLATORS: popup menu item
// TRANSLATORS: trade with player
@@ -234,7 +234,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
break;
}
- case ActorSprite::NPC:
+ case ActorType::NPC:
// NPCs can be talked to (single option, candidate for removal
// unless more options would be added)
// TRANSLATORS: popup menu item
@@ -255,7 +255,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
mBrowserBox->addRow("addcomment", _("Add comment"));
break;
- case ActorSprite::MONSTER:
+ case ActorType::MONSTER:
{
// Monsters can be attacked
// TRANSLATORS: popup menu item
@@ -293,11 +293,11 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
break;
}
- case ActorSprite::AVATAR:
- case ActorSprite::UNKNOWN:
- case ActorSprite::FLOOR_ITEM:
- case ActorSprite::PORTAL:
- case ActorSprite::PET:
+ case ActorType::AVATAR:
+ case ActorType::UNKNOWN:
+ case ActorType::FLOOR_ITEM:
+ case ActorType::PORTAL:
+ case ActorType::PET:
default:
break;
}
@@ -331,7 +331,7 @@ void PopupMenu::showPopup(const int x, const int y,
static_cast<unsigned>(being->getId()), (being->getName()
+ being->getGenderSignWithSpace()).c_str()));
}
- else if (actor->getType() == ActorSprite::FLOOR_ITEM)
+ else if (actor->getType() == ActorType::FLOOR_ITEM)
{
const FloorItem *const floorItem
= static_cast<const FloorItem*>(actor);
@@ -355,7 +355,7 @@ void PopupMenu::showPlayerPopup(const int x, const int y,
mNick = nick;
mBeingId = 0;
- mType = static_cast<int>(Being::PLAYER);
+ mType = static_cast<int>(ActorType::PLAYER);
mX = x;
mY = y;
mBrowserBox->clearRows();
@@ -455,7 +455,7 @@ void PopupMenu::showPopup(const int x, const int y,
mFloorItemId = floorItem->getId();
mX = x;
mY = y;
- mType = static_cast<int>(Being::FLOOR_ITEM);
+ mType = static_cast<int>(ActorType::FLOOR_ITEM);
mBrowserBox->clearRows();
const std::string name = floorItem->getName();
mNick = name;
@@ -682,7 +682,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
std::string name = wTab->getNick();
const Being* const being = actorManager->findBeingByName(
- name, Being::PLAYER);
+ name, ActorType::PLAYER);
if (being)
{
@@ -772,7 +772,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
else
{
mNick = name;
- mType = static_cast<int>(Being::PLAYER);
+ mType = static_cast<int>(ActorType::PLAYER);
addPlayerRelation(name);
mBrowserBox->addRow("##3---");
addFollow();
@@ -836,7 +836,7 @@ void PopupMenu::showChangePos(const int x, const int y)
mItem = nullptr;
mMapItem = nullptr;
mNick.clear();
- mType = static_cast<int>(Being::UNKNOWN);
+ mType = static_cast<int>(ActorType::UNKNOWN);
mX = 0;
mY = 0;
setVisible(false);
@@ -898,7 +898,7 @@ void PopupMenu::handleLink(const std::string &link,
}
// Trade action
else if (link == "trade" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
Net::getTradeHandler()->request(being);
tradePartnerName = being->getName();
@@ -907,9 +907,9 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "buy" && being && mBeingId != 0)
{
- if (being->getType() == Being::NPC)
+ if (being->getType() == ActorType::NPC)
Net::getNpcHandler()->buy(mBeingId);
- else if (being->getType() == Being::PLAYER)
+ else if (being->getType() == ActorType::PLAYER)
Net::getBuySellHandler()->requestSellList(being->getName());
}
else if (link == "buy" && !mNick.empty())
@@ -918,9 +918,9 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "sell" && being && mBeingId != 0)
{
- if (being->getType() == Being::NPC)
+ if (being->getType() == ActorType::NPC)
Net::getNpcHandler()->sell(mBeingId);
- else if (being->getType() == Being::PLAYER)
+ else if (being->getType() == ActorType::PLAYER)
Net::getBuySellHandler()->requestBuyList(being->getName());
}
else if (link == "sell" && !mNick.empty())
@@ -932,13 +932,13 @@ void PopupMenu::handleLink(const std::string &link,
if (player_node)
player_node->attack(being, true);
}
- else if (link == "heal" && being && being->getType() != Being::MONSTER)
+ else if (link == "heal" && being && being->getType() != ActorType::MONSTER)
{
if (actorManager)
actorManager->heal(being);
}
else if (link == "unignore" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(),
PlayerRelation::NEUTRAL);
@@ -948,7 +948,7 @@ void PopupMenu::handleLink(const std::string &link,
player_relations.setRelation(mNick, PlayerRelation::NEUTRAL);
}
else if (link == "ignore" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(),
PlayerRelation::IGNORED);
@@ -959,7 +959,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "blacklist" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(),
PlayerRelation::BLACKLISTED);
@@ -969,7 +969,7 @@ void PopupMenu::handleLink(const std::string &link,
player_relations.setRelation(mNick, PlayerRelation::BLACKLISTED);
}
else if (link == "enemy" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(),
PlayerRelation::ENEMY2);
@@ -979,7 +979,7 @@ void PopupMenu::handleLink(const std::string &link,
player_relations.setRelation(mNick, PlayerRelation::ENEMY2);
}
else if (link == "erase" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::ERASED);
being->updateName();
@@ -989,7 +989,7 @@ void PopupMenu::handleLink(const std::string &link,
player_relations.setRelation(mNick, PlayerRelation::ERASED);
}
else if (link == "disregard" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(),
PlayerRelation::DISREGARDED);
@@ -999,7 +999,7 @@ void PopupMenu::handleLink(const std::string &link,
player_relations.setRelation(mNick, PlayerRelation::DISREGARDED);
}
else if (link == "friend" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
player_relations.setRelation(being->getName(), PlayerRelation::FRIEND);
}
@@ -1282,12 +1282,12 @@ void PopupMenu::handleLink(const std::string &link,
PlayerInfo::unprotectItem(mItemId);
}
else if (link == "party" && being &&
- being->getType() == ActorSprite::PLAYER)
+ being->getType() == ActorType::PLAYER)
{
Net::getPartyHandler()->invite(being);
}
else if (link == "kick party" && being
- && being->getType() == Being::PLAYER)
+ && being->getType() == ActorType::PLAYER)
{
Net::getPartyHandler()->kick(being);
}
@@ -1308,8 +1308,8 @@ void PopupMenu::handleLink(const std::string &link,
chatWindow->addInputText(name);
}
else if (link == "admin-kick" && being &&
- (being->getType() == ActorSprite::PLAYER ||
- being->getType() == ActorSprite::MONSTER))
+ (being->getType() == ActorType::PLAYER ||
+ being->getType() == ActorType::MONSTER))
{
Net::getAdminHandler()->kick(being->getId());
}
@@ -1475,7 +1475,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "remove attack" && being)
{
- if (actorManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == ActorType::MONSTER)
{
actorManager->removeAttackMob(being->getName());
if (socialWindow)
@@ -1484,7 +1484,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "add attack" && being)
{
- if (actorManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == ActorType::MONSTER)
{
actorManager->addAttackMob(being->getName());
if (socialWindow)
@@ -1493,7 +1493,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "add attack priority" && being)
{
- if (actorManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == ActorType::MONSTER)
{
actorManager->addPriorityAttackMob(being->getName());
if (socialWindow)
@@ -1502,7 +1502,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "add attack ignore" && being)
{
- if (actorManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == ActorType::MONSTER)
{
actorManager->addIgnoreAttackMob(being->getName());
if (socialWindow)
@@ -1900,7 +1900,7 @@ void PopupMenu::handleLink(const std::string &link,
mButton = nullptr;
mNick.clear();
mTextField = nullptr;
- mType = static_cast<int>(Being::UNKNOWN);
+ mType = static_cast<int>(ActorType::UNKNOWN);
mX = 0;
mY = 0;
}
@@ -2265,7 +2265,7 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y,
return;
mNick = name;
- mType = static_cast<int>(Being::MONSTER);
+ mType = static_cast<int>(ActorType::MONSTER);
mX = x;
mY = y;
@@ -2343,7 +2343,7 @@ void PopupMenu::showPickupItemPopup(const int x, const int y,
return;
mNick = name;
- mType = static_cast<int>(Being::FLOOR_ITEM);
+ mType = static_cast<int>(ActorType::FLOOR_ITEM);
mX = x;
mY = y;
@@ -2953,7 +2953,7 @@ PlayerListener::PlayerListener() :
ActionListener(),
mNick(),
mDialog(nullptr),
- mType(static_cast<int>(Being::UNKNOWN))
+ mType(static_cast<int>(ActorType::UNKNOWN))
{
}
@@ -2963,7 +2963,7 @@ void PlayerListener::action(const ActionEvent &event)
{
std::string comment = mDialog->getText();
Being *const being = actorManager->findBeingByName(
- mNick, static_cast<ActorSprite::Type>(mType));
+ mNick, static_cast<ActorType::Type>(mType));
if (being)
being->setComment(comment);
Being::saveComment(mNick, comment, mType);
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 35805287b..f8f0c2ec0 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -256,7 +256,7 @@ void Viewport::draw(Graphics *graphics)
const ActorSprites &actors = actorManager->getAll();
FOR_EACH (ActorSpritesIterator, it, actors)
{
- if ((*it)->getType() == ActorSprite::FLOOR_ITEM)
+ if ((*it)->getType() == ActorType::FLOOR_ITEM)
continue;
Being *const b = static_cast<Being*>(*it);
b->drawSpeech(mPixelViewX, mPixelViewY);
@@ -425,8 +425,8 @@ bool Viewport::leftMouseAction()
}
else
{
- const ActorSprite::Type type = mHoverBeing->getType();
- if (type == ActorSprite::PLAYER)
+ const ActorType::Type type = mHoverBeing->getType();
+ if (type == ActorType::PLAYER)
{
validateSpeed();
if (actorManager)
@@ -438,7 +438,7 @@ bool Viewport::leftMouseAction()
return true;
}
}
- else if (type == ActorSprite::MONSTER || type == ActorSprite::NPC)
+ else if (type == ActorType::MONSTER || type == ActorType::NPC)
{
if (player_node->withinAttackRange(mHoverBeing) ||
inputManager.isActionActive(static_cast<int>(
@@ -540,7 +540,7 @@ void Viewport::mousePressed(MouseEvent &event)
if (actorManager)
{
Being *const target = actorManager->findNearestLivingBeing(
- pixelX, pixelY, 20, ActorSprite::MONSTER);
+ pixelX, pixelY, 20, ActorType::MONSTER);
if (target)
player_node->setTarget(target);
@@ -897,14 +897,14 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
const int x = mMouseX + mPixelViewX;
const int y = mMouseY + mPixelViewY;
- ActorSprite::Type type = ActorSprite::UNKNOWN;
+ ActorType::Type type = ActorType::UNKNOWN;
mHoverBeing = actorManager->findBeingByPixel(x, y, true);
if (mHoverBeing)
type = mHoverBeing->getType();
if (mHoverBeing
- && (type == Being::PLAYER
- || type == Being::NPC
- || type == Being::PET))
+ && (type == ActorType::PLAYER
+ || type == ActorType::NPC
+ || type == ActorType::PET))
{
mTextPopup->setVisible(false);
if (mShowBeingPopup)
@@ -954,23 +954,23 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
{
switch (type)
{
- case ActorSprite::NPC:
+ case ActorType::NPC:
gui->setCursorType(mHoverBeing->getHoverCursor());
break;
- case ActorSprite::MONSTER:
+ case ActorType::MONSTER:
gui->setCursorType(mHoverBeing->getHoverCursor());
break;
- case ActorSprite::PORTAL:
+ case ActorType::PORTAL:
gui->setCursorType(mHoverBeing->getHoverCursor());
break;
- case ActorSprite::AVATAR:
- case ActorSprite::FLOOR_ITEM:
- case ActorSprite::UNKNOWN:
- case ActorSprite::PLAYER:
- case ActorSprite::PET:
+ case ActorType::AVATAR:
+ case ActorType::FLOOR_ITEM:
+ case ActorType::UNKNOWN:
+ case ActorType::PLAYER:
+ case ActorType::PET:
default:
gui->setCursorType(Cursor::CURSOR_POINTER);
break;
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index 2e8e27960..130245801 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -347,7 +347,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
if (ava->getType() == AVATAR_PLAYER)
{
const Being *const being = actorManager->findBeingByName(
- ava->getName(), Being::PLAYER);
+ ava->getName(), ActorType::PLAYER);
if (being)
actorManager->heal(being);
}
@@ -366,8 +366,8 @@ void AvatarListBox::mousePressed(MouseEvent &event)
const Avatar *const avatar = model->getAvatarAt(selected);
if (avatar)
{
- const Being *const being = actorManager
- ->findBeingByName(avatar->getName(), Being::PLAYER);
+ const Being *const being = actorManager->findBeingByName(
+ avatar->getName(), ActorType::PLAYER);
if (being)
viewport->showPopup(being);
else
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index e8dd03f63..b606da8f6 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -107,7 +107,7 @@ public:
{
Being *const being = dynamic_cast<Being*>(*i);
- if (being && being->getType() == Being::PLAYER
+ if (being && being->getType() == ActorType::PLAYER
&& being != player_node && being->getName() != "")
{
mPlayers.push_back(being);
@@ -406,7 +406,7 @@ void BotCheckerWindow::reset()
{
Being *const being = dynamic_cast<Being*>(*i);
- if (being && being->getType() == Being::PLAYER
+ if (being && being->getType() == ActorType::PLAYER
&& being != player_node && being->getName() != "")
{
being->resetCounters();
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 72dfd21b6..34b4b5b5a 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -124,7 +124,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mCreateButton(new Button(this, _("Create"), "create", this)),
// TRANSLATORS: char create dialog button
mCancelButton(new Button(this, _("Cancel"), "cancel", this)),
- mPlayer(new Being(0, ActorSprite::PLAYER, static_cast<uint16_t>(0U),
+ mPlayer(new Being(0, ActorType::PLAYER, static_cast<uint16_t>(0U),
nullptr)),
mPlayerBox(new PlayerBox(this, mPlayer, "charcreate_playerbox.xml",
"charcreate_selectedplayerbox.xml")),
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index e0f4d3c51..d6ad291c6 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -687,7 +687,7 @@ void ChatWindow::doPresent() const
FOR_EACH (ActorSpritesIterator, it, actors)
{
- if ((*it)->getType() == ActorSprite::PLAYER)
+ if ((*it)->getType() == ActorType::PLAYER)
{
if (!response.empty())
response.append(", ");
@@ -1547,7 +1547,7 @@ void ChatWindow::battleChatLog(const std::string &line, Own own,
void ChatWindow::localPetSay(const std::string &nick, const std::string &text)
{
Being *const being = actorManager->findBeingByName(
- nick, ActorSprite::PLAYER);
+ nick, ActorType::PLAYER);
Being *pet = nullptr;
if (being)
{
@@ -1572,7 +1572,7 @@ void ChatWindow::localPetSay(const std::string &nick, const std::string &text)
void ChatWindow::localPetEmote(const std::string &nick, const uint8_t emoteId)
{
Being *const being = actorManager->findBeingByName(
- nick, ActorSprite::PLAYER);
+ nick, ActorType::PLAYER);
if (being)
{
Being *const pet = being->getFirstPet();
@@ -1634,7 +1634,7 @@ void ChatWindow::updateOnline(const std::set<std::string> &onlinePlayers) const
if (actorManager)
{
const Being *const being = actorManager->findBeingByName(
- nick, ActorSprite::PLAYER);
+ nick, ActorType::PLAYER);
if (being)
{
tab->setWhisperTabColors();
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 0145d551f..199c1d84c 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -477,7 +477,7 @@ void KillStats::validateJacko()
{
const Being *const dstBeing
= actorManager->findBeingByName(
- "Jack O", Being::MONSTER);
+ "Jack O", ActorType::MONSTER);
if (mIsJackoAlive && !dstBeing)
{
mIsJackoAlive = false;
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index ffaba0c2f..8acbfc5a0 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -288,7 +288,7 @@ void Minimap::draw(Graphics *graphics)
const ActorSprites &actors = actorManager->getAll();
FOR_EACH (ActorSpritesConstIterator, it, actors)
{
- if (!(*it) || (*it)->getType() == ActorSprite::FLOOR_ITEM)
+ if (!(*it) || (*it)->getType() == ActorType::FLOOR_ITEM)
continue;
const Being *const being = static_cast<const Being *const>(*it);
@@ -316,20 +316,20 @@ void Minimap::draw(Graphics *graphics)
{
switch (being->getType())
{
- case ActorSprite::MONSTER:
+ case ActorType::MONSTER:
type = UserPalette::MONSTER;
break;
- case ActorSprite::NPC:
+ case ActorType::NPC:
type = UserPalette::NPC;
break;
- case ActorSprite::AVATAR:
- case ActorSprite::UNKNOWN:
- case ActorSprite::PLAYER:
- case ActorSprite::FLOOR_ITEM:
- case ActorSprite::PORTAL:
- case ActorSprite::PET:
+ case ActorType::AVATAR:
+ case ActorType::UNKNOWN:
+ case ActorType::PLAYER:
+ case ActorType::FLOOR_ITEM:
+ case ActorType::PORTAL:
+ case ActorType::PET:
default:
continue;
}
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index db2800978..e8bc1763e 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -852,7 +852,7 @@ void NpcDialog::showAvatar(const uint16_t avatarId)
if (needShow)
{
delete mAvatarBeing;
- mAvatarBeing = new Being(0, ActorSprite::AVATAR, avatarId, nullptr);
+ mAvatarBeing = new Being(0, ActorType::AVATAR, avatarId, nullptr);
mPlayerBox->setPlayer(mAvatarBeing);
if (!mAvatarBeing->empty())
{
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index edd3efbc7..0afe6f90c 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -291,7 +291,7 @@ void ShopWindow::startTrade()
return;
const Being *const being = actorManager->findBeingByName(
- mTradeNick, Being::PLAYER);
+ mTradeNick, ActorType::PLAYER);
tradeWindow->clear();
if (mTradeMoney)
{
@@ -695,7 +695,7 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
{
if (!player_node || !mTradeNick.empty() || PlayerInfo::isTrading()
|| !actorManager
- || !actorManager->findBeingByName(nick, Being::PLAYER))
+ || !actorManager->findBeingByName(nick, ActorType::PLAYER))
{
return;
}
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index dbba86562..0ff1d8866 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -564,7 +564,7 @@ public:
}
}
const Being *const being = actorManager->findBeingByName(
- name, Being::PLAYER);
+ name, ActorType::PLAYER);
if (being)
{
avatar->setDamageHp(being->getDamageTaken());
@@ -585,7 +585,7 @@ public:
return;
avatar->setDamageHp(0);
Being *const being = actorManager->findBeingByName(
- name, Being::PLAYER);
+ name, ActorType::PLAYER);
if (being)
being->setDamageTaken(0);
@@ -1157,7 +1157,7 @@ public:
FOR_EACHP (StringVectCIter, it, players)
{
Avatar *const ava = new Avatar(*it);
- if (actorManager->findBeingByName(*it, Being::PLAYER)
+ if (actorManager->findBeingByName(*it, ActorType::PLAYER)
|| players2.find(*it) != players2.end())
{
ava->setOnline(true);
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 38ddcf806..ff24030d4 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -192,7 +192,7 @@ void WhoIsOnline::handleLink(const std::string& link, MouseEvent *event)
{
const std::string text = decodeLinkText(link);
Being *const being = actorManager->findBeingByName(
- text, Being::PLAYER);
+ text, ActorType::PLAYER);
if (being && viewport)
{
@@ -414,7 +414,7 @@ void WhoIsOnline::loadWebList()
if (actorManager)
{
Being *const being = actorManager->findBeingByName(
- nick, Being::PLAYER);
+ nick, ActorType::PLAYER);
if (being)
{
if (level > 0)
@@ -808,7 +808,7 @@ void OnlinePlayer::setText(std::string color)
if (mStatus != 255 && actorManager)
{
Being *const being = actorManager->findBeingByName(
- mNick, Being::PLAYER);
+ mNick, ActorType::PLAYER);
if (being)
{
being->setState(mStatus);