EvEmu
0.8.4
11 September 2021
|
#include "EntityList.h"
Public Types | |
typedef std::set< uint32 > | character_set |
Public Member Functions | |
EntityList () | |
~EntityList () | |
void | Initialize () |
void | Close () |
void | Process () |
void | Shutdown () |
void | Add (Client *pClient) |
void | Remove (Client *pClient) |
void | AddPlayer (Client *pClient) |
void | RemovePlayer (Client *pClient) |
void | AddNPC () |
void | RemoveNPC () |
void | SetService (PyServiceMgr *svc) |
void | GetStationGuestList (uint32 stationID, std::vector< Client * > &result) const |
bool | HasClients () |
Agent * | GetAgent (uint32 agentID) |
Client * | FindClientByName (const char *name) const |
Client * | FindClientByCharID (uint32 charID) const |
SystemManager * | FindOrBootSystem (uint32 systemID) |
bool | IsOnline (uint32 charID) |
PyRep * | PyIsOnline (uint32 charID) |
uint32 | GetNPCCount () |
uint32 | GetClientCount () const |
uint32 | GetPlayerCount () const |
uint32 | GetSystemCount () const |
uint32 | GetStationCount () const |
uint16 | GetClientSeed () |
uint32 | GetStamp () |
uint32 | GetMinutes () |
void | GetClients (std::vector< Client * > &result) const |
void | GetCorpClients (std::vector< Client * > &result, uint32 corpID) const |
void | AddStation (uint32 stationID, StationItemRef itemRef) |
void | RemoveStation (uint32 stationID) |
StationItemRef | GetStationByID (uint32 stationID) |
void | RegisterSID (int64 &sessionID) |
void | RemoveSID (int64 sessionID) |
std::string | GetAnomalyID () |
bool | GetTracking () |
void | SetTracking (bool set=false) |
void | ResetStartTime () |
int64 | GetStartTime () |
void | GetUpTime (std::string &time) |
uint32 | GetConnections () |
void | CorpNotify (uint32 corpID, uint8 bCastType, const char *notifyType, const char *idType, PyTuple *payload) const |
void | Broadcast (const char *notifyType, const char *idType, PyTuple **payload) const |
void | Broadcast (const PyAddress &dest, EVENotificationStream ¬i) const |
void | Multicast (const char *notifyType, const char *idType, PyTuple **in_payload, NotificationDestination target, uint32 target_id, bool seq=true) |
void | Multicast (const char *notifyType, const char *idType, PyTuple **payload, const MulticastTarget &mcset, bool seq=true) |
void | Multicast (const character_set &cset, const PyAddress &dest, EVENotificationStream ¬i) const |
void | Multicast (const character_set &cset, const char *notifyType, const char *idType, PyTuple **payload, bool seq=true) const |
void | Unicast (uint32 charID, const char *notifyType, const char *idType, PyTuple **payload, bool seq=true) |
void | AddTargMgr (SystemEntity *pSE, TargetManager *pTM) |
void | DeleteTargMgr (SystemEntity *pSE) |
void | AddProbe (uint32 probeID, ProbeSE *pSE) |
void | RemoveProbe (uint32 probeID) |
![]() | |
Singleton () | |
Primary constructor. More... | |
Protected Attributes | |
PyServiceMgr * | m_services |
Mutex | mMutex |
Private Types | |
typedef std::map< Client *, int64 > | corpRole |
Private Attributes | |
Timer | m_stampTimer |
Timer | m_minuteTimer |
Timer | m_targTimer |
std::vector< Client * > | m_clients |
std::map< uint32, Client * > | m_players |
std::set< int64 > | m_sessions |
std::map< uint32, SystemManager * > | m_systems |
std::map< uint32, StationItemRef > | m_stations |
std::vector< std::string > | m_anomIDs |
std::map< uint32, Agent * > | m_agents |
std::unordered_map < SystemEntity *, TargetManager * > | m_targMgrs |
std::map< uint32, ProbeSE * > | m_probes |
std::map< uint32, corpRole > | m_corpMembers |
bool | m_shipTracking |
uint32 | m_npcs |
uint32 | m_stamp |
uint32 | m_minutes |
uint32 | m_connections |
uint16 | m_clientSeedID |
int64 | m_startTime |
Additional Inherited Members | |
![]() | |
static EntityList & | get () |
![]() | |
static std::shared_ptr < EntityList > | mInstance |
Definition at line 63 of file EntityList.h.
typedef std::set<uint32> EntityList::character_set |
Definition at line 70 of file EntityList.h.
|
private |
Definition at line 193 of file EntityList.h.
EntityList::EntityList | ( | ) |
Definition at line 51 of file EntityList.cpp.
References m_agents, m_clients, m_corpMembers, m_players, m_probes, m_shipTracking, m_stations, m_systems, m_targMgrs, and sConfig.
EntityList::~EntityList | ( | ) |
void EntityList::Add | ( | Client * | pClient | ) |
|
inline |
void EntityList::AddPlayer | ( | Client * | pClient | ) |
Definition at line 156 of file EntityList.cpp.
References Client::GetCharacterID(), Client::GetCharID(), Client::GetCorporationID(), Client::GetCorpRole(), IsPlayerCorp, Client::IsValidSession(), m_corpMembers, and m_players.
void EntityList::AddStation | ( | uint32 | stationID, |
StationItemRef | itemRef | ||
) |
|
inline |
Definition at line 154 of file EntityList.h.
References m_targMgrs.
void EntityList::Broadcast | ( | const char * | notifyType, |
const char * | idType, | ||
PyTuple ** | payload | ||
) | const |
Definition at line 610 of file EntityList.cpp.
References EVENotificationStream::args, PyAddress::bcast_idtype, PyAddress::Broadcast, EVENotificationStream::remoteObject, PyAddress::service, and PyAddress::type.
void EntityList::Broadcast | ( | const PyAddress & | dest, |
EVENotificationStream & | noti | ||
) | const |
void EntityList::Close | ( | ) |
Definition at line 108 of file EntityList.cpp.
References m_agents, m_clients, m_stations, m_systems, SafeDelete(), and sLog.
void EntityList::CorpNotify | ( | uint32 | corpID, |
uint8 | bCastType, | ||
const char * | notifyType, | ||
const char * | idType, | ||
PyTuple * | payload | ||
) | const |
Definition at line 432 of file EntityList.cpp.
References Corp::Role::Accountant, Notify::Types::AllAnchoring, Notify::Types::AllMaintenanceBill, Notify::Types::AllStrucInvulnerable, Notify::Types::AllStructVulnerable, Notify::Types::AllWarDeclared, Notify::Types::AllWarInvalidated, Notify::Types::AllWarRetracted, Notify::Types::AllWarSurrender, Corp::Role::Auditor, Notify::Types::BillOutOfMoney, Notify::Types::BillPaidChar, Notify::Types::BillPaidCorpAll, Notify::Types::CharBill, Notify::Types::CharLeftCorp, Notify::Types::CharMedal, Notify::Types::ContactAdd, Notify::Types::ContactEdit, Notify::Types::ContainerPassword, Notify::Types::CorpAllBill, Notify::Types::CorpAppAccept, Notify::Types::CorpAppNew, Notify::Types::CorpAppReject, Notify::Types::CorpDividend, Notify::Types::CorpKicked, Notify::Types::CorpLiquidation, Notify::Types::CorpNewCEO, Notify::Types::CorpNews, Notify::Types::CorpOfficeExpiration, Notify::Types::CorpStructLost, Notify::Types::CorpTaxChange, Notify::Types::CorpVote, Notify::Types::CorpVoteCEORevoked, Notify::Types::CorpWarDeclared, Notify::Types::CorpWarFightingLegal, Notify::Types::CorpWarInvalidated, Notify::Types::CorpWarRetracted, Notify::Types::CorpWarSurrender, Notify::Types::FactoryJob, Corp::Role::FactoryManager, Notify::Types::FacWarCorpJoinRequest, Notify::Types::FacWarCorpJoinWithdraw, Notify::Types::FacWarCorpLeaveRequest, Notify::Types::FacWarCorpLeaveWithdraw, Notify::Types::FWAllianceKick, Notify::Types::FWAllianceWarning, Notify::Types::FWCharKick, Notify::Types::FWCharRankGain, Notify::Types::FWCharRankLoss, Notify::Types::FWCharWarning, Notify::Types::FWCorpJoin, Notify::Types::FWCorpKick, Notify::Types::FWCorpLeave, Notify::Types::FWCorpWarning, CorporationDB::HasShares(), IsNPCCorp, Notify::Types::ItemUpdateStation, Notify::Types::ItemUpdateSystem, Corp::Role::JuniorAccountant, m_corpMembers, Notify::Types::MarketOrder, Notify::Types::OrbitalAttacked, Notify::Types::OrbitalReinforced, Notify::Types::OwnershipTransferred, Corp::Role::PersonnelManager, PyDecRef, PyIncRef, PySafeDecRef, Notify::Types::Reimbursement, Notify::Types::SovAllBillLate, Notify::Types::SovAllClaimAquired, Notify::Types::SovAllClaimFail, Notify::Types::SovAllClaimLost, Notify::Types::SovCorpBillLate, Notify::Types::SovCorpClaimAquired, Notify::Types::SovCorpClaimFail, Notify::Types::SovCorpClaimLost, Notify::Types::SovDisruptor, Notify::Types::SovereigntyIHDamage, Notify::Types::SovereigntySBUDamage, Notify::Types::SovereigntyTCUDamage, Notify::Types::StationAggression1, Notify::Types::StationAggression2, Notify::Types::StationConquer, Notify::Types::StationStateChange, Notify::Types::TowerAlert, Notify::Types::TowerResourceAlert, Corp::Role::Trader, Notify::Types::TransactionReversal, and Notify::Types::WalletChange.
|
inline |
Definition at line 157 of file EntityList.h.
References m_targMgrs.
Definition at line 363 of file EntityList.cpp.
References m_players.
Referenced by Unicast().
Client * EntityList::FindClientByName | ( | const char * | name | ) | const |
Definition at line 766 of file EntityList.cpp.
References RefPtr< X >::get(), m_players, and InventoryItem::name().
SystemManager * EntityList::FindOrBootSystem | ( | uint32 | systemID | ) |
Definition at line 279 of file EntityList.cpp.
References _log, m_services, m_systems, SafeDelete(), and sDataMgr.
Referenced by Multicast().
std::string EntityList::GetAnomalyID | ( | ) |
Definition at line 378 of file EntityList.cpp.
References alphaList, MakeRandomInt(), and str2().
|
inline |
void EntityList::GetClients | ( | std::vector< Client * > & | result | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
StationItemRef EntityList::GetStationByID | ( | uint32 | stationID | ) |
|
inline |
Definition at line 343 of file EntityList.cpp.
References m_stations.
Referenced by Multicast().
|
inline |
|
inline |
void EntityList::GetUpTime | ( | std::string & | time | ) |
|
inline |
void EntityList::Initialize | ( | ) |
Definition at line 79 of file EntityList.cpp.
References GetFileTimeNow(), is_log_enabled, m_clientSeedID, m_minuteTimer, m_stampTimer, m_startTime, m_targTimer, sConfig, ServiceDB::SetClientSeed(), sLog, and Timer::Start().
bool EntityList::IsOnline | ( | uint32 | charID | ) |
void EntityList::Multicast | ( | const char * | notifyType, |
const char * | idType, | ||
PyTuple ** | in_payload, | ||
NotificationDestination | target, | ||
uint32 | target_id, | ||
bool | seq = true |
||
) |
Definition at line 640 of file EntityList.cpp.
References FindOrBootSystem(), SystemManager::GetClientList(), GetStationGuestList(), m_corpMembers, NOTIF_DEST__CORPORATION, NOTIF_DEST__LOCATION, PyDecRef, PyIncRef, sDataMgr, sLog, and EvE::traceStack().
void EntityList::Multicast | ( | const char * | notifyType, |
const char * | idType, | ||
PyTuple ** | payload, | ||
const MulticastTarget & | mcset, | ||
bool | seq = true |
||
) |
Definition at line 682 of file EntityList.cpp.
References MulticastTarget::characters, MulticastTarget::corporations, FindOrBootSystem(), SystemManager::GetClientList(), GetStationGuestList(), MulticastTarget::locations, m_corpMembers, m_players, PyDecRef, PyIncRef, sDataMgr, sLog, and EvE::traceStack().
void EntityList::Multicast | ( | const character_set & | cset, |
const PyAddress & | dest, | ||
EVENotificationStream & | noti | ||
) | const |
void EntityList::Multicast | ( | const character_set & | cset, |
const char * | notifyType, | ||
const char * | idType, | ||
PyTuple ** | payload, | ||
bool | seq = true |
||
) | const |
void EntityList::Process | ( | ) |
Definition at line 188 of file EntityList.cpp.
References Timer::Check(), Profile::entityS, GetTimeUSeconds(), m_clients, m_minutes, m_minuteTimer, m_players, m_probes, m_stamp, m_stampTimer, m_systems, m_targMgrs, m_targTimer, MapDB::ManipulateTimeData(), SafeDelete(), sBubbleMgr, sCivMgr, sConfig, sConsole, sLog, sMissionDataMgr, sMktMgr, sProfiler, and sWHMgr.
void EntityList::RegisterSID | ( | int64 & | sessionID | ) |
Definition at line 777 of file EntityList.cpp.
References m_sessions.
void EntityList::Remove | ( | Client * | pClient | ) |
|
inline |
void EntityList::RemovePlayer | ( | Client * | pClient | ) |
Definition at line 173 of file EntityList.cpp.
References Client::GetCharacterID(), Client::GetCharID(), Client::GetCorporationID(), Client::IsValidSession(), m_corpMembers, and m_players.
|
inline |
void EntityList::RemoveSID | ( | int64 | sessionID | ) |
void EntityList::RemoveStation | ( | uint32 | stationID | ) |
|
inline |
Definition at line 132 of file EntityList.h.
References GetFileTimeNow(), and m_startTime.
|
inline |
Definition at line 84 of file EntityList.h.
References m_services.
Referenced by PyServiceMgr::PyServiceMgr().
|
inline |
void EntityList::Shutdown | ( | ) |
Definition at line 96 of file EntityList.cpp.
References m_clients, and SafeDelete().
void EntityList::Unicast | ( | uint32 | charID, |
const char * | notifyType, | ||
const char * | idType, | ||
PyTuple ** | payload, | ||
bool | seq = true |
||
) |
Definition at line 757 of file EntityList.cpp.
References FindClientByCharID(), and Client::SendNotification().
Definition at line 185 of file EntityList.h.
Referenced by Close(), EntityList(), and GetAgent().
|
private |
Definition at line 184 of file EntityList.h.
|
private |
Definition at line 177 of file EntityList.h.
Referenced by Add(), Close(), EntityList(), GetClientCount(), Process(), Remove(), and Shutdown().
|
private |
Definition at line 202 of file EntityList.h.
Referenced by GetClientSeed(), and Initialize().
|
private |
Definition at line 201 of file EntityList.h.
Referenced by Add(), and GetConnections().
Definition at line 194 of file EntityList.h.
Referenced by AddPlayer(), CorpNotify(), EntityList(), GetCorpClients(), Multicast(), and RemovePlayer().
|
private |
Definition at line 200 of file EntityList.h.
Referenced by GetMinutes(), and Process().
|
private |
Definition at line 172 of file EntityList.h.
Referenced by Initialize(), and Process().
|
private |
Definition at line 198 of file EntityList.h.
Referenced by AddNPC(), GetNPCCount(), and RemoveNPC().
Definition at line 180 of file EntityList.h.
Referenced by AddPlayer(), Broadcast(), EntityList(), FindClientByCharID(), FindClientByName(), GetClients(), GetPlayerCount(), HasClients(), IsOnline(), Multicast(), Process(), PyIsOnline(), and RemovePlayer().
Definition at line 190 of file EntityList.h.
Referenced by AddProbe(), EntityList(), Process(), and RemoveProbe().
|
protected |
Definition at line 166 of file EntityList.h.
Referenced by FindOrBootSystem(), and SetService().
|
private |
Definition at line 181 of file EntityList.h.
Referenced by RegisterSID(), and RemoveSID().
|
private |
Definition at line 196 of file EntityList.h.
Referenced by EntityList(), GetTracking(), and SetTracking().
|
private |
Definition at line 199 of file EntityList.h.
Referenced by GetStamp(), GetUpTime(), and Process().
|
private |
Definition at line 171 of file EntityList.h.
Referenced by Initialize(), and Process().
|
private |
Definition at line 204 of file EntityList.h.
Referenced by GetStartTime(), Initialize(), and ResetStartTime().
|
private |
Definition at line 183 of file EntityList.h.
Referenced by AddStation(), Close(), EntityList(), GetStationByID(), GetStationCount(), GetStationGuestList(), and RemoveStation().
|
private |
Definition at line 182 of file EntityList.h.
Referenced by Close(), EntityList(), FindOrBootSystem(), GetSystemCount(), and Process().
|
private |
Definition at line 188 of file EntityList.h.
Referenced by AddTargMgr(), DeleteTargMgr(), EntityList(), and Process().
|
private |
Definition at line 173 of file EntityList.h.
Referenced by Initialize(), and Process().
|
protected |
Definition at line 168 of file EntityList.h.