ManaPlus
Data Structures | Macros | Variables
actormanager.cpp File Reference

(986a3bf)

#include "actormanager.h"
#include "game.h"
#include "guild.h"
#include "configuration.h"
#include "settings.h"
#include "being/localplayer.h"
#include "being/playerrelations.h"
#include "gui/sdlinput.h"
#include "gui/viewport.h"
#include "gui/widgets/tabs/chat/chattab.h"
#include "gui/windows/equipmentwindow.h"
#include "gui/windows/socialwindow.h"
#include "gui/windows/questswindow.h"
#include "fs/files.h"
#include "input/inputmanager.h"
#include "utils/checkutils.h"
#include "utils/foreach.h"
#include "utils/mathutils.h"
#include "utils/gettext.h"
#include "net/beinghandler.h"
#include "net/charserverhandler.h"
#include "net/packetlimiter.h"
#include "net/playerhandler.h"
#include "net/serverfeatures.h"
#include "resources/chatobject.h"
#include "resources/iteminfo.h"
#include "resources/map/map.h"
#include "resources/db/itemdb.h"
#include "being/playerinfo.h"
#include "gui/windows/chatwindow.h"
#include "net/net.h"
#include "debug.h"

Go to the source code of this file.

Data Structures

class  FindBeingFunctor
 
class  FindBeingEqualFunctor
 
class  SortBeingFunctor
 

Macros

#define for_actors
 
#define for_actorsm
 
#define addMobToList(name, mob)
 
#define rebuildMobsList(mob)
 
#define loadList(key, mob)
 

Variables

ActorManageractorManager = 0
 
class FindBeingFunctor beingActorFinder
 
class FindBeingEqualFunctor beingEqualActorFinder
 
class SortBeingFunctor beingActorSorter
 

Macro Definition Documentation

◆ addMobToList

#define addMobToList (   name,
  mob 
)
Value:
{\
const int sz = get##mob##sSize();\
if (sz > 0)\
{\
const int idx = get##mob##Index("");\
if (idx + 1 == sz)\
{\
std::list<std::string>::iterator itr = m##mob##s.end();\
-- itr;\
m##mob##s.insert(itr, name);\
}\
else\
{\
m##mob##s.push_back(name);\
}\
}\
else\
{\
m##mob##s.push_back(name);\
}\
m##mob##sSet.insert(name);\
rebuild##mob##s();\
}

Definition at line 1883 of file actormanager.cpp.

◆ for_actors

#define for_actors
Value:
for (ActorSpritesConstIterator it = mActors.begin(), \
it_fend = mActors.end(); it != it_fend; ++it)
ActorSprites::const_iterator ActorSpritesConstIterator
Definition: actormanager.h:61

Definition at line 75 of file actormanager.cpp.

◆ for_actorsm

#define for_actorsm
Value:
for (ActorSpritesIterator it = mActors.begin(), \
it_fend = mActors.end(); it != it_fend; ++it)
ActorSprites::iterator ActorSpritesIterator
Definition: actormanager.h:60

Definition at line 78 of file actormanager.cpp.

◆ loadList

#define loadList (   key,
  mob 
)
Value:
{\
list = unpackList(serverConfig.getValue(key, ""));\
i = list.begin();\
i_end = list.end();\
while (i != i_end)\
{\
if ((*i).empty())\
empty = true;\
m##mob##s.push_back(*i);\
m##mob##sSet.insert(*i);\
++ i;\
}\
}
std::string getValue(const std::string &key, const std::string &deflt) const
Configuration serverConfig
std::list< std::string > unpackList(const std::string &str)

Definition at line 1998 of file actormanager.cpp.

◆ rebuildMobsList

#define rebuildMobsList (   mob)
Value:
{\
m##mob##sMap.clear();\
std::list<std::string>::const_iterator i = m##mob##s.begin();\
int cnt = 0;\
while (i != m##mob##s.end())\
{\
m##mob##sMap[*i] = cnt;\
++ i;\
++ cnt;\
}\
}

Definition at line 1908 of file actormanager.cpp.

Variable Documentation

◆ actorManager

ActorManager* actorManager = 0

Definition at line 81 of file actormanager.cpp.

Referenced by BuyDialog::action(), BuySellDialog::action(), PlayerListener::action(), PopupMenu::addBeingMenu(), PopupMenu::addPickupFilter(), GuildManager::afterRemove(), Setup_Relations::apply(), ChatWindow::autoComplete(), EAthena::PartyHandler::changeLeader(), Game::changeMap(), ActorManager::cloneBeing(), Ea::BeingRecv::createBeing(), EAthena::BeingRecv::createBeing2(), ChatWindow::doPresent(), Minimap::draw2(), Actions::findBeing(), LocalPlayer::followMoveTo(), Game::Game(), ItemPopup::getCardsString(), Actions::getPet(), SocialFriendsTab::getPlayersAvatars(), SocialPlayersTab::getPlayersAvatars(), PopupMenu::handleLink(), WhoIsOnline::handleLink(), PlayerRelationsManager::hasPermission(), initEngines(), EAthena::GuildHandler::invite(), EAthena::PartyHandler::invite(), TmwAthena::PartyHandler::invite(), WhoIsOnline::loadList(), WhoIsOnline::loadWebList(), Being::logic(), Game::logic(), AvatarListBox::mousePressed(), Viewport::moveCameraToActor(), LocalPlayer::pickedUp(), LocalPlayer::pickUp(), LocalPlayer::pickUpItems(), NpcDialog::postInit(), GuildManager::process(), EAthena::NpcRecv::processArea(), EAthena::BattleGroundRecv::processBattleEmblem2(), Ea::BeingRecv::processBeingAction(), EAthena::BeingRecv::processBeingAction2(), EAthena::BeingRecv::processBeingAttrs(), EAthena::BeingRecv::processBeingChangeDirection(), TmwAthena::BeingRecv::processBeingChangeDirection(), TmwAthena::BeingRecv::processBeingChangeLook(), EAthena::BeingRecv::processBeingChangeLook2(), TmwAthena::BeingRecv::processBeingChangeLook2(), EAthena::BeingRecv::processBeingChangeLookCards(), EAthena::ChatRecv::processBeingChat(), TmwAthena::ChatRecv::processBeingChat(), Ea::BeingRecv::processBeingEmotion(), EAthena::BeingRecv::processBeingHp(), EAthena::BeingRecv::processBeingMove(), TmwAthena::BeingRecv::processBeingMove(), EAthena::BeingRecv::processBeingMove2(), TmwAthena::BeingRecv::processBeingMove2(), Ea::BeingRecv::processBeingMove3(), Ea::BeingRecv::processBeingRemove(), EAthena::BeingRecv::processBeingRemoveSkill(), EAthena::BeingRecv::processBeingResurrect(), TmwAthena::BeingRecv::processBeingResurrect(), EAthena::BeingRecv::processBeingSelfEffect(), TmwAthena::BeingRecv::processBeingSelfEffect(), EAthena::BeingRecv::processBeingSlide(), EAthena::BeingRecv::processBeingSpawn(), EAthena::BeingRecv::processBeingSpecialEffect(), EAthena::BeingRecv::processBeingStatUpdate1(), EAthena::BeingRecv::processBeingStatusChange(), TmwAthena::BeingRecv::processBeingStatusChange(), EAthena::BeingRecv::processBeingVisible(), TmwAthena::BeingRecv::processBeingVisible(), EAthena::BuyingStoreRecv::processBuyingStoreHideBoard(), EAthena::BuyingStoreRecv::processBuyingStoreItemsList(), EAthena::BuyingStoreRecv::processBuyingStoreShowBoard(), TmwAthena::ChatRecv::processChatContinue(), EAthena::ChatRecv::processChatDisplay(), EAthena::ChatRecv::processChatRoomDestroy(), EAthena::ChatRecv::processChatRoomLeave(), EAthena::ChatRecv::processChatRoomSettings(), EAthena::GuildRecv::processGuildExpulsionContinue(), EAthena::GuildRecv::processGuildLeave(), EAthena::GuildRecv::processGuildLeave2(), EAthena::GuildRecv::processGuildMemberList(), EAthena::GuildRecv::processGuildSetPosition(), EAthena::VendingRecv::processHideBoard(), EAthena::HomunculusRecv::processHomunculusData(), EAthena::HomunculusRecv::processHomunculusInfo1(), EAthena::HomunculusRecv::processHomunculusInfo2(), EAthena::HomunculusRecv::processHomunculusInfo3(), TmwAthena::BeingRecv::processIpResponse(), EAthena::ItemRecv::processItemDropped(), TmwAthena::ItemRecv::processItemDropped(), EAthena::ItemRecv::processItemDropped2(), Ea::ItemRecv::processItemRemove(), EAthena::VendingRecv::processItemsList(), EAthena::ItemRecv::processItemVisible(), TmwAthena::ItemRecv::processItemVisible(), EAthena::ItemRecv::processItemVisible2(), EAthena::PlayerRecv::processKilledBy(), EAthena::MercenaryRecv::processMercenaryInfo(), EAthena::BeingRecv::processMobInfo(), EAthena::BeingRecv::processMonsterHp(), Ea::ChatRecv::processMVPEffect(), Ea::BeingRecv::processNameResponse(), EAthena::BeingRecv::processNameResponse2(), EAthena::BeingRecv::processNameResponseTitle(), TmwAthena::PlayerRecv::processOnlineList(), TmwAthena::PartyRecv::processPartyInvited(), Ea::PartyRecv::processPartyLeave(), TmwAthena::PartyRecv::processPartyUpdateHp(), EAthena::PetRecv::processPetData(), EAthena::BeingRecv::processPlayerGuilPartyInfo(), TmwAthena::BeingRecv::processPlayerGuilPartyInfo(), EAthena::BeingRecv::processPlayerGuilPartyInfo2(), EAthena::InventoryRecv::processPlayerInventoryUse(), TmwAthena::BeingRecv::processPlayerMove(), EAthena::BeingRecv::processPlayerStatusChange(), TmwAthena::BeingRecv::processPlayerStatusChange(), EAthena::BeingRecv::processPlayerStatusChange2(), Ea::BeingRecv::processPlayerStop(), TmwAthena::BeingRecv::processPlayerUpdate1(), TmwAthena::BeingRecv::processPlayerUpdate2(), EAthena::BeingRecv::processPvpSet(), TmwAthena::BeingRecv::processPvpSet(), ShopWindow::processRequest(), EAthena::VendingRecv::processShowBoard(), EAthena::BeingRecv::processSkillCastingContinue(), EAthena::BeingRecv::processSkillDamage(), TmwAthena::BeingRecv::processSkillDamage(), Ea::BeingRecv::processSkillNoDamage(), EAthena::BeingRecv::processSolveCharName(), EAthena::BeingRecv::processSpiritBalls(), Guild::removeFromMembers(), Party::removeFromMembers(), replaceVars(), SocialPlayersTab::resetDamage(), BuyingStoreSellDialog::sellAction(), WhoIsOnline::setNeutralColor(), LocalPlayer::setNewTarget(), OnlinePlayer::setText(), PopupMenu::showAttackMonsterPopup(), PopupMenu::showChatPopup(), PopupMenu::showPickupItemPopup(), PopupMenu::showPlayerGMCommands(), PopupMenu::showPopup(), PlayerRelationsManager::signalUpdate(), WhoIsOnline::slowLogic(), ShopWindow::startTrade(), SocialPlayersTab::updateAvatar(), LocalPlayer::updateCoords(), QuestsWindow::updateEffects(), SocialNavigationTab::updateList(), GuildManager::updateList(), ChatWindow::updateOnline(), Game::~Game(), and Particle::~Particle().

◆ beingActorFinder

class FindBeingFunctor beingActorFinder

Referenced by ActorManager::findBeing().

◆ beingActorSorter

class SortBeingFunctor beingActorSorter

◆ beingEqualActorFinder

class FindBeingEqualFunctor beingEqualActorFinder