From 39ab9ebf7464f77f079a8edecd3f43870245b8ee Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 17 Apr 2015 20:24:14 +0300 Subject: Use ActorType for being type. --- src/gui/popups/popupmenu.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/gui/popups/popupmenu.cpp') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 9c808b40c..b16dd2ff4 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(ActorType::Unknown)), + mType(ActorType::Unknown), mX(0), mY(0) { @@ -122,7 +122,7 @@ PopupMenu::PopupMenu() : mRenameListener.setDialog(nullptr); mPlayerListener.setNick(""); mPlayerListener.setDialog(nullptr); - mPlayerListener.setType(static_cast(ActorType::Unknown)); + mPlayerListener.setType(ActorType::Unknown); mScrollArea = new ScrollArea(this, mBrowserBox, false); mScrollArea->setVerticalScrollPolicy(ScrollArea::SHOW_AUTO); } @@ -139,7 +139,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) mBeingId = being->getId(); mNick = being->getName(); - mType = static_cast(being->getType()); + mType = being->getType(); mBrowserBox->clearRows(); mX = x; mY = y; @@ -451,7 +451,7 @@ void PopupMenu::showPlayerPopup(const std::string &nick) setMousePos(); mNick = nick; mBeingId = 0; - mType = static_cast(ActorType::Player); + mType = ActorType::Player; mBrowserBox->clearRows(); const std::string &name = mNick; @@ -554,7 +554,7 @@ void PopupMenu::showPopup(const int x, const int y, mX = x; mY = y; mFloorItemId = floorItem->getId(); - mType = static_cast(ActorType::FloorItem); + mType = ActorType::FloorItem; mBrowserBox->clearRows(); const std::string name = floorItem->getName(); mNick = name; @@ -794,7 +794,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab) { mBeingId = being->getId(); mNick = being->getName(); - mType = static_cast(being->getType()); + mType = being->getType(); // TRANSLATORS: popup menu item // TRANSLATORS: trade with player @@ -862,7 +862,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab) else { mNick = name; - mType = static_cast(ActorType::Player); + mType = ActorType::Player; addPlayerRelation(name); mBrowserBox->addRow("##3---"); addFollow(); @@ -930,7 +930,7 @@ void PopupMenu::showChangePos(const int x, const int y) mItem = nullptr; mMapItem = nullptr; mNick.clear(); - mType = static_cast(ActorType::Unknown); + mType = ActorType::Unknown; mX = 0; mY = 0; setVisible(false); @@ -1546,7 +1546,7 @@ void PopupMenu::handleLink(const std::string &link, replaceAll(cmd, "'FLOORID'", toString(mFloorItemId)); replaceAll(cmd, "'ITEMID'", toString(mItemId)); replaceAll(cmd, "'ITEMCOLOR'", toString(mItemColor)); - replaceAll(cmd, "'BEINGTYPEID'", toString(mType)); + replaceAll(cmd, "'BEINGTYPEID'", toString(static_cast(mType))); replaceAll(cmd, "'PLAYER'", localPlayer->getName()); if (mItem) replaceAll(cmd, "'INVINDEX'", toString(mItem->getInvIndex())); @@ -1590,7 +1590,7 @@ void PopupMenu::handleLink(const std::string &link, mButton = nullptr; mNick.clear(); mTextField = nullptr; - mType = static_cast(ActorType::Unknown); + mType = ActorType::Unknown; mX = 0; mY = 0; } @@ -1981,7 +1981,7 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y, return; mNick = name; - mType = static_cast(ActorType::Monster); + mType = ActorType::Monster; mX = x; mY = y; @@ -2059,7 +2059,7 @@ void PopupMenu::showPickupItemPopup(const int x, const int y, return; mNick = name; - mType = static_cast(ActorType::FloorItem); + mType = ActorType::FloorItem; mX = x; mY = y; -- cgit v1.2.3-60-g2f50