summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-19 16:27:33 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 16:30:24 +0300
commit6c3974a46c659e558b2b5f249b7b000a5b39fe25 (patch)
tree6ba5ad594cc0691821f879efff413c562f7cc552 /src/gui
parent4f77307d659c4048c20eacda1d5b13fcce8d60da (diff)
downloadplus-6c3974a46c659e558b2b5f249b7b000a5b39fe25.tar.gz
plus-6c3974a46c659e558b2b5f249b7b000a5b39fe25.tar.bz2
plus-6c3974a46c659e558b2b5f249b7b000a5b39fe25.tar.xz
plus-6c3974a46c659e558b2b5f249b7b000a5b39fe25.zip
Rename actorspritemanager into actormanager.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp166
-rw-r--r--src/gui/viewport.cpp30
-rw-r--r--src/gui/viewport.h2
-rw-r--r--src/gui/widgets/avatarlistbox.cpp10
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp6
-rw-r--r--src/gui/windows/botcheckerwindow.cpp10
-rw-r--r--src/gui/windows/chatwindow.cpp18
-rw-r--r--src/gui/windows/killstats.cpp6
-rw-r--r--src/gui/windows/minimap.cpp6
-rw-r--r--src/gui/windows/npcdialog.cpp6
-rw-r--r--src/gui/windows/questswindow.cpp6
-rw-r--r--src/gui/windows/shopwindow.cpp10
-rw-r--r--src/gui/windows/socialwindow.cpp24
-rw-r--r--src/gui/windows/whoisonline.cpp18
14 files changed, 159 insertions, 159 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 67310deef..4f6bb3372 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -22,7 +22,7 @@
#include "gui/popups/popupmenu.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "commandhandler.h"
#include "configuration.h"
#include "dropshortcut.h"
@@ -129,7 +129,7 @@ void PopupMenu::postInit()
void PopupMenu::showPopup(const int x, const int y, const Being *const being)
{
- if (!being || !player_node || !actorSpriteManager)
+ if (!being || !player_node || !actorManager)
return;
mBeingId = being->getId();
@@ -260,9 +260,9 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being)
if (config.getBoolValue("enableAttackFilter"))
{
mBrowserBox->addRow("##3---");
- if (actorSpriteManager->isInAttackList(name)
- || actorSpriteManager->isInIgnoreAttackList(name)
- || actorSpriteManager->isInPriorityAttackList(name))
+ if (actorManager->isInAttackList(name)
+ || actorManager->isInIgnoreAttackList(name)
+ || actorManager->isInPriorityAttackList(name))
{
mBrowserBox->addRow("remove attack",
// TRANSLATORS: remove monster from attack list
@@ -460,9 +460,9 @@ void PopupMenu::showPopup(const int x, const int y,
if (config.getBoolValue("enablePickupFilter"))
{
- if (actorSpriteManager->isInPickupList(name)
- || (actorSpriteManager->isInPickupList("")
- && !actorSpriteManager->isInIgnorePickupList(name)))
+ if (actorManager->isInPickupList(name)
+ || (actorManager->isInPickupList("")
+ && !actorManager->isInIgnorePickupList(name)))
{
// TRANSLATORS: popup menu item
// TRANSLATORS: pickup item from ground
@@ -602,7 +602,7 @@ void PopupMenu::showSpellPopup(const int x, const int y,
void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
{
- if (!tab || !actorSpriteManager || !player_node)
+ if (!tab || !actorManager || !player_node)
return;
mTab = tab;
@@ -677,7 +677,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
const WhisperTab *const wTab = static_cast<WhisperTab*>(tab);
std::string name = wTab->getNick();
- const Being* const being = actorSpriteManager->findBeingByName(
+ const Being* const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
@@ -843,8 +843,8 @@ void PopupMenu::handleLink(const std::string &link,
gcn::MouseEvent *event A_UNUSED)
{
Being *being = nullptr;
- if (actorSpriteManager)
- being = actorSpriteManager->findBeing(mBeingId);
+ if (actorManager)
+ being = actorManager->findBeing(mBeingId);
// Talk To action
if (link == "talk" && being && being->canTalk())
@@ -889,8 +889,8 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "heal" && being && being->getType() != Being::MONSTER)
{
- if (actorSpriteManager)
- actorSpriteManager->heal(being);
+ if (actorManager)
+ actorManager->heal(being);
}
else if (link == "unignore" && being &&
being->getType() == ActorSprite::PLAYER)
@@ -979,11 +979,11 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "nuke" && being)
{
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->addBlock(static_cast<uint32_t>(
+ actorManager->addBlock(static_cast<uint32_t>(
being->getId()));
- actorSpriteManager->destroy(being);
+ actorManager->destroy(being);
}
}
// Follow Player action
@@ -1000,9 +1000,9 @@ void PopupMenu::handleLink(const std::string &link,
// Pick Up Floor Item action
else if ((link == "pickup") && mFloorItemId)
{
- if (player_node && actorSpriteManager)
+ if (player_node && actorManager)
{
- FloorItem *const item = actorSpriteManager->findItem(
+ FloorItem *const item = actorManager->findItem(
mFloorItemId);
if (item)
player_node->pickUp(item);
@@ -1044,9 +1044,9 @@ void PopupMenu::handleLink(const std::string &link,
chatWindow->addItemText(mItem->getInfo().getName());
}
}
- else if (mFloorItemId && actorSpriteManager)
+ else if (mFloorItemId && actorManager)
{
- const FloorItem *const item = actorSpriteManager->findItem(
+ const FloorItem *const item = actorManager->findItem(
mFloorItemId);
if (item)
@@ -1427,76 +1427,76 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "remove attack" && being)
{
- if (actorSpriteManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == Being::MONSTER)
{
- actorSpriteManager->removeAttackMob(being->getName());
+ actorManager->removeAttackMob(being->getName());
if (socialWindow)
socialWindow->updateAttackFilter();
}
}
else if (link == "add attack" && being)
{
- if (actorSpriteManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == Being::MONSTER)
{
- actorSpriteManager->addAttackMob(being->getName());
+ actorManager->addAttackMob(being->getName());
if (socialWindow)
socialWindow->updateAttackFilter();
}
}
else if (link == "add attack priority" && being)
{
- if (actorSpriteManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == Being::MONSTER)
{
- actorSpriteManager->addPriorityAttackMob(being->getName());
+ actorManager->addPriorityAttackMob(being->getName());
if (socialWindow)
socialWindow->updateAttackFilter();
}
}
else if (link == "add attack ignore" && being)
{
- if (actorSpriteManager && being->getType() == Being::MONSTER)
+ if (actorManager && being->getType() == Being::MONSTER)
{
- actorSpriteManager->addIgnoreAttackMob(being->getName());
+ actorManager->addIgnoreAttackMob(being->getName());
if (socialWindow)
socialWindow->updateAttackFilter();
}
}
else if (link == "remove pickup" && !mNick.empty())
{
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->removePickupItem(mNick);
+ actorManager->removePickupItem(mNick);
if (socialWindow)
socialWindow->updatePickupFilter();
}
}
else if (link == "add pickup" && !mNick.empty())
{
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->addPickupItem(mNick);
+ actorManager->addPickupItem(mNick);
if (socialWindow)
socialWindow->updatePickupFilter();
}
}
else if (link == "add pickup ignore" && !mNick.empty())
{
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->addIgnorePickupItem(mNick);
+ actorManager->addIgnorePickupItem(mNick);
if (socialWindow)
socialWindow->updatePickupFilter();
}
}
else if (link == "attack moveup")
{
- if (actorSpriteManager)
+ if (actorManager)
{
- const int idx = actorSpriteManager->getAttackMobIndex(mNick);
+ const int idx = actorManager->getAttackMobIndex(mNick);
if (idx > 0)
{
std::list<std::string> mobs
- = actorSpriteManager->getAttackMobs();
+ = actorManager->getAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
std::list<std::string>::iterator it2 = mobs.begin();
while (it != mobs.end())
@@ -1505,8 +1505,8 @@ void PopupMenu::handleLink(const std::string &link,
{
-- it2;
mobs.splice(it2, mobs, it);
- actorSpriteManager->setAttackMobs(mobs);
- actorSpriteManager->rebuildAttackMobs();
+ actorManager->setAttackMobs(mobs);
+ actorManager->rebuildAttackMobs();
break;
}
++ it;
@@ -1520,14 +1520,14 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "priority moveup")
{
- if (actorSpriteManager)
+ if (actorManager)
{
- const int idx = actorSpriteManager->
+ const int idx = actorManager->
getPriorityAttackMobIndex(mNick);
if (idx > 0)
{
std::list<std::string> mobs
- = actorSpriteManager->getPriorityAttackMobs();
+ = actorManager->getPriorityAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
std::list<std::string>::iterator it2 = mobs.begin();
while (it != mobs.end())
@@ -1536,8 +1536,8 @@ void PopupMenu::handleLink(const std::string &link,
{
-- it2;
mobs.splice(it2, mobs, it);
- actorSpriteManager->setPriorityAttackMobs(mobs);
- actorSpriteManager->rebuildPriorityAttackMobs();
+ actorManager->setPriorityAttackMobs(mobs);
+ actorManager->rebuildPriorityAttackMobs();
break;
}
++ it;
@@ -1551,14 +1551,14 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "attack movedown")
{
- if (actorSpriteManager)
+ if (actorManager)
{
- const int idx = actorSpriteManager->getAttackMobIndex(mNick);
- const int size = actorSpriteManager->getAttackMobsSize();
+ const int idx = actorManager->getAttackMobIndex(mNick);
+ const int size = actorManager->getAttackMobsSize();
if (idx + 1 < size)
{
std::list<std::string> mobs
- = actorSpriteManager->getAttackMobs();
+ = actorManager->getAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
std::list<std::string>::iterator it2 = mobs.begin();
while (it != mobs.end())
@@ -1570,8 +1570,8 @@ void PopupMenu::handleLink(const std::string &link,
break;
mobs.splice(it, mobs, it2);
- actorSpriteManager->setAttackMobs(mobs);
- actorSpriteManager->rebuildAttackMobs();
+ actorManager->setAttackMobs(mobs);
+ actorManager->rebuildAttackMobs();
break;
}
++ it;
@@ -1587,13 +1587,13 @@ void PopupMenu::handleLink(const std::string &link,
{
if (player_node)
{
- const int idx = actorSpriteManager
+ const int idx = actorManager
->getPriorityAttackMobIndex(mNick);
- const int size = actorSpriteManager->getPriorityAttackMobsSize();
+ const int size = actorManager->getPriorityAttackMobsSize();
if (idx + 1 < size)
{
std::list<std::string> mobs
- = actorSpriteManager->getPriorityAttackMobs();
+ = actorManager->getPriorityAttackMobs();
std::list<std::string>::iterator it = mobs.begin();
std::list<std::string>::iterator it2 = mobs.begin();
while (it != mobs.end())
@@ -1605,8 +1605,8 @@ void PopupMenu::handleLink(const std::string &link,
break;
mobs.splice(it, mobs, it2);
- actorSpriteManager->setPriorityAttackMobs(mobs);
- actorSpriteManager->rebuildPriorityAttackMobs();
+ actorManager->setPriorityAttackMobs(mobs);
+ actorManager->rebuildPriorityAttackMobs();
break;
}
++ it;
@@ -1620,24 +1620,24 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "attack remove")
{
- if (actorSpriteManager)
+ if (actorManager)
{
if (mNick.empty())
{
- if (actorSpriteManager->isInAttackList(mNick))
+ if (actorManager->isInAttackList(mNick))
{
- actorSpriteManager->removeAttackMob(mNick);
- actorSpriteManager->addIgnoreAttackMob(mNick);
+ actorManager->removeAttackMob(mNick);
+ actorManager->addIgnoreAttackMob(mNick);
}
else
{
- actorSpriteManager->removeAttackMob(mNick);
- actorSpriteManager->addAttackMob(mNick);
+ actorManager->removeAttackMob(mNick);
+ actorManager->addAttackMob(mNick);
}
}
else
{
- actorSpriteManager->removeAttackMob(mNick);
+ actorManager->removeAttackMob(mNick);
}
if (socialWindow)
socialWindow->updateAttackFilter();
@@ -1645,24 +1645,24 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "pickup remove")
{
- if (actorSpriteManager)
+ if (actorManager)
{
if (mNick.empty())
{
- if (actorSpriteManager->isInPickupList(mNick))
+ if (actorManager->isInPickupList(mNick))
{
- actorSpriteManager->removePickupItem(mNick);
- actorSpriteManager->addIgnorePickupItem(mNick);
+ actorManager->removePickupItem(mNick);
+ actorManager->addIgnorePickupItem(mNick);
}
else
{
- actorSpriteManager->removePickupItem(mNick);
- actorSpriteManager->addPickupItem(mNick);
+ actorManager->removePickupItem(mNick);
+ actorManager->addPickupItem(mNick);
}
}
else
{
- actorSpriteManager->removePickupItem(mNick);
+ actorManager->removePickupItem(mNick);
}
if (socialWindow)
socialWindow->updatePickupFilter();
@@ -1762,10 +1762,10 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (!link.compare(0, 7, "player_"))
{
- if (actorSpriteManager)
+ if (actorManager)
{
mBeingId = atoi(link.substr(7).c_str());
- being = actorSpriteManager->findBeing(mBeingId);
+ being = actorManager->findBeing(mBeingId);
if (being)
{
showPopup(getX(), getY(), being);
@@ -1775,12 +1775,12 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (!link.compare(0, 10, "flooritem_"))
{
- if (actorSpriteManager)
+ if (actorManager)
{
const int id = atoi(link.substr(10).c_str());
if (id)
{
- const FloorItem *const item = actorSpriteManager->findItem(id);
+ const FloorItem *const item = actorManager->findItem(id);
if (item)
{
mFloorItemId = item->getId();
@@ -2198,7 +2198,7 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b)
void PopupMenu::showAttackMonsterPopup(const int x, const int y,
const std::string &name, const int type)
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
mNick = name;
@@ -2221,8 +2221,8 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y,
{
case MapItem::ATTACK:
{
- const int idx = actorSpriteManager->getAttackMobIndex(name);
- const int size = actorSpriteManager->getAttackMobsSize();
+ const int idx = actorManager->getAttackMobIndex(name);
+ const int size = actorManager->getAttackMobsSize();
if (idx > 0)
{
// TRANSLATORS: popup menu item
@@ -2239,9 +2239,9 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y,
}
case MapItem::PRIORITY:
{
- const int idx = actorSpriteManager->
+ const int idx = actorManager->
getPriorityAttackMobIndex(name);
- const int size = actorSpriteManager->getPriorityAttackMobsSize();
+ const int size = actorManager->getPriorityAttackMobsSize();
if (idx > 0)
{
// TRANSLATORS: popup menu item
@@ -2276,7 +2276,7 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y,
void PopupMenu::showPickupItemPopup(const int x, const int y,
const std::string &name)
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
mNick = name;
@@ -2661,8 +2661,8 @@ void PopupMenu::addPlayerMisc()
void PopupMenu::addPickupFilter(const std::string &name)
{
- if (actorSpriteManager->isInPickupList(name)
- || actorSpriteManager->isInIgnorePickupList(name))
+ if (actorManager->isInPickupList(name)
+ || actorManager->isInIgnorePickupList(name))
{
mBrowserBox->addRow("remove pickup",
// TRANSLATORS: popup menu item
@@ -2896,7 +2896,7 @@ void PlayerListener::action(const gcn::ActionEvent &event)
if (event.getId() == "ok" && !mNick.empty() && mDialog)
{
std::string comment = mDialog->getText();
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
mNick, static_cast<ActorSprite::Type>(mType));
if (being)
being->setComment(comment);
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 96f34062a..05807126f 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -22,7 +22,7 @@
#include "gui/viewport.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "game.h"
#include "maplayer.h"
@@ -245,7 +245,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
textManager->draw(graphics, mPixelViewX, mPixelViewY);
// Draw player names, speech, and emotion sprite as needed
- const ActorSprites &actors = actorSpriteManager->getAll();
+ const ActorSprites &actors = actorManager->getAll();
FOR_EACH (ActorSpritesIterator, it, actors)
{
if ((*it)->getType() == ActorSprite::FLOOR_ITEM)
@@ -296,7 +296,7 @@ void Viewport::_followMouse()
void Viewport::_drawDebugPath(Graphics *const graphics)
{
- if (!player_node || !userPalette || !actorSpriteManager || !mMap)
+ if (!player_node || !userPalette || !actorManager || !mMap)
return;
SDL_GetMouseState(&mMouseX, &mMouseY);
@@ -323,7 +323,7 @@ void Viewport::_drawDebugPath(Graphics *const graphics)
_drawPath(graphics, debugPath, userPalette->getColorWithAlpha(
UserPalette::ROAD_POINT));
- const ActorSprites &actors = actorSpriteManager->getAll();
+ const ActorSprites &actors = actorManager->getAll();
FOR_EACH (ActorSpritesConstIterator, it, actors)
{
const Being *const being = dynamic_cast<const Being*>(*it);
@@ -411,12 +411,12 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
if (mHoverBeing)
{
validateSpeed();
- if (actorSpriteManager)
+ if (actorManager)
{
std::vector<ActorSprite*> beings;
const int x = mMouseX + mPixelViewX;
const int y = mMouseY + mPixelViewY;
- actorSpriteManager->findBeingsByPixel(beings, x, y, true);
+ actorManager->findBeingsByPixel(beings, x, y, true);
if (beings.size() > 1)
{
mPopupMenu->showPopup(eventX, eventY, beings);
@@ -478,10 +478,10 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
if (mHoverBeing->getType() == ActorSprite::PLAYER)
{
validateSpeed();
- if (actorSpriteManager)
+ if (actorManager)
{
if (player_node != mHoverBeing || mSelfMouseHeal)
- actorSpriteManager->heal(mHoverBeing);
+ actorManager->heal(mHoverBeing);
if (player_node == mHoverBeing && mHoverItem)
player_node->pickUp(mHoverItem);
return;
@@ -536,9 +536,9 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
mPlayerFollowMouse = false;
validateSpeed();
// Find the being nearest to the clicked position
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const target = actorSpriteManager->findNearestLivingBeing(
+ Being *const target = actorManager->findNearestLivingBeing(
pixelX, pixelY, 20, ActorSprite::MONSTER);
if (target)
@@ -840,13 +840,13 @@ void Viewport::optionChanged(const std::string &name)
void Viewport::mouseMoved(gcn::MouseEvent &event A_UNUSED)
{
// Check if we are on the map
- if (!mMap || !player_node || !actorSpriteManager)
+ if (!mMap || !player_node || !actorManager)
return;
const int x = mMouseX + mPixelViewX;
const int y = mMouseY + mPixelViewY;
- mHoverBeing = actorSpriteManager->findBeingByPixel(x, y, true);
+ mHoverBeing = actorManager->findBeingByPixel(x, y, true);
if (mHoverBeing && (mHoverBeing->getType() == Being::PLAYER
|| mHoverBeing->getType() == Being::NPC))
{
@@ -859,7 +859,7 @@ void Viewport::mouseMoved(gcn::MouseEvent &event A_UNUSED)
mBeingPopup->setVisible(false);
}
- mHoverItem = actorSpriteManager->findItem(x / mMap->getTileWidth(),
+ mHoverItem = actorManager->findItem(x / mMap->getTileWidth(),
y / mMap->getTileHeight());
if (!mHoverBeing && !mHoverItem)
@@ -991,10 +991,10 @@ bool Viewport::isPopupMenuVisible() const
void Viewport::moveCameraToActor(const int actorId, const int x, const int y)
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
- const Actor *const actor = actorSpriteManager->findBeing(actorId);
+ const Actor *const actor = actorManager->findBeing(actorId);
if (!actor)
return;
const Vector &actorPos = actor->getPosition();
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index c308603c6..b47716ac2 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -279,7 +279,7 @@ class Viewport final : public WindowContainer,
void clearPopup();
protected:
- friend class ActorSpriteManager;
+ friend class ActorManager;
/// Clears any matching hovers
void clearHover(const ActorSprite *const actor);
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index f39fbc02d..d4eefe69c 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -21,7 +21,7 @@
#include "gui/widgets/avatarlistbox.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "graphicsvertexes.h"
#include "maplayer.h"
@@ -313,7 +313,7 @@ void AvatarListBox::draw(gcn::Graphics *gcnGraphics)
void AvatarListBox::mousePressed(gcn::MouseEvent &event)
{
- if (!actorSpriteManager || !player_node || !viewport
+ if (!actorManager || !player_node || !viewport
|| !getFont()->getHeight())
{
return;
@@ -339,10 +339,10 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
{
if (ava->getType() == AVATAR_PLAYER)
{
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
ava->getName(), Being::PLAYER);
if (being)
- actorSpriteManager->heal(being);
+ actorManager->heal(being);
}
else
{
@@ -359,7 +359,7 @@ void AvatarListBox::mousePressed(gcn::MouseEvent &event)
const Avatar *const avatar = model->getAvatarAt(selected);
if (avatar)
{
- const Being *const being = actorSpriteManager
+ const Being *const being = actorManager
->findBeingByName(avatar->getName(), Being::PLAYER);
if (being)
viewport->showPopup(being);
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index 01fb873d4..c837f1cf7 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -22,7 +22,7 @@
#include "gui/widgets/tabs/setup_relations.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "being/localplayer.h"
@@ -358,8 +358,8 @@ void Setup_Relations::apply()
| (mDefaultTrading->isSelected() ? PlayerRelation::TRADE : 0)
| (mDefaultWhisper->isSelected() ? PlayerRelation::WHISPER : 0));
- if (actorSpriteManager)
- actorSpriteManager->updatePlayerNames();
+ if (actorManager)
+ actorManager->updatePlayerNames();
if (player_node)
player_node->setCheckNameSetting(true);
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index 2ce0bce25..b502dd01d 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -27,7 +27,7 @@
#include "gui/widgets/label.h"
#include "gui/widgets/guitable.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "being/localplayer.h"
@@ -100,10 +100,10 @@ public:
freeWidgets();
mPlayers.clear();
- if (actorSpriteManager && botCheckerWindow
+ if (actorManager && botCheckerWindow
&& botCheckerWindow->mEnabled)
{
- std::set<ActorSprite*> beings = actorSpriteManager->getAll();
+ std::set<ActorSprite*> beings = actorManager->getAll();
FOR_EACH (ActorSprites::iterator, i, beings)
{
Being *const being = dynamic_cast<Being*>(*i);
@@ -389,9 +389,9 @@ void BotCheckerWindow::updateList()
void BotCheckerWindow::reset()
{
- if (actorSpriteManager)
+ if (actorManager)
{
- std::set<ActorSprite*> beings = actorSpriteManager->getAll();
+ std::set<ActorSprite*> beings = actorManager->getAll();
FOR_EACH (ActorSprites::iterator, i, beings)
{
Being *const being = dynamic_cast<Being*>(*i);
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index f50ea6876..2c254ad62 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -22,7 +22,7 @@
#include "gui/windows/chatwindow.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "commandhandler.h"
#include "configuration.h"
@@ -671,10 +671,10 @@ void ChatWindow::localChatInput(const std::string &msg) const
void ChatWindow::doPresent() const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const ActorSprites &actors = actorSpriteManager->getAll();
+ const ActorSprites &actors = actorManager->getAll();
std::string response;
int playercount = 0;
@@ -1255,9 +1255,9 @@ void ChatWindow::autoComplete()
if (!newName.empty())
needSecure = true;
- if (newName.empty() && actorSpriteManager)
+ if (newName.empty() && actorManager)
{
- actorSpriteManager->getPlayerNames(nameList, true);
+ actorManager->getPlayerNames(nameList, true);
newName = autoComplete(nameList, name);
if (!newName.empty())
needSecure = true;
@@ -1268,9 +1268,9 @@ void ChatWindow::autoComplete()
newName = spellManager->autoComplete(name);
if (newName.empty())
newName = autoComplete(name, &mCommands);
- if (newName.empty() && actorSpriteManager)
+ if (newName.empty() && actorManager)
{
- actorSpriteManager->getMobNames(nameList);
+ actorManager->getMobNames(nameList);
newName = autoComplete(nameList, name);
}
if (newName.empty())
@@ -1523,9 +1523,9 @@ void ChatWindow::updateOnline(std::set<std::string> &onlinePlayers) const
else
{
const std::string nick = tab->getNick();
- if (actorSpriteManager)
+ if (actorManager)
{
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
nick, ActorSprite::PLAYER);
if (being)
{
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index ee265e2b9..821577d25 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -26,7 +26,7 @@
#include "gui/widgets/label.h"
#include "gui/widgets/layout.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "game.h"
#include "being/localplayer.h"
@@ -453,7 +453,7 @@ void KillStats::jackoAlive(const int id)
void KillStats::validateJacko()
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
const Map *const currentMap = Game::instance()->getCurrentMap();
@@ -468,7 +468,7 @@ void KillStats::validateJacko()
&& player_node->getTileY() <= 46)
{
const Being *const dstBeing
- = actorSpriteManager->findBeingByName(
+ = actorManager->findBeingByName(
"Jack O", Being::MONSTER);
if (mIsJackoAlive && !dstBeing)
{
diff --git a/src/gui/windows/minimap.cpp b/src/gui/windows/minimap.cpp
index d268addf6..9ac4a9e26 100644
--- a/src/gui/windows/minimap.cpp
+++ b/src/gui/windows/minimap.cpp
@@ -22,7 +22,7 @@
#include "gui/windows/minimap.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "party.h"
@@ -249,7 +249,7 @@ void Minimap::draw(gcn::Graphics *graphics)
graphics->pushClipArea(a);
- if (!actorSpriteManager)
+ if (!actorManager)
{
BLOCK_END("Minimap::draw")
return;
@@ -288,7 +288,7 @@ void Minimap::draw(gcn::Graphics *graphics)
graph->drawImage(mMapImage, mMapOriginX, mMapOriginY);
}
- const ActorSprites &actors = actorSpriteManager->getAll();
+ const ActorSprites &actors = actorManager->getAll();
FOR_EACH (ActorSpritesConstIterator, it, actors)
{
if (!(*it) || (*it)->getType() == ActorSprite::FLOOR_ITEM)
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index e8caa0722..3b5d0d772 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -22,7 +22,7 @@
#include "gui/windows/npcdialog.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "client.h"
#include "inventory.h"
@@ -193,9 +193,9 @@ void NpcDialog::postInit()
enableVisibleSound(true);
soundManager.playGuiSound(SOUND_SHOW_WINDOW);
- if (actorSpriteManager)
+ if (actorManager)
{
- const Being *const being = actorSpriteManager->findBeing(mNpcId);
+ const Being *const being = actorManager->findBeing(mNpcId);
if (being)
{
showAvatar(NPCDB::getAvatarFor(being->getSubType()));
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index ce0c1a796..42a7b0bf4 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -20,7 +20,7 @@
#include "gui/windows/questswindow.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "effectmanager.h"
@@ -509,7 +509,7 @@ void QuestsWindow::updateEffects()
}
}
}
- if (!actorSpriteManager)
+ if (!actorManager)
return;
std::set<int> removeEffects;
@@ -549,7 +549,7 @@ void QuestsWindow::updateEffects()
addEffects[id] = effect->effectId;
}
if (!removeEffects.empty() || !addEffects.empty())
- actorSpriteManager->updateEffects(addEffects, removeEffects);
+ actorManager->updateEffects(addEffects, removeEffects);
}
void QuestsWindow::addEffect(Being *const being)
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index aceb872fc..c4facdc02 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -37,7 +37,7 @@
#include "gui/widgets/tabs/chattab.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "auctionmanager.h"
#include "client.h"
#include "configuration.h"
@@ -287,10 +287,10 @@ void ShopWindow::action(const gcn::ActionEvent &event)
void ShopWindow::startTrade()
{
- if (!actorSpriteManager || !tradeWindow)
+ if (!actorManager || !tradeWindow)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
mTradeNick, Being::PLAYER);
tradeWindow->clear();
if (mTradeMoney)
@@ -694,8 +694,8 @@ void ShopWindow::processRequest(const std::string &nick, std::string data,
const int mode)
{
if (!player_node || !mTradeNick.empty() || PlayerInfo::isTrading()
- || !actorSpriteManager
- || !actorSpriteManager->findBeingByName(nick, Being::PLAYER))
+ || !actorManager
+ || !actorManager->findBeingByName(nick, Being::PLAYER))
{
return;
}
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 97f0211d8..aa9d4d328 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -21,7 +21,7 @@
#include "gui/windows/socialwindow.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "guild.h"
#include "guildmanager.h"
@@ -572,7 +572,7 @@ public:
void updateAvatar(const std::string &name) override
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
Avatar *const avatar = findAvatarbyName(name);
@@ -587,7 +587,7 @@ public:
avatar->setHp(pm->getHp());
}
}
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
@@ -600,14 +600,14 @@ public:
void resetDamage(const std::string &name) override
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
Avatar *const avatar = findAvatarbyName(name);
if (!avatar)
return;
avatar->setDamageHp(0);
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
@@ -642,10 +642,10 @@ public:
if (!avatars)
return;
- if (actorSpriteManager)
+ if (actorManager)
{
StringVect names;
- actorSpriteManager->getPlayerNames(names, false);
+ actorManager->getPlayerNames(names, false);
std::vector<Avatar*>::iterator ai = avatars->begin();
while (ai != avatars->end())
@@ -792,7 +792,7 @@ public:
if (config.getBoolValue("drawHotKeys") && idx < 80 && outfitWindow)
{
- Being *const being = actorSpriteManager
+ Being *const being = actorManager
->findPortalByTile(x, y);
if (being)
{
@@ -985,7 +985,7 @@ private:
ava->setX(0);\
ava->setY(0);\
avatars->push_back(ava);\
- mobs = actorSpriteManager->get##mob##s();\
+ mobs = actorManager->get##mob##s();\
i = mobs.begin();\
i_end = mobs.end();\
while (i != i_end)\
@@ -1013,7 +1013,7 @@ private:
}
#define updateAtkListStart() \
- if (!socialWindow || !player_node || !actorSpriteManager)\
+ if (!socialWindow || !player_node || !actorManager)\
return;\
std::vector<Avatar*> *const avatars = mBeings->getMembers();\
std::vector<Avatar*>::iterator ia = avatars->begin();\
@@ -1160,7 +1160,7 @@ public:
void getPlayersAvatars()
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
std::vector<Avatar*> *const avatars = mBeings->getMembers();
@@ -1189,7 +1189,7 @@ public:
FOR_EACHP (StringVectCIter, it, players)
{
Avatar *const ava = new Avatar(*it);
- if (actorSpriteManager->findBeingByName(*it, Being::PLAYER)
+ if (actorManager->findBeingByName(*it, Being::PLAYER)
|| players2.find(*it) != players2.end())
{
ava->setOnline(true);
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index e97ae3095..c4f096c72 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -34,7 +34,7 @@
#include "gui/widgets/browserbox.h"
#include "gui/widgets/scrollarea.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "main.h"
@@ -183,10 +183,10 @@ void WhoIsOnline::handleLink(const std::string& link, gcn::MouseEvent *event)
if (viewport)
{
- if (actorSpriteManager)
+ if (actorManager)
{
const std::string text = decodeLinkText(link);
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
text, Being::PLAYER);
if (being && viewport)
@@ -408,9 +408,9 @@ void WhoIsOnline::loadWebList()
if (!lineStr.empty())
level = atoi(lineStr.c_str());
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
nick, Being::PLAYER);
if (being)
{
@@ -762,7 +762,7 @@ void WhoIsOnline::setNeutralColor(OnlinePlayer *const player)
if (!player)
return;
- if (actorSpriteManager && player_node)
+ if (actorManager && player_node)
{
const std::string &nick = player->getNick();
if (nick == player_node->getName())
@@ -783,7 +783,7 @@ void WhoIsOnline::setNeutralColor(OnlinePlayer *const player)
}
}
- const Being *const being = actorSpriteManager->findBeingByName(nick);
+ const Being *const being = actorManager->findBeingByName(nick);
if (being)
{
const Guild *const guild2 = player_node->getGuild();
@@ -827,9 +827,9 @@ void OnlinePlayer::setText(std::string color)
{
mText.clear();
- if (mStatus != 255 && actorSpriteManager)
+ if (mStatus != 255 && actorManager)
{
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
mNick, Being::PLAYER);
if (being)
{