diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-13 01:04:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-13 01:04:05 +0300 |
commit | ea0b61e18f36f28806940b00a2cddaef912c3340 (patch) | |
tree | 616205f44832d4ced4fc0b50b650eedb0fbf435c /src/gui/windows | |
parent | 814e88e5ca69bc54837be27429dbf42dd41f7ac6 (diff) | |
download | manaverse-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.gz manaverse-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.bz2 manaverse-ea0b61e18f36f28806940b00a2cddaef912c3340.tar.xz manaverse-ea0b61e18f36f28806940b00a2cddaef912c3340.zip |
Move actor type into separate file.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/botcheckerwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 8 | ||||
-rw-r--r-- | src/gui/windows/killstats.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/minimap.cpp | 18 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/shopwindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/windows/whoisonline.cpp | 6 |
9 files changed, 26 insertions, 26 deletions
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); |