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

(642df39)

#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 1882 of file actormanager.cpp.

◆ for_actors

#define for_actors
Value:
for (ActorSpritesConstIterator it = mActors.begin(), \
it_fend = mActors.end(); it != it_fend; ++it)

Definition at line 74 of file actormanager.cpp.

◆ for_actorsm

#define for_actorsm
Value:
for (ActorSpritesIterator it = mActors.begin(), \
it_fend = mActors.end(); it != it_fend; ++it)

Definition at line 77 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;\
}\
}

Definition at line 1997 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 1907 of file actormanager.cpp.

Variable Documentation

◆ actorManager

ActorManager* actorManager = 0

Definition at line 80 of file actormanager.cpp.

Referenced by PlayerListener::action(), BuySellDialog::action(), BuyDialog::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(), WhoIsOnline::handleLink(), PopupMenu::handleLink(), PlayerRelationsManager::hasPermission(), initEngines(), EAthena::PartyHandler::invite(), TmwAthena::PartyHandler::invite(), EAthena::GuildHandler::invite(), WhoIsOnline::loadList(), WhoIsOnline::loadWebList(), Game::logic(), Being::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(), TmwAthena::BeingRecv::processBeingChangeDirection(), EAthena::BeingRecv::processBeingChangeDirection(), TmwAthena::BeingRecv::processBeingChangeLook(), TmwAthena::BeingRecv::processBeingChangeLook2(), EAthena::BeingRecv::processBeingChangeLook2(), EAthena::BeingRecv::processBeingChangeLookCards(), TmwAthena::ChatRecv::processBeingChat(), EAthena::ChatRecv::processBeingChat(), Ea::BeingRecv::processBeingEmotion(), EAthena::BeingRecv::processBeingHp(), TmwAthena::BeingRecv::processBeingMove(), EAthena::BeingRecv::processBeingMove(), TmwAthena::BeingRecv::processBeingMove2(), EAthena::BeingRecv::processBeingMove2(), Ea::BeingRecv::processBeingMove3(), Ea::BeingRecv::processBeingRemove(), EAthena::BeingRecv::processBeingRemoveSkill(), TmwAthena::BeingRecv::processBeingResurrect(), EAthena::BeingRecv::processBeingResurrect(), TmwAthena::BeingRecv::processBeingSelfEffect(), EAthena::BeingRecv::processBeingSelfEffect(), EAthena::BeingRecv::processBeingSlide(), EAthena::BeingRecv::processBeingSpawn(), EAthena::BeingRecv::processBeingSpecialEffect(), EAthena::BeingRecv::processBeingStatUpdate1(), TmwAthena::BeingRecv::processBeingStatusChange(), EAthena::BeingRecv::processBeingStatusChange(), TmwAthena::BeingRecv::processBeingVisible(), EAthena::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(), TmwAthena::ItemRecv::processItemVisible(), EAthena::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(), TmwAthena::BeingRecv::processPlayerGuilPartyInfo(), EAthena::BeingRecv::processPlayerGuilPartyInfo(), EAthena::BeingRecv::processPlayerGuilPartyInfo2(), EAthena::InventoryRecv::processPlayerInventoryUse(), TmwAthena::BeingRecv::processPlayerMove(), TmwAthena::BeingRecv::processPlayerStatusChange(), EAthena::BeingRecv::processPlayerStatusChange(), EAthena::BeingRecv::processPlayerStatusChange2(), Ea::BeingRecv::processPlayerStop(), TmwAthena::BeingRecv::processPlayerUpdate1(), TmwAthena::BeingRecv::processPlayerUpdate2(), TmwAthena::BeingRecv::processPvpSet(), EAthena::BeingRecv::processPvpSet(), ShopWindow::processRequest(), EAthena::VendingRecv::processShowBoard(), EAthena::BeingRecv::processSkillCastingContinue(), TmwAthena::BeingRecv::processSkillDamage(), EAthena::BeingRecv::processSkillDamage(), Ea::BeingRecv::processSkillNoDamage(), EAthena::BeingRecv::processSolveCharName(), EAthena::BeingRecv::processSpiritBalls(), Party::removeFromMembers(), Guild::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(), GuildManager::updateList(), SocialNavigationTab::updateList(), ChatWindow::updateOnline(), Game::~Game(), and Particle::~Particle().

◆ beingActorFinder

class FindBeingFunctor beingActorFinder

Referenced by ActorManager::findBeing().

◆ beingActorSorter

class SortBeingFunctor beingActorSorter

◆ beingEqualActorFinder

class FindBeingEqualFunctor beingEqualActorFinder
ConfigurationObject::getValue
std::string getValue(const std::string &key, const std::string &deflt) const
Definition: configuration.cpp:268
ActorSpritesConstIterator
ActorSprites::const_iterator ActorSpritesConstIterator
Definition: actormanager.h:60
unpackList
std::list< std::string > unpackList(const std::string &str)
Definition: stringutils.cpp:604
serverConfig
Configuration serverConfig
Definition: configuration.cpp:52
ActorSpritesIterator
ActorSprites::iterator ActorSpritesIterator
Definition: actormanager.h:59