summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manaplus.cbp2
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/Makefile.am4
-rw-r--r--src/actionmanager.cpp24
-rw-r--r--src/actormanager.cpp (renamed from src/actorspritemanager.cpp)208
-rw-r--r--src/actormanager.h (renamed from src/actorspritemanager.h)18
-rw-r--r--src/being/being.cpp14
-rw-r--r--src/being/localplayer.cpp38
-rw-r--r--src/being/playerrelations.cpp10
-rw-r--r--src/commands.cpp68
-rw-r--r--src/game.cpp26
-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
-rw-r--r--src/guild.cpp6
-rw-r--r--src/guildmanager.cpp18
-rw-r--r--src/net/ea/beinghandler.cpp84
-rw-r--r--src/net/ea/chathandler.cpp14
-rw-r--r--src/net/ea/guildhandler.cpp28
-rw-r--r--src/net/ea/itemhandler.cpp16
-rw-r--r--src/net/ea/partyhandler.cpp14
-rw-r--r--src/net/eathena/beinghandler.cpp30
-rw-r--r--src/net/eathena/guildhandler.cpp6
-rw-r--r--src/net/eathena/partyhandler.cpp6
-rw-r--r--src/net/tmwa/beinghandler.cpp20
-rw-r--r--src/net/tmwa/guildhandler.cpp6
-rw-r--r--src/net/tmwa/partyhandler.cpp6
-rw-r--r--src/party.cpp6
39 files changed, 494 insertions, 500 deletions
diff --git a/manaplus.cbp b/manaplus.cbp
index fa8bf393e..98fd52500 100644
--- a/manaplus.cbp
+++ b/manaplus.cbp
@@ -88,7 +88,7 @@
<Linker>
</Linker>
<Unit filename="src/actionmanager.cpp" />
- <Unit filename="src/actorspritemanager.cpp" />
+ <Unit filename="src/actormanager.cpp" />
<Unit filename="src/animatedsprite.cpp" />
<Unit filename="src/animationdelayload.cpp" />
<Unit filename="src/auctionmanager.cpp" />
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a45793802..254704a88 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -569,8 +569,8 @@ SET(SRCS
being/actorsprite.cpp
being/actorsprite.h
being/actorspritelistener.h
- actorspritemanager.cpp
- actorspritemanager.h
+ actormanager.cpp
+ actormanager.h
animatedsprite.cpp
animatedsprite.h
animationdelayload.cpp
diff --git a/src/Makefile.am b/src/Makefile.am
index f032777d7..9f07e72f7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -582,8 +582,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
being/actorsprite.cpp \
being/actorsprite.h \
being/actorspritelistener.h \
- actorspritemanager.cpp \
- actorspritemanager.h \
+ actormanager.cpp \
+ actormanager.h \
animatedsprite.cpp \
animatedsprite.h \
animationdelayload.cpp \
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index d415f93ab..e34482c13 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -20,7 +20,7 @@
#include "actionmanager.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "dropshortcut.h"
#include "emoteshortcut.h"
#include "game.h"
@@ -371,21 +371,21 @@ impHandler0(switchQuickDrop)
impHandler0(heal)
{
- if (actorSpriteManager)
+ if (actorManager)
{
if (inputManager.isActionActive(Input::KEY_MOD))
{
Being *target = player_node->getTarget();
if (!target || target->getType() != ActorSprite::PLAYER)
{
- target = actorSpriteManager->findNearestLivingBeing(
+ target = actorManager->findNearestLivingBeing(
player_node, 10, ActorSprite::PLAYER);
if (target)
player_node->setTarget(target);
}
}
- actorSpriteManager->healTarget();
+ actorManager->healTarget();
if (Game::instance())
Game::instance()->setValidSpeed();
return true;
@@ -405,12 +405,12 @@ impHandler0(crazyMoves)
impHandler0(itenplz)
{
- if (actorSpriteManager)
+ if (actorManager)
{
if (Net::getPlayerHandler() && Net::getPlayerHandler()->canUseMagic()
&& PlayerInfo::getAttribute(PlayerInfo::MP) >= 3)
{
- actorSpriteManager->itenplz();
+ actorManager->itenplz();
}
return true;
}
@@ -962,9 +962,9 @@ impHandler0(talk)
if (player_node)
{
Being *target = player_node->getTarget();
- if (!target && actorSpriteManager)
+ if (!target && actorManager)
{
- target = actorSpriteManager->findNearestLivingBeing(
+ target = actorManager->findNearestLivingBeing(
player_node, 1, ActorSprite::NPC);
// ignore closest target if distance in each direction more than 1
if (target)
@@ -1025,7 +1025,7 @@ impHandler0(attack)
impHandler0(targetAttack)
{
- if (player_node && actorSpriteManager)
+ if (player_node && actorManager)
{
Being *target = nullptr;
@@ -1035,7 +1035,7 @@ impHandler0(targetAttack)
if (!player_node->getTarget())
{
// Only auto target Monsters
- target = actorSpriteManager->findNearestLivingBeing(
+ target = actorManager->findNearestLivingBeing(
player_node, 90, ActorSprite::MONSTER);
}
else
@@ -1051,9 +1051,9 @@ impHandler0(targetAttack)
static bool setTarget(const ActorSprite::Type type)
{
- if (actorSpriteManager && player_node)
+ if (actorManager && player_node)
{
- Being *const target = actorSpriteManager->findNearestLivingBeing(
+ Being *const target = actorManager->findNearestLivingBeing(
player_node, 20, type);
if (target && target != player_node->getTarget())
diff --git a/src/actorspritemanager.cpp b/src/actormanager.cpp
index 0ea7a7295..f37cc9a18 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actormanager.cpp
@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
@@ -184,7 +184,7 @@ class SortBeingFunctor final
bool specialDistance;
} beingActorSorter;
-ActorSpriteManager::ActorSpriteManager() :
+ActorManager::ActorManager() :
mActors(),
mDeleteActors(),
mBlockedBeings(),
@@ -209,14 +209,14 @@ ActorSpriteManager::ActorSpriteManager() :
loadAttackList();
}
-ActorSpriteManager::~ActorSpriteManager()
+ActorManager::~ActorManager()
{
config.removeListeners(this);
storeAttackList();
clear();
}
-void ActorSpriteManager::setMap(Map *const map)
+void ActorManager::setMap(Map *const map)
{
mMap = map;
@@ -224,7 +224,7 @@ void ActorSpriteManager::setMap(Map *const map)
player_node->setMap(map);
}
-void ActorSpriteManager::setPlayer(LocalPlayer *const player)
+void ActorManager::setPlayer(LocalPlayer *const player)
{
player_node = player;
mActors.insert(player);
@@ -234,9 +234,9 @@ void ActorSpriteManager::setPlayer(LocalPlayer *const player)
socialWindow->updatePickupFilter();
}
-Being *ActorSpriteManager::createBeing(const int id,
- const ActorSprite::Type type,
- const uint16_t subtype)
+Being *ActorManager::createBeing(const int id,
+ const ActorSprite::Type type,
+ const uint16_t subtype)
{
Being *const being = new Being(id, type, subtype, mMap);
@@ -244,11 +244,11 @@ Being *ActorSpriteManager::createBeing(const int id,
return being;
}
-FloorItem *ActorSpriteManager::createItem(const int id, const int itemId,
- const int x, const int y,
- const int amount,
- const unsigned char color,
- const int subX, const int subY)
+FloorItem *ActorManager::createItem(const int id, const int itemId,
+ const int x, const int y,
+ const int amount,
+ const unsigned char color,
+ const int subX, const int subY)
{
FloorItem *const floorItem = new FloorItem(id, itemId,
x, y, amount, color);
@@ -260,7 +260,7 @@ FloorItem *ActorSpriteManager::createItem(const int id, const int itemId,
return floorItem;
}
-void ActorSpriteManager::destroy(ActorSprite *const actor)
+void ActorManager::destroy(ActorSprite *const actor)
{
if (!actor || actor == player_node)
return;
@@ -268,7 +268,7 @@ void ActorSpriteManager::destroy(ActorSprite *const actor)
mDeleteActors.insert(actor);
}
-void ActorSpriteManager::erase(ActorSprite *const actor)
+void ActorManager::erase(ActorSprite *const actor)
{
if (!actor || actor == player_node)
return;
@@ -276,7 +276,7 @@ void ActorSpriteManager::erase(ActorSprite *const actor)
mActors.erase(actor);
}
-void ActorSpriteManager::undelete(const ActorSprite *const actor)
+void ActorManager::undelete(const ActorSprite *const actor)
{
if (!actor || actor == player_node)
return;
@@ -291,7 +291,7 @@ void ActorSpriteManager::undelete(const ActorSprite *const actor)
}
}
-Being *ActorSpriteManager::findBeing(const int id) const
+Being *ActorManager::findBeing(const int id) const
{
for_actors
{
@@ -306,8 +306,8 @@ Being *ActorSpriteManager::findBeing(const int id) const
return nullptr;
}
-Being *ActorSpriteManager::findBeing(const int x, const int y,
- const ActorSprite::Type type) const
+Being *ActorManager::findBeing(const int x, const int y,
+ const ActorSprite::Type type) const
{
beingActorFinder.x = static_cast<uint16_t>(x);
beingActorFinder.y = static_cast<uint16_t>(y);
@@ -319,8 +319,8 @@ Being *ActorSpriteManager::findBeing(const int x, const int y,
return (it == mActors.end()) ? nullptr : static_cast<Being*>(*it);
}
-Being *ActorSpriteManager::findBeingByPixel(const int x, const int y,
- const bool allPlayers) const
+Being *ActorManager::findBeingByPixel(const int x, const int y,
+ const bool allPlayers) const
{
if (!mMap)
return nullptr;
@@ -420,9 +420,9 @@ Being *ActorSpriteManager::findBeingByPixel(const int x, const int y,
}
}
-void ActorSpriteManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
- const int x, const int y,
- const bool allPlayers) const
+void ActorManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
+ const int x, const int y,
+ const bool allPlayers) const
{
if (!mMap)
return;
@@ -464,7 +464,7 @@ void ActorSpriteManager::findBeingsByPixel(std::vector<ActorSprite*> &beings,
}
}
-Being *ActorSpriteManager::findPortalByTile(const int x, const int y) const
+Being *ActorManager::findPortalByTile(const int x, const int y) const
{
if (!mMap)
return nullptr;
@@ -486,7 +486,7 @@ Being *ActorSpriteManager::findPortalByTile(const int x, const int y) const
return nullptr;
}
-FloorItem *ActorSpriteManager::findItem(const int id) const
+FloorItem *ActorManager::findItem(const int id) const
{
for_actorsm
{
@@ -503,7 +503,7 @@ FloorItem *ActorSpriteManager::findItem(const int id) const
return nullptr;
}
-FloorItem *ActorSpriteManager::findItem(const int x, const int y) const
+FloorItem *ActorManager::findItem(const int x, const int y) const
{
for_actorsm
{
@@ -520,9 +520,9 @@ FloorItem *ActorSpriteManager::findItem(const int x, const int y) const
return nullptr;
}
-bool ActorSpriteManager::pickUpAll(const int x1, const int y1,
- const int x2, const int y2,
- const bool serverBuggy)
+bool ActorManager::pickUpAll(const int x1, const int y1,
+ const int x2, const int y2,
+ const bool serverBuggy)
{
if (!player_node)
return false;
@@ -617,8 +617,8 @@ bool ActorSpriteManager::pickUpAll(const int x1, const int y1,
return finded;
}
-bool ActorSpriteManager::pickUpNearest(const int x, const int y,
- int maxdist) const
+bool ActorManager::pickUpNearest(const int x, const int y,
+ int maxdist) const
{
if (!player_node)
return false;
@@ -671,8 +671,8 @@ bool ActorSpriteManager::pickUpNearest(const int x, const int y,
return false;
}
-Being *ActorSpriteManager::findBeingByName(const std::string &name,
- const ActorSprite::Type type) const
+Being *ActorManager::findBeingByName(const std::string &name,
+ const ActorSprite::Type type) const
{
for_actorsm
{
@@ -695,8 +695,8 @@ Being *ActorSpriteManager::findBeingByName(const std::string &name,
return nullptr;
}
-Being *ActorSpriteManager::findNearestByName(const std::string &name,
- const Being::Type &type) const
+Being *ActorManager::findNearestByName(const std::string &name,
+ const Being::Type &type) const
{
if (!player_node)
return nullptr;
@@ -745,14 +745,14 @@ Being *ActorSpriteManager::findNearestByName(const std::string &name,
return closestBeing;
}
-const ActorSprites &ActorSpriteManager::getAll() const
+const ActorSprites &ActorManager::getAll() const
{
return mActors;
}
-void ActorSpriteManager::logic()
+void ActorManager::logic()
{
- BLOCK_START("ActorSpriteManager::logic")
+ BLOCK_START("ActorManager::logic")
for_actors
{
if (*it)
@@ -761,11 +761,11 @@ void ActorSpriteManager::logic()
if (mDeleteActors.empty())
{
- BLOCK_END("ActorSpriteManager::logic")
+ BLOCK_END("ActorManager::logic")
return;
}
- BLOCK_START("ActorSpriteManager::logic 1")
+ BLOCK_START("ActorManager::logic 1")
FOR_EACH (ActorSpritesConstIterator, it, mDeleteActors)
{
if (!*it)
@@ -796,11 +796,11 @@ void ActorSpriteManager::logic()
}
mDeleteActors.clear();
- BLOCK_END("ActorSpriteManager::logic 1")
- BLOCK_END("ActorSpriteManager::logic")
+ BLOCK_END("ActorManager::logic 1")
+ BLOCK_END("ActorManager::logic")
}
-void ActorSpriteManager::clear()
+void ActorManager::clear()
{
if (beingEquipmentWindow)
beingEquipmentWindow->setBeing(nullptr);
@@ -823,21 +823,19 @@ void ActorSpriteManager::clear()
mActors.insert(player_node);
}
-Being *ActorSpriteManager::findNearestLivingBeing(const int x, const int y,
- const int maxTileDist,
- const ActorSprite::Type type,
- const Being *const
- excluded) const
+Being *ActorManager::findNearestLivingBeing(const int x, const int y,
+ const int maxTileDist,
+ const ActorSprite::Type type,
+ const Being *const excluded) const
{
const int maxDist = maxTileDist * mapTileSize;
return findNearestLivingBeing(nullptr, maxDist, type, x, y, excluded);
}
-Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
- aroundBeing,
- const int maxDist,
- const Being::Type type) const
+Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing,
+ const int maxDist,
+ const Being::Type type) const
{
if (!aroundBeing)
return nullptr;
@@ -846,12 +844,11 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
aroundBeing->getTileX(), aroundBeing->getTileY(), aroundBeing);
}
-Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
- aroundBeing, int maxDist,
- const Being::Type &type,
- const int x, const int y,
- const Being *const
- excluded) const
+Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing,
+ int maxDist,
+ const Being::Type &type,
+ const int x, const int y,
+ const Being *const excluded) const
{
if (!aroundBeing || !player_node)
return nullptr;
@@ -1103,11 +1100,11 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
}
}
-bool ActorSpriteManager::validateBeing(const Being *const aroundBeing,
- Being *const being,
- const Being::Type &type,
- const Being* const excluded,
- const int maxCost) const
+bool ActorManager::validateBeing(const Being *const aroundBeing,
+ Being *const being,
+ const Being::Type &type,
+ const Being* const excluded,
+ const int maxCost) const
{
if (!player_node)
return false;
@@ -1119,7 +1116,7 @@ bool ActorSpriteManager::validateBeing(const Being *const aroundBeing,
|| player_node->isReachable(being, maxCost));
}
-void ActorSpriteManager::healTarget() const
+void ActorManager::healTarget() const
{
if (!player_node)
return;
@@ -1127,7 +1124,7 @@ void ActorSpriteManager::healTarget() const
heal(player_node->getTarget());
}
-void ActorSpriteManager::heal(const Being *const target) const
+void ActorManager::heal(const Being *const target) const
{
if (!player_node || !chatWindow || !player_node->isAlive()
|| !Net::getPlayerHandler()->canUseMagic())
@@ -1206,7 +1203,7 @@ void ActorSpriteManager::heal(const Being *const target) const
}
}
-void ActorSpriteManager::itenplz() const
+void ActorManager::itenplz() const
{
if (!player_node || !chatWindow || !player_node->isAlive()
|| !Net::getPlayerHandler()->canUseMagic())
@@ -1220,7 +1217,7 @@ void ActorSpriteManager::itenplz() const
chatWindow->localChatInput(mSpellItenplz);
}
-bool ActorSpriteManager::hasActorSprite(const ActorSprite *const actor) const
+bool ActorManager::hasActorSprite(const ActorSprite *const actor) const
{
for_actors
{
@@ -1231,29 +1228,29 @@ bool ActorSpriteManager::hasActorSprite(const ActorSprite *const actor) const
return false;
}
-void ActorSpriteManager::addBlock(const uint32_t id)
+void ActorManager::addBlock(const uint32_t id)
{
mBlockedBeings.insert(id);
}
-void ActorSpriteManager::deleteBlock(const uint32_t id)
+void ActorManager::deleteBlock(const uint32_t id)
{
mBlockedBeings.erase(id);
}
-bool ActorSpriteManager::isBlocked(const uint32_t id) const
+bool ActorManager::isBlocked(const uint32_t id) const
{
return mBlockedBeings.find(id) != mBlockedBeings.end();
}
-void ActorSpriteManager::printAllToChat() const
+void ActorManager::printAllToChat() const
{
// TRANSLATORS: visible beings on map
printBeingsToChat(getAll(), _("Visible on map"));
}
-void ActorSpriteManager::printBeingsToChat(const ActorSprites &beings,
- const std::string &header) const
+void ActorManager::printBeingsToChat(const ActorSprites &beings,
+ const std::string &header) const
{
if (!debugChatTab)
return;
@@ -1277,8 +1274,8 @@ void ActorSpriteManager::printBeingsToChat(const ActorSprites &beings,
debugChatTab->chatLog("---------------------------------------");
}
-void ActorSpriteManager::printBeingsToChat(const std::vector<Being*> &beings,
- const std::string &header) const
+void ActorManager::printBeingsToChat(const std::vector<Being*> &beings,
+ const std::string &header) const
{
if (!debugChatTab)
return;
@@ -1300,8 +1297,8 @@ void ActorSpriteManager::printBeingsToChat(const std::vector<Being*> &beings,
debugChatTab->chatLog("---------------------------------------");
}
-void ActorSpriteManager::getPlayerNames(StringVect &names,
- const bool npcNames) const
+void ActorManager::getPlayerNames(StringVect &names,
+ const bool npcNames) const
{
names.clear();
@@ -1326,7 +1323,7 @@ void ActorSpriteManager::getPlayerNames(StringVect &names,
}
}
-void ActorSpriteManager::getMobNames(StringVect &names) const
+void ActorManager::getMobNames(StringVect &names) const
{
names.clear();
@@ -1347,7 +1344,7 @@ void ActorSpriteManager::getMobNames(StringVect &names) const
}
}
-void ActorSpriteManager::updatePlayerNames() const
+void ActorManager::updatePlayerNames() const
{
for_actorsm
{
@@ -1367,7 +1364,7 @@ void ActorSpriteManager::updatePlayerNames() const
}
}
-void ActorSpriteManager::updatePlayerColors() const
+void ActorManager::updatePlayerColors() const
{
for_actorsm
{
@@ -1386,7 +1383,7 @@ void ActorSpriteManager::updatePlayerColors() const
}
}
-void ActorSpriteManager::updatePlayerGuild() const
+void ActorManager::updatePlayerGuild() const
{
for_actorsm
{
@@ -1405,7 +1402,7 @@ void ActorSpriteManager::updatePlayerGuild() const
}
}
-void ActorSpriteManager::parseLevels(std::string levels) const
+void ActorManager::parseLevels(std::string levels) const
{
levels.append(", ");
size_t f = 0;
@@ -1434,7 +1431,7 @@ void ActorSpriteManager::parseLevels(std::string levels) const
updatePlayerNames();
}
-void ActorSpriteManager::optionChanged(const std::string &name)
+void ActorManager::optionChanged(const std::string &name)
{
if (name == "targetDeadPlayers")
mTargetDeadPlayers = config.getBoolValue("targetDeadPlayers");
@@ -1450,7 +1447,7 @@ void ActorSpriteManager::optionChanged(const std::string &name)
mExtMouseTargeting = config.getBoolValue("extMouseTargeting");
}
-void ActorSpriteManager::removeAttackMob(const std::string &name)
+void ActorManager::removeAttackMob(const std::string &name)
{
mPriorityAttackMobs.remove(name);
mAttackMobs.remove(name);
@@ -1462,7 +1459,7 @@ void ActorSpriteManager::removeAttackMob(const std::string &name)
rebuildPriorityAttackMobs();
}
-void ActorSpriteManager::removePickupItem(const std::string &name)
+void ActorManager::removePickupItem(const std::string &name)
{
mPickupItems.remove(name);
mPickupItemsSet.erase(name);
@@ -1509,18 +1506,18 @@ void ActorSpriteManager::removePickupItem(const std::string &name)
}\
}
-void ActorSpriteManager::addAttackMob(const std::string &name)
+void ActorManager::addAttackMob(const std::string &name)
{
addMobToList(name, AttackMob);
rebuildPriorityAttackMobs();
}
-void ActorSpriteManager::addPriorityAttackMob(const std::string &name)
+void ActorManager::addPriorityAttackMob(const std::string &name)
{
addMobToList(name, PriorityAttackMob);
}
-void ActorSpriteManager::addIgnoreAttackMob(const std::string &name)
+void ActorManager::addIgnoreAttackMob(const std::string &name)
{
mIgnoreAttackMobs.push_back(name);
mIgnoreAttackMobsSet.insert(name);
@@ -1528,37 +1525,36 @@ void ActorSpriteManager::addIgnoreAttackMob(const std::string &name)
rebuildPriorityAttackMobs();
}
-void ActorSpriteManager::addPickupItem(const std::string &name)
+void ActorManager::addPickupItem(const std::string &name)
{
addMobToList(name, PickupItem);
rebuildPickupItems();
}
-void ActorSpriteManager::addIgnorePickupItem(const std::string &name)
+void ActorManager::addIgnorePickupItem(const std::string &name)
{
mIgnorePickupItems.push_back(name);
mIgnorePickupItemsSet.insert(name);
rebuildPickupItems();
}
-void ActorSpriteManager::rebuildPriorityAttackMobs()
+void ActorManager::rebuildPriorityAttackMobs()
{
rebuildMobsList(PriorityAttackMob);
}
-void ActorSpriteManager::rebuildAttackMobs()
+void ActorManager::rebuildAttackMobs()
{
rebuildMobsList(AttackMob);
}
-void ActorSpriteManager::rebuildPickupItems()
+void ActorManager::rebuildPickupItems()
{
rebuildMobsList(PickupItem);
}
-int ActorSpriteManager::getIndexByName(const std::string &name,
- const std::map<std::string, int> &map)
- const
+int ActorManager::getIndexByName(const std::string &name,
+ const std::map<std::string, int> &map) const
{
const std::map<std::string, int>::const_iterator
i = map.find(name);
@@ -1568,18 +1564,17 @@ int ActorSpriteManager::getIndexByName(const std::string &name,
return (*i).second;
}
-int ActorSpriteManager::getPriorityAttackMobIndex(const std::string &name)
- const
+int ActorManager::getPriorityAttackMobIndex(const std::string &name) const
{
return getIndexByName(name, mPriorityAttackMobsMap);
}
-int ActorSpriteManager::getAttackMobIndex(const std::string &name) const
+int ActorManager::getAttackMobIndex(const std::string &name) const
{
return getIndexByName(name, mAttackMobsMap);
}
-int ActorSpriteManager::getPickupItemIndex(const std::string &name) const
+int ActorManager::getPickupItemIndex(const std::string &name) const
{
return getIndexByName(name, mPickupItemsMap);
}
@@ -1599,7 +1594,7 @@ int ActorSpriteManager::getPickupItemIndex(const std::string &name) const
}\
}
-void ActorSpriteManager::loadAttackList()
+void ActorManager::loadAttackList()
{
bool empty = false;
std::list<std::string> list;
@@ -1629,7 +1624,7 @@ void ActorSpriteManager::loadAttackList()
rebuildPickupItems();
}
-void ActorSpriteManager::storeAttackList() const
+void ActorManager::storeAttackList() const
{
serverConfig.setValue("attackPriorityMobs", packList(mPriorityAttackMobs));
serverConfig.setValue("attackMobs", packList(mAttackMobs));
@@ -1639,7 +1634,7 @@ void ActorSpriteManager::storeAttackList() const
serverConfig.setValue("ignorePickupItems", packList(mIgnorePickupItems));
}
-bool ActorSpriteManager::checkForPickup(const FloorItem *const item) const
+bool ActorManager::checkForPickup(const FloorItem *const item) const
{
if (mPickupItemsSet.find("") != mPickupItemsSet.end())
{
@@ -1657,9 +1652,8 @@ bool ActorSpriteManager::checkForPickup(const FloorItem *const item) const
return false;
}
-void ActorSpriteManager::updateEffects(const std::map<int, int> &addEffects,
- const std::set<int> &removeEffects)
- const
+void ActorManager::updateEffects(const std::map<int, int> &addEffects,
+ const std::set<int> &removeEffects) const
{
for_actorsm
{
diff --git a/src/actorspritemanager.h b/src/actormanager.h
index ef0cf6875..93068b8c8 100644
--- a/src/actorspritemanager.h
+++ b/src/actormanager.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef ACTORSPRITEMANAGER_H
-#define ACTORSPRITEMANAGER_H
+#ifndef ACTORMANAGER_H
+#define ACTORMANAGER_H
#include "flooritem.h"
@@ -36,14 +36,14 @@ typedef std::set<ActorSprite*> ActorSprites;
typedef ActorSprites::iterator ActorSpritesIterator;
typedef ActorSprites::const_iterator ActorSpritesConstIterator;
-class ActorSpriteManager final: public ConfigListener
+class ActorManager final: public ConfigListener
{
public:
- ActorSpriteManager();
+ ActorManager();
- A_DELETE_COPY(ActorSpriteManager)
+ A_DELETE_COPY(ActorManager)
- ~ActorSpriteManager();
+ ~ActorManager();
/**
* Sets the map on which ActorSprites are created.
@@ -71,7 +71,7 @@ class ActorSpriteManager final: public ConfigListener
/**
* Destroys the given ActorSprite at the end of
- * ActorSpriteManager::logic.
+ * ActorManager::logic.
*/
void destroy(ActorSprite *const actor);
@@ -352,6 +352,6 @@ class ActorSpriteManager final: public ConfigListener
defVars(PickupItems)
};
-extern ActorSpriteManager *actorSpriteManager;
+extern ActorManager *actorManager;
-#endif // ACTORSPRITEMANAGER_H
+#endif // ACTORMANAGER_H
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 556341062..fdd706bbe 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -22,7 +22,7 @@
#include "being/being.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "animatedsprite.h"
#include "beingequipbackend.h"
#include "client.h"
@@ -1572,8 +1572,8 @@ void Being::logic()
&& static_cast<int> ((static_cast<float>(get_elapsed_time(mActionTime))
/ mSpeed)) >= frameCount)
{
- if (mType != PLAYER && actorSpriteManager)
- actorSpriteManager->destroy(this);
+ if (mType != PLAYER && actorManager)
+ actorManager->destroy(this);
}
const SoundInfo *const sound = mNextSound.sound;
@@ -2991,11 +2991,11 @@ void Being::addEffect(const std::string &name)
void Being::addPet(const int id)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
removePet();
- Being *const being = actorSpriteManager->createBeing(
+ Being *const being = actorManager->createBeing(
id, ActorSprite::PET, 0);
if (being)
{
@@ -3008,14 +3008,14 @@ void Being::addPet(const int id)
void Being::removePet()
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
mPetId = 0;
if (mPet)
{
mPet->setOwner(nullptr);
- actorSpriteManager->destroy(mPet);
+ actorManager->destroy(mPet);
mPet = nullptr;
}
}
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 4bff1320e..6df48dec7 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -22,7 +22,7 @@
#include "being/localplayer.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "dropshortcut.h"
@@ -902,7 +902,7 @@ bool LocalPlayer::pickUp(FloorItem *const item)
if (dx * dx + dy * dy < dist)
{
- if (actorSpriteManager && actorSpriteManager->checkForPickup(item))
+ if (actorManager && actorManager->checkForPickup(item))
{
PlayerInfo::pickUpItem(item, true);
mPickUpTarget = nullptr;
@@ -1354,9 +1354,9 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, const int amount,
{
if (fail)
{
- if (actorSpriteManager && floorItemId)
+ if (actorManager && floorItemId)
{
- FloorItem *const item = actorSpriteManager->findItem(floorItemId);
+ FloorItem *const item = actorManager->findItem(floorItemId);
if (item)
{
if (!item->getShowMsg())
@@ -3068,7 +3068,7 @@ bool LocalPlayer::isReachable(const int x, const int y,
bool LocalPlayer::pickUpItems(int pickUpType)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return false;
bool status = false;
@@ -3077,7 +3077,7 @@ bool LocalPlayer::pickUpItems(int pickUpType)
// first pick up item on player position
FloorItem *item =
- actorSpriteManager->findItem(x, y);
+ actorManager->findItem(x, y);
if (item)
status = pickUp(item);
@@ -3099,7 +3099,7 @@ bool LocalPlayer::pickUpItems(int pickUpType)
case RIGHT: ++x; break;
default: break;
}
- item = actorSpriteManager->findItem(x, y);
+ item = actorManager->findItem(x, y);
if (item)
status = pickUp(item);
break;
@@ -3112,18 +3112,18 @@ bool LocalPlayer::pickUpItems(int pickUpType)
case RIGHT: x1 = x; y1 = y - 1; x2 = x + 1; y2 = y + 1; break;
default: x1 = x; x2 = x; y1 = y; y2 = y; break;
}
- if (actorSpriteManager->pickUpAll(x1, y1, x2, y2))
+ if (actorManager->pickUpAll(x1, y1, x2, y2))
status = true;
break;
case 3:
- if (actorSpriteManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
+ if (actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
status = true;
break;
case 4:
- if (!actorSpriteManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
+ if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
{
- if (actorSpriteManager->pickUpNearest(x, y, 4))
+ if (actorManager->pickUpNearest(x, y, 4))
status = true;
}
else
@@ -3133,9 +3133,9 @@ bool LocalPlayer::pickUpItems(int pickUpType)
break;
case 5:
- if (!actorSpriteManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
+ if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
{
- if (actorSpriteManager->pickUpNearest(x, y, 8))
+ if (actorManager->pickUpNearest(x, y, 8))
status = true;
}
else
@@ -3145,9 +3145,9 @@ bool LocalPlayer::pickUpItems(int pickUpType)
break;
case 6:
- if (!actorSpriteManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
+ if (!actorManager->pickUpAll(x - 1, y - 1, x + 1, y + 1))
{
- if (actorSpriteManager->pickUpNearest(x, y, 90))
+ if (actorManager->pickUpNearest(x, y, 90))
status = true;
}
else
@@ -3701,13 +3701,13 @@ void LocalPlayer::updateCoords()
/ mapTileSize;
if (mNavigateId)
{
- if (!actorSpriteManager)
+ if (!actorManager)
{
navigateClean();
return;
}
- const Being *const being = actorSpriteManager
+ const Being *const being = actorManager
->findBeing(mNavigateId);
if (!being)
{
@@ -4052,9 +4052,9 @@ void LocalPlayer::followMoveTo(const Being *const being,
case 3:
if (!mTarget || mTarget->getName() != mPlayerFollowed)
{
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const b = actorSpriteManager->findBeingByName(
+ Being *const b = actorManager->findBeingByName(
mPlayerFollowed, Being::PLAYER);
setTarget(b);
}
diff --git a/src/being/playerrelations.cpp b/src/being/playerrelations.cpp
index fc4889951..b06539ea0 100644
--- a/src/being/playerrelations.cpp
+++ b/src/being/playerrelations.cpp
@@ -22,7 +22,7 @@
#include "being/playerrelations.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "being/localplayer.h"
@@ -244,9 +244,9 @@ void PlayerRelationsManager::signalUpdate(const std::string &name)
FOR_EACH (PlayerRelationListenersCIter, it, mListeners)
(*it)->updatedPlayer(name);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being && being->getType() == Being::PLAYER)
@@ -306,7 +306,7 @@ bool PlayerRelationsManager::hasPermission(const Being *const being,
bool PlayerRelationsManager::hasPermission(const std::string &name,
const unsigned int flags) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return false;
const unsigned int rejections = flags
@@ -318,7 +318,7 @@ bool PlayerRelationsManager::hasPermission(const std::string &name,
// execute `ignore' strategy, if possible
if (mIgnoreStrategy)
{
- Being *const b = actorSpriteManager->findBeingByName(
+ Being *const b = actorManager->findBeingByName(
name, ActorSprite::PLAYER);
if (b && b->getType() == ActorSprite::PLAYER)
diff --git a/src/commands.cpp b/src/commands.cpp
index 3dd4175eb..36ea69a0c 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -23,7 +23,7 @@
#include "commands.h"
#include "auctionmanager.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "game.h"
@@ -622,8 +622,8 @@ impHandler0(quit)
impHandler0(showAll)
{
- if (actorSpriteManager)
- actorSpriteManager->printAllToChat();
+ if (actorManager)
+ actorManager->printAllToChat();
}
impHandler1(move)
@@ -651,20 +651,20 @@ impHandler1(navigate)
impHandler1(target)
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
- Being *const target = actorSpriteManager->findNearestByName(args);
+ Being *const target = actorManager->findNearestByName(args);
if (target)
player_node->setTarget(target);
}
impHandler0(attackHuman)
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
- Being *const target = actorSpriteManager->findNearestLivingBeing(
+ Being *const target = actorManager->findNearestLivingBeing(
player_node, 10, ActorSprite::PLAYER);
if (target)
{
@@ -763,19 +763,19 @@ impHandler(imitation)
impHandler1(heal)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
if (!args.empty())
{
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
args, Being::PLAYER);
if (being)
- actorSpriteManager->heal(being);
+ actorManager->heal(being);
}
else
{
- actorSpriteManager->heal(player_node);
+ actorManager->heal(player_node);
}
}
@@ -809,20 +809,20 @@ impHandler0(disconnect)
impHandler1(undress)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- Being *const target = actorSpriteManager->findNearestByName(args);
+ Being *const target = actorManager->findNearestByName(args);
if (target)
Net::getBeingHandler()->undress(target);
}
impHandler1(attack)
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
- Being *const target = actorSpriteManager->findNearestByName(args);
+ Being *const target = actorManager->findNearestByName(args);
if (target)
player_node->setTarget(target);
player_node->attack2(player_node->getTarget(), true);
@@ -830,10 +830,10 @@ impHandler1(attack)
impHandler1(trade)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
args, Being::PLAYER);
if (being)
{
@@ -954,14 +954,14 @@ impHandler0(uptime)
impHandler1(addPriorityAttack)
{
- if (!actorSpriteManager
- || actorSpriteManager->isInPriorityAttackList(args))
+ if (!actorManager
+ || actorManager->isInPriorityAttackList(args))
{
return;
}
- actorSpriteManager->removeAttackMob(args);
- actorSpriteManager->addPriorityAttackMob(args);
+ actorManager->removeAttackMob(args);
+ actorManager->addPriorityAttackMob(args);
if (socialWindow)
socialWindow->updateAttackFilter();
@@ -969,11 +969,11 @@ impHandler1(addPriorityAttack)
impHandler1(addAttack)
{
- if (!actorSpriteManager || actorSpriteManager->isInAttackList(args))
+ if (!actorManager || actorManager->isInAttackList(args))
return;
- actorSpriteManager->removeAttackMob(args);
- actorSpriteManager->addAttackMob(args);
+ actorManager->removeAttackMob(args);
+ actorManager->addAttackMob(args);
if (socialWindow)
socialWindow->updateAttackFilter();
@@ -981,13 +981,13 @@ impHandler1(addAttack)
impHandler1(removeAttack)
{
- if (!actorSpriteManager || args.empty()
- || !actorSpriteManager->isInAttackList(args))
+ if (!actorManager || args.empty()
+ || !actorManager->isInAttackList(args))
{
return;
}
- actorSpriteManager->removeAttackMob(args);
+ actorManager->removeAttackMob(args);
if (socialWindow)
socialWindow->updateAttackFilter();
@@ -995,11 +995,11 @@ impHandler1(removeAttack)
impHandler1(addIgnoreAttack)
{
- if (!actorSpriteManager || actorSpriteManager->isInIgnoreAttackList(args))
+ if (!actorManager || actorManager->isInIgnoreAttackList(args))
return;
- actorSpriteManager->removeAttackMob(args);
- actorSpriteManager->addIgnoreAttackMob(args);
+ actorManager->removeAttackMob(args);
+ actorManager->addIgnoreAttackMob(args);
if (socialWindow)
socialWindow->updateAttackFilter();
@@ -1395,7 +1395,7 @@ impHandler0(dumpOGL)
void replaceVars(std::string &str)
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
if (str.find("<PLAYER>") != std::string::npos)
@@ -1403,7 +1403,7 @@ void replaceVars(std::string &str)
const Being *target = player_node->getTarget();
if (!target || target->getType() != ActorSprite::PLAYER)
{
- target = actorSpriteManager->findNearestLivingBeing(
+ target = actorManager->findNearestLivingBeing(
player_node, 20, ActorSprite::PLAYER);
}
if (target)
@@ -1416,7 +1416,7 @@ void replaceVars(std::string &str)
const Being *target = player_node->getTarget();
if (!target || target->getType() != ActorSprite::MONSTER)
{
- target = actorSpriteManager->findNearestLivingBeing(
+ target = actorManager->findNearestLivingBeing(
player_node, 20, ActorSprite::MONSTER);
}
if (target)
@@ -1428,7 +1428,7 @@ void replaceVars(std::string &str)
{
StringVect names;
std::string newStr;
- actorSpriteManager->getPlayerNames(names, false);
+ actorManager->getPlayerNames(names, false);
FOR_EACH (StringVectCIter, it, names)
{
if (*it != player_node->getName())
diff --git a/src/game.cpp b/src/game.cpp
index 262d1bb69..9b6b5a339 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -24,7 +24,7 @@
#include "main.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "auctionmanager.h"
#include "animatedsprite.h"
#include "client.h"
@@ -150,7 +150,7 @@ SocialWindow *socialWindow = nullptr;
QuestsWindow *questsWindow = nullptr;
WindowMenu *windowMenu = nullptr;
-ActorSpriteManager *actorSpriteManager = nullptr;
+ActorManager *actorManager = nullptr;
CommandHandler *commandHandler = nullptr;
#ifdef USE_MUMBLE
MumbleManager *mumbleManager = nullptr;
@@ -176,7 +176,7 @@ const unsigned adjustDelay = 10;
*/
static void initEngines()
{
- actorSpriteManager = new ActorSpriteManager;
+ actorManager = new ActorManager;
commandHandler = new CommandHandler;
effectManager = new EffectManager;
AuctionManager::init();
@@ -441,8 +441,8 @@ Game::Game():
initEngines();
// Initialize beings
- if (actorSpriteManager)
- actorSpriteManager->setPlayer(player_node);
+ if (actorManager)
+ actorManager->setPlayer(player_node);
Net::getGameHandler()->ping(tick_time);
@@ -467,7 +467,7 @@ Game::~Game()
AnimatedSprite::setEnableCache(false);
- del_0(actorSpriteManager)
+ del_0(actorManager)
if (client->getState() != STATE_CHANGE_MAP)
del_0(player_node)
del_0(commandHandler)
@@ -578,8 +578,8 @@ void Game::logic()
// Handle all necessary game logic
ActorSprite::actorLogic();
- if (actorSpriteManager)
- actorSpriteManager->logic();
+ if (actorManager)
+ actorManager->logic();
if (particleEngine)
particleEngine->update();
if (mCurrentMap)
@@ -955,8 +955,8 @@ void Game::changeMap(const std::string &mapPath)
viewport->clearPopup();
// Clean up floor items, beings and particles
- if (actorSpriteManager)
- actorSpriteManager->clear();
+ if (actorManager)
+ actorManager->clear();
// Close the popup menu on map change so that invalid options can't be
// executed.
@@ -996,11 +996,11 @@ void Game::changeMap(const std::string &mapPath)
if (socialWindow)
socialWindow->setMap(newMap);
- // Notify the minimap and actorSpriteManager about the map change
+ // Notify the minimap and actorManager about the map change
if (minimap)
minimap->setMap(newMap);
- if (actorSpriteManager)
- actorSpriteManager->setMap(newMap);
+ if (actorManager)
+ actorManager->setMap(newMap);
if (particleEngine)
particleEngine->setMap(newMap);
if (viewport)
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)
{
diff --git a/src/guild.cpp b/src/guild.cpp
index 6b0e5ec2d..f53739e2f 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -22,7 +22,7 @@
#include "guild.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "utils/stringutils.h"
@@ -233,7 +233,7 @@ void Guild::removeMember(const std::string &name)
void Guild::removeFromMembers()
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
MemberList::const_iterator itr = mMembers.begin();
@@ -242,7 +242,7 @@ void Guild::removeFromMembers()
{
if (*itr)
{
- Being *const b = actorSpriteManager->findBeing((*itr)->getID());
+ Being *const b = actorManager->findBeing((*itr)->getID());
if (b)
b->removeGuild(mId);
}
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 4917ab68e..1eae0b0eb 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -20,7 +20,7 @@
#include "guildmanager.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "guild.h"
@@ -208,10 +208,10 @@ void GuildManager::updateList()
}
guild->sort();
createTab(guild);
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->updatePlayerGuild();
- actorSpriteManager->updatePlayerColors();
+ actorManager->updatePlayerGuild();
+ actorManager->updatePlayerColors();
}
if (socialWindow)
socialWindow->updateGuildCounter();
@@ -405,9 +405,9 @@ bool GuildManager::process(std::string msg)
if (msg[0] == '#' && msg[1] == '#')
msg = msg.substr(3);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const b = actorSpriteManager->findBeingByName(
+ Being *const b = actorManager->findBeingByName(
msg, Being::PLAYER);
if (b)
@@ -523,10 +523,10 @@ bool GuildManager::afterRemove()
if (socialWindow)
socialWindow->removeTab(guild);
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->updatePlayerGuild();
- actorSpriteManager->updatePlayerColors();
+ actorManager->updatePlayerGuild();
+ actorManager->updatePlayerColors();
}
reload();
return true;
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 4e08f5466..4938ea525 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -24,7 +24,7 @@
#include "net/ea/eaprotocol.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "configuration.h"
#include "effectmanager.h"
@@ -64,7 +64,7 @@ BeingHandler::BeingHandler(const bool enableSync) :
Being *BeingHandler::createBeing(const int id, const int16_t job) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return nullptr;
ActorSprite::Type type = ActorSprite::UNKNOWN;
@@ -77,7 +77,7 @@ Being *BeingHandler::createBeing(const int id, const int16_t job) const
else if (job == 45)
type = ActorSprite::PORTAL;
- Being *const being = actorSpriteManager->createBeing(id, type, job);
+ Being *const being = actorManager->createBeing(id, type, job);
if (type == ActorSprite::PLAYER || type == ActorSprite::NPC)
{
@@ -115,7 +115,7 @@ void BeingHandler::setSprite(Being *const being, const unsigned int slot,
void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
const bool visible)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
int spawnId;
@@ -136,13 +136,13 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
if (id == player_node->getId() && job >= 1000)
disguiseId = job;
- Being *dstBeing = actorSpriteManager->findBeing(id);
+ Being *dstBeing = actorManager->findBeing(id);
if (dstBeing && dstBeing->getType() == Being::MONSTER
&& !dstBeing->isAlive())
{
- actorSpriteManager->destroy(dstBeing);
- actorSpriteManager->erase(dstBeing);
+ actorManager->destroy(dstBeing);
+ actorManager->erase(dstBeing);
dstBeing = nullptr;
}
@@ -153,7 +153,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
if (job == 0 && id >= 110000000)
return;
- if (actorSpriteManager->isBlocked(id) == true)
+ if (actorManager->isBlocked(id) == true)
return;
dstBeing = createBeing(id, job);
@@ -168,7 +168,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
{
if (dstBeing->getType() == Being::NPC)
{
- actorSpriteManager->undelete(dstBeing);
+ actorManager->undelete(dstBeing);
if (serverVersion < 1)
requestNameById(id);
}
@@ -341,7 +341,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
void BeingHandler::processBeingMove2(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
/*
@@ -349,7 +349,7 @@ void BeingHandler::processBeingMove2(Net::MessageIn &msg) const
* later versions of eAthena for both mobs and
* players
*/
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
/*
* This packet doesn't have enough info to actually
@@ -384,13 +384,13 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg)
void BeingHandler::processBeingRemove(Net::MessageIn &msg) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
// A being should be removed or has died
const int id = msg.readInt32();
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (!dstBeing)
return;
@@ -420,19 +420,19 @@ void BeingHandler::processBeingRemove(Net::MessageIn &msg) const
if (socialWindow)
socialWindow->updateActiveList();
}
- actorSpriteManager->destroy(dstBeing);
+ actorManager->destroy(dstBeing);
}
}
void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
// A being changed mortality status
const int id = msg.readInt32();
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (!dstBeing)
return;
@@ -447,12 +447,12 @@ void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const
void BeingHandler::processSkillDamage(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
const int id = msg.readInt16(); // Skill Id
- Being *const srcBeing = actorSpriteManager->findBeing(msg.readInt32());
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const srcBeing = actorManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
msg.readInt32(); // Server tick
msg.readInt32(); // src speed
msg.readInt32(); // dst speed
@@ -468,11 +468,11 @@ void BeingHandler::processSkillDamage(Net::MessageIn &msg) const
void BeingHandler::processBeingAction(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- Being *const srcBeing = actorSpriteManager->findBeing(msg.readInt32());
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const srcBeing = actorManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
msg.readInt32(); // server tick
const int srcSpeed = msg.readInt32(); // src speed
@@ -549,11 +549,11 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const
void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
{
- if (!effectManager || !actorSpriteManager)
+ if (!effectManager || !actorManager)
return;
const int id = static_cast<uint32_t>(msg.readInt32());
- Being *const being = actorSpriteManager->findBeing(id);
+ Being *const being = actorManager->findBeing(id);
if (!being)
return;
@@ -572,10 +572,10 @@ void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const
void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (!dstBeing)
return;
@@ -594,11 +594,11 @@ void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const
void BeingHandler::processNameResponse(Net::MessageIn &msg) const
{
- if (!player_node || !actorSpriteManager)
+ if (!player_node || !actorManager)
return;
const int beingId = msg.readInt32();
- Being *const dstBeing = actorSpriteManager->findBeing(beingId);
+ Being *const dstBeing = actorManager->findBeing(beingId);
if (dstBeing)
{
@@ -634,20 +634,20 @@ void BeingHandler::processNameResponse(Net::MessageIn &msg) const
void BeingHandler::processIpResponse(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (dstBeing)
dstBeing->setIp(ipToString(msg.readInt32()));
}
void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (dstBeing)
{
@@ -668,10 +668,10 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const
void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (!dstBeing)
return;
@@ -686,7 +686,7 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) const
void BeingHandler::processPlayerStop(Net::MessageIn &msg) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
/*
@@ -705,7 +705,7 @@ void BeingHandler::processPlayerStop(Net::MessageIn &msg) const
if (mSync || id != player_node->getId())
{
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing)
{
const uint16_t x = msg.readInt16();
@@ -732,12 +732,12 @@ void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg A_UNUSED)
void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
// Change in players' flags
const int id = msg.readInt32();
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (!dstBeing)
return;
@@ -755,7 +755,7 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const
void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
// Status change
@@ -763,7 +763,7 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const
const int id = msg.readInt32();
const int flag = msg.readInt8(); // 0: stop, 1: start
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing)
dstBeing->setStatusEffect(status, flag);
}
@@ -804,9 +804,9 @@ void BeingHandler::processPvpSet(Net::MessageIn &msg) const
const int id = msg.readInt32(); // id
const int rank = msg.readInt32(); // rank
msg.readInt32(); // num
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const dstBeing = actorSpriteManager->findBeing(id);
+ Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing)
dstBeing->setPvpRank(rank);
}
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 1497e41aa..90c6be5bc 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -22,7 +22,7 @@
#include "net/ea/chathandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "guildmanager.h"
#include "notifications.h"
@@ -243,12 +243,12 @@ void ChatHandler::processWhisper(Net::MessageIn &msg) const
void ChatHandler::processBeingChat(Net::MessageIn &msg,
const bool channels) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
BLOCK_START("ChatHandler::processBeingChat")
int chatMsgLength = msg.readInt16() - 8;
- Being *const being = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const being = actorManager->findBeing(msg.readInt32());
if (!being)
{
BLOCK_END("ChatHandler::processBeingChat")
@@ -342,9 +342,9 @@ void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
if (channel.empty())
{
const std::string senseStr("You sense the following: ");
- if (actorSpriteManager && !chatMsg.find(senseStr))
+ if (actorManager && !chatMsg.find(senseStr))
{
- actorSpriteManager->parseLevels(
+ actorManager->parseLevels(
chatMsg.substr(senseStr.size()));
}
}
@@ -370,9 +370,9 @@ void ChatHandler::processMVP(Net::MessageIn &msg) const
BLOCK_START("ChatHandler::processMVP")
// Display MVP player
const int id = msg.readInt32(); // id
- if (localChatTab && actorSpriteManager && config.getBoolValue("showMVP"))
+ if (localChatTab && actorManager && config.getBoolValue("showMVP"))
{
- const Being *const being = actorSpriteManager->findBeing(id);
+ const Being *const being = actorManager->findBeing(id);
if (!being)
NotifyManager::notify(NotifyManager::MVP_PLAYER, "");
else
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 7e46438d2..10663db57 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -21,7 +21,7 @@
#include "net/ea/guildhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "notifications.h"
#include "notifymanager.h"
@@ -266,9 +266,9 @@ void GuildHandler::processGuildMemberList(Net::MessageIn &msg) const
m->setExp(exp);
m->setPos(pos);
m->setRace(race);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const being = actorSpriteManager->findBeingByName(
+ Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
@@ -286,10 +286,10 @@ void GuildHandler::processGuildMemberList(Net::MessageIn &msg) const
}
}
taGuild->sort();
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->updatePlayerGuild();
- actorSpriteManager->updatePlayerColors();
+ actorManager->updatePlayerGuild();
+ actorManager->updatePlayerColors();
}
if (socialWindow)
socialWindow->updateGuildCounter(onlineNum, totalNum);
@@ -463,15 +463,15 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) const
if (socialWindow && taGuild)
socialWindow->removeTab(taGuild);
- if (actorSpriteManager)
- actorSpriteManager->updatePlayerColors();
+ if (actorManager)
+ actorManager->updatePlayerColors();
}
else
{
NotifyManager::notify(NotifyManager::GUILD_USER_LEFT, nick);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const b = actorSpriteManager->findBeingByName(
+ Being *const b = actorManager->findBeingByName(
nick, Being::PLAYER);
if (b)
@@ -507,15 +507,15 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) const
if (socialWindow && taGuild)
socialWindow->removeTab(taGuild);
- if (actorSpriteManager)
- actorSpriteManager->updatePlayerColors();
+ if (actorManager)
+ actorManager->updatePlayerColors();
}
else
{
NotifyManager::notify(NotifyManager::GUILD_USER_KICKED, nick);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const b = actorSpriteManager->findBeingByName(
+ Being *const b = actorManager->findBeingByName(
nick, Being::PLAYER);
if (b)
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index 9c9a74b2d..ccc8c92cd 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -22,7 +22,7 @@
#include "net/ea/itemhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "debug.h"
@@ -48,9 +48,9 @@ void ItemHandler::processItemVisible(Net::MessageIn &msg) const
const int subX = msg.readInt8();
const int subY = msg.readInt8();
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->createItem(id, itemId,
+ actorManager->createItem(id, itemId,
x, y, amount, identify, subX, subY);
}
}
@@ -66,21 +66,21 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg) const
const int subY = msg.readInt8();
const int amount = msg.readInt16();
- if (actorSpriteManager)
+ if (actorManager)
{
- actorSpriteManager->createItem(id, itemId,
+ actorManager->createItem(id, itemId,
x, y, amount, identify, subX, subY);
}
}
void ItemHandler::processItemRemove(Net::MessageIn &msg) const
{
- if (actorSpriteManager)
+ if (actorManager)
{
- if (FloorItem *const item = actorSpriteManager
+ if (FloorItem *const item = actorManager
->findItem(msg.readInt32()))
{
- actorSpriteManager->destroy(item);
+ actorManager->destroy(item);
}
}
}
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 6b2462450..73e2569ab 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -21,7 +21,7 @@
#include "net/ea/partyhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "configuration.h"
#include "notifications.h"
#include "notifymanager.h"
@@ -211,9 +211,9 @@ void PartyHandler::processPartyInvited(Net::MessageIn &msg) const
const std::string partyName = msg.readString(24);
std::string nick;
- if (actorSpriteManager)
+ if (actorManager)
{
- const Being *const being = actorSpriteManager->findBeing(id);
+ const Being *const being = actorManager->findBeing(id);
if (being)
{
if (being->getType() == Being::PLAYER)
@@ -352,9 +352,9 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) const
else
{
NotifyManager::notify(NotifyManager::PARTY_USER_LEFT, nick);
- if (actorSpriteManager)
+ if (actorManager)
{
- Being *const b = actorSpriteManager->findBeing(id);
+ Being *const b = actorManager->findBeing(id);
if (b && b->getType() == Being::PLAYER)
{
b->setParty(nullptr);
@@ -382,9 +382,9 @@ void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) const
// The server only sends this when the member is in range, so
// lets make sure they get the party hilight.
- if (actorSpriteManager && Ea::taParty)
+ if (actorManager && Ea::taParty)
{
- if (Being *const b = actorSpriteManager->findBeing(id))
+ if (Being *const b = actorManager->findBeing(id))
b->setParty(Ea::taParty);
}
}
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 739e2397d..ab0af709e 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -22,7 +22,7 @@
#include "net/eathena/beinghandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "guild.h"
#include "guildmanager.h"
@@ -244,7 +244,7 @@ void BeingHandler::undress(Being *const being) const
void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
const bool look2) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
/*
@@ -259,7 +259,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
* 16 bit value will be 0.
*/
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (!dstBeing)
return;
@@ -379,13 +379,13 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
void BeingHandler::processNameResponse2(Net::MessageIn &msg) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
const int len = msg.readInt16();
const int beingId = msg.readInt32();
const std::string str = msg.readString(len - 8);
- Being *const dstBeing = actorSpriteManager->findBeing(beingId);
+ Being *const dstBeing = actorManager->findBeing(beingId);
if (dstBeing)
{
if (beingId == player_node->getId())
@@ -421,7 +421,7 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg) const
void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
const int msgType) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
// An update about a player, potentially including movement.
@@ -436,11 +436,11 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
if (id < 110000000 && job >= 1000)
disguiseId = job;
- Being *dstBeing = actorSpriteManager->findBeing(id);
+ Being *dstBeing = actorManager->findBeing(id);
if (!dstBeing)
{
- if (actorSpriteManager->isBlocked(id) == true)
+ if (actorManager->isBlocked(id) == true)
return;
dstBeing = createBeing(id, job);
@@ -450,7 +450,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
}
else if (disguiseId)
{
- actorSpriteManager->undelete(dstBeing);
+ actorManager->undelete(dstBeing);
if (serverVersion < 1)
requestNameById(id);
}
@@ -625,7 +625,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
const bool visible)
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
if (visible)
@@ -645,13 +645,13 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
statusEffects |= (static_cast<uint32_t>(msg.readInt16())) << 16; // option
const int16_t job = msg.readInt16(); // class
- Being *dstBeing = actorSpriteManager->findBeing(id);
+ Being *dstBeing = actorManager->findBeing(id);
if (dstBeing && dstBeing->getType() == Being::MONSTER
&& !dstBeing->isAlive())
{
- actorSpriteManager->destroy(dstBeing);
- actorSpriteManager->erase(dstBeing);
+ actorManager->destroy(dstBeing);
+ actorManager->erase(dstBeing);
dstBeing = nullptr;
}
@@ -662,7 +662,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
if (job == 0 && id >= 110000000)
return;
- if (actorSpriteManager->isBlocked(id) == true)
+ if (actorManager->isBlocked(id) == true)
return;
dstBeing = createBeing(id, job);
@@ -677,7 +677,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg,
{
// undeleting marked for deletion being
if (dstBeing->getType() == Being::NPC)
- actorSpriteManager->undelete(dstBeing);
+ actorManager->undelete(dstBeing);
}
if (dstBeing->getType() == Being::PLAYER)
diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp
index 63b5aaea2..7a682105f 100644
--- a/src/net/eathena/guildhandler.cpp
+++ b/src/net/eathena/guildhandler.cpp
@@ -21,7 +21,7 @@
#include "net/eathena/guildhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -202,10 +202,10 @@ void GuildHandler::create(const std::string &name) const
void GuildHandler::invite(const int guildId A_UNUSED,
const std::string &name A_UNUSED) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 2508c8556..8af0e4aaa 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -21,7 +21,7 @@
#include "net/eathena/partyhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "notifications.h"
#include "notifymanager.h"
@@ -120,10 +120,10 @@ void PartyHandler::invite(Being *const being) const
void PartyHandler::invite(const std::string &name) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 0f668d162..8f91371b1 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -22,7 +22,7 @@
#include "net/tmwa/beinghandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "client.h"
#include "guild.h"
#include "guildmanager.h"
@@ -245,7 +245,7 @@ void BeingHandler::undress(Being *const being) const
void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
const bool look2) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
/*
@@ -260,7 +260,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
* 16 bit value will be 0.
*/
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (!dstBeing)
return;
@@ -387,14 +387,14 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg,
void BeingHandler::processNameResponse2(Net::MessageIn &msg) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
const int len = msg.readInt16();
const int beingId = msg.readInt32();
const std::string str = msg.readString(len - 8);
- Being *const dstBeing = actorSpriteManager->findBeing(beingId);
+ Being *const dstBeing = actorManager->findBeing(beingId);
if (dstBeing)
{
if (beingId == player_node->getId())
@@ -430,7 +430,7 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg) const
void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
const int msgType) const
{
- if (!actorSpriteManager || !player_node)
+ if (!actorManager || !player_node)
return;
// An update about a player, potentially including movement.
@@ -445,10 +445,10 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
if (id < 110000000 && job >= 1000)
disguiseId = job;
- Being *dstBeing = actorSpriteManager->findBeing(id);
+ Being *dstBeing = actorManager->findBeing(id);
if (!dstBeing)
{
- if (actorSpriteManager->isBlocked(id) == true)
+ if (actorManager->isBlocked(id) == true)
return;
dstBeing = createBeing(id, job);
@@ -458,7 +458,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg,
}
else if (disguiseId)
{
- actorSpriteManager->undelete(dstBeing);
+ actorManager->undelete(dstBeing);
if (serverVersion < 1)
requestNameById(id);
}
@@ -658,7 +658,7 @@ void BeingHandler::processBeingMove3(Net::MessageIn &msg) const
static const int diry[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int len = msg.readInt16() - 14;
- Being *const dstBeing = actorSpriteManager->findBeing(msg.readInt32());
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32());
if (!dstBeing)
return;
const int16_t speed = msg.readInt16();
diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp
index 862c437ed..60747685d 100644
--- a/src/net/tmwa/guildhandler.cpp
+++ b/src/net/tmwa/guildhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/guildhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "being/localplayer.h"
#include "being/playerinfo.h"
@@ -208,10 +208,10 @@ void GuildHandler::create(const std::string &name) const
void GuildHandler::invite(const int guildId A_UNUSED,
const std::string &name) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 92c79d447..d3a49d75a 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -21,7 +21,7 @@
#include "net/tmwa/partyhandler.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "notifications.h"
#include "notifymanager.h"
@@ -122,10 +122,10 @@ void PartyHandler::invite(Being *const being) const
void PartyHandler::invite(const std::string &name) const
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
- const Being *const being = actorSpriteManager->findBeingByName(
+ const Being *const being = actorManager->findBeingByName(
name, Being::PLAYER);
if (being)
{
diff --git a/src/party.cpp b/src/party.cpp
index 4cd4ff147..fb96a9423 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -21,7 +21,7 @@
#include "party.h"
-#include "actorspritemanager.h"
+#include "actormanager.h"
#include "utils/stringutils.h"
@@ -192,7 +192,7 @@ void Party::removeMember(const std::string &name)
void Party::removeFromMembers()
{
- if (!actorSpriteManager)
+ if (!actorManager)
return;
MemberList::const_iterator itr = mMembers.begin();
@@ -200,7 +200,7 @@ void Party::removeFromMembers()
while (itr != itr_end)
{
- Being *const b = actorSpriteManager->findBeing((*itr)->getID());
+ Being *const b = actorManager->findBeing((*itr)->getID());
if (b)
b->setParty(nullptr);
++itr;