From 6c3974a46c659e558b2b5f249b7b000a5b39fe25 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Oct 2013 16:27:33 +0300 Subject: Rename actorspritemanager into actormanager. --- src/net/ea/beinghandler.cpp | 84 ++++++++++++++++++++++----------------------- src/net/ea/chathandler.cpp | 14 ++++---- src/net/ea/guildhandler.cpp | 28 +++++++-------- src/net/ea/itemhandler.cpp | 16 ++++----- src/net/ea/partyhandler.cpp | 14 ++++---- 5 files changed, 78 insertions(+), 78 deletions(-) (limited to 'src/net/ea') 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(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); } } -- cgit v1.2.3-60-g2f50