36 #include "packets/Destiny.h"
67 m_minutetimer(0, true),
69 m_beltMgr(new
BeltMgr(this, svc)),
73 m_entityChanged(false),
80 m_activeGateSpawns(0),
81 m_activeRoidSpawns(0),
133 _log(SERVICE__ERROR,
"Unable to load System Statics during boot of system %u.",
m_data.
systemID);
138 _log(SERVICE__ERROR,
"Unable to load Cosmic Managers during boot of system %u.",
m_data.
systemID);
143 _log(SERVICE__ERROR,
"Unable to load System Dynamics during boot of system %u.",
m_data.
systemID);
148 _log(SERVICE__ERROR,
"Unable to load System Dynamics during boot of system %u.",
m_data.
systemID);
154 if (cur.second ->IsTCUSE())
155 cur.second->GetTCUSE()->Init();
156 else if (cur.second ->IsSBUSE())
157 cur.second->GetSBUSE()->Init();
158 else if (cur.second ->IsIHubSE())
159 cur.second->GetIHubSE()->Init();
163 if (cur.second->IsPOSSE())
164 cur.second->GetPOSSE()->Init();
174 if (
sConfig.server.BountyPayoutDelayed)
200 _log(SERVICE__ERROR,
"Unable to load Spawn Manager during boot of system %u.",
m_data.
systemID);
205 _log(SERVICE__ERROR,
"Unable to load Dungeon Manager during boot of system %u.",
m_data.
systemID);
213 _log(SERVICE__ERROR,
"Unable to load Anomaly Manager during boot of system %u.",
m_data.
systemID);
230 std::map<uint32, SystemEntity*>::iterator itr =
m_ticEntities.begin();
233 if (mLast >= itr->first) {
240 itr->second->Process();
252 if (cur.second->IsTCUSE())
253 cur.second->GetTCUSE()->Process();
254 else if (cur.second ->IsSBUSE())
255 cur.second->GetSBUSE()->Process();
256 else if (cur.second ->IsIHubSE())
257 cur.second->GetIHubSE()->Process();
273 cur.second->Process();
276 if (
sConfig.debug.UseProfiling)
309 std::map<uint32, SystemEntity*>::iterator itr =
m_entities.begin();
312 if ((itr->first == 0) or (itr->second ==
nullptr)) {
348 _log(PHYSICS__MESSAGE,
"SystemManager::UnloadSystem() - map count after unload: %u npcs, %u entities, %u statics.", \
381 std::vector<DBSystemEntity> entities;
386 sLog.Error(
"SystemManager::LoadSystemStatics()",
"Unable to load celestial entities during boot of %s(%u).",
m_data.
name.c_str(),
m_data.
systemID);
391 for (
auto cur : entities) {
392 switch (cur.groupID) {
411 itemRef->SetAttribute(
AttrRadius, cur.radius,
false);
413 m_gateMap.insert(std::pair<uint32, SystemEntity*>(cur.itemID, pSSE));
419 itemRef->SetAttribute(
AttrRadius, cur.radius,
false);
421 m_planetMap.insert(std::pair<uint32, SystemEntity*>(cur.itemID, pPSE));
426 itemRef->SetAttribute(
AttrRadius, cur.radius,
false);
428 m_moonMap.insert(std::pair<uint32, SystemEntity*>(cur.itemID, pMSE));
433 itemRef->SetAttribute(
AttrRadius, cur.radius,
false);
438 sLog.Error(
"SystemManager::LoadSystemStatics()",
"create static entity called for unhandled item %u (grp: %u, type %u)", cur.itemID, cur.groupID, cur.typeID);
442 if (pSE ==
nullptr) {
443 sLog.Error(
"SystemManager::LoadSystemStatics()",
"Failed to create entity for item %u (grp: %u, type %u)", cur.itemID, cur.groupID, cur.typeID);
453 _log(INV__WARNING,
"SystemManager::LoadSystemStatics() - Failed to load additional data for entity %u. Continuing.", cur.itemID);
460 _log(SERVER__INIT,
"SystemManager::LoadSystemStatics() - %u Static System entities loaded for %s (%u)", entities.size(),
m_data.
name.c_str(),
m_data.
systemID);
466 std::vector<DBSystemDynamicEntity> entities;
469 sLog.Error(
"SystemManager::LoadSystemDynamics()",
"Unable to load dynamic entities during boot of %s(%u).",
m_data.
name.c_str(),
m_data.
systemID);
474 for (
auto cur : entities) {
476 if (pSE ==
nullptr) {
477 sLog.Error(
"SystemManager::LoadSystemDynamics()",
"Failed to create entity for item %u (grp: %u, type %u)",
478 cur.itemID, cur.groupID, cur.typeID);
481 _log(ITEM__TRACE,
"SystemManager::LoadSystemDynamics() - Loaded dynamic entity %u of type %u for %s(%u)", \
488 _log(SERVER__INIT,
"SystemManager::LoadSystemDynamics - %u Dynamic System entities loaded for %s(%u)", entities.size(),
m_data.
name.c_str(),
m_data.
systemID);
494 std::vector<DBSystemDynamicEntity> entities;
497 sLog.Error(
"SystemManager::LoadPlayerDynamics()",
"Unable to load player dynamic entities in %s(%u).",
m_data.
name.c_str(),
m_data.
systemID);
502 for (
auto cur : entities) {
504 if (pSE ==
nullptr) {
505 sLog.Error(
"SystemManager::LoadPlayerDynamics()",
"Failed to create entity for item %u (grp: %u, type %u)", cur.itemID, cur.groupID, cur.typeID);
508 _log(ITEM__TRACE,
"SystemManager::LoadPlayerDynamics() - Loaded dynamic entity %u of type %u for %s(%u)", \
515 _log(SERVER__INIT,
"SystemManager::LoadPlayerDynamics() - %u Dynamic Player entities loaded for %s(%u)", \
523 if (pSE ==
nullptr) {
524 sLog.Error(
"SystemManager::BuildDynamicEntity()",
"Failed to create entity for item %u (grp: %u, type %u)", entity.
itemID, entity.
groupID, entity.
typeID);
528 _log(ITEM__TRACE,
"SystemManager::BuildDynamicEntity() - Created dynamic entity %u of type %u for %s(%u)", \
556 if (asteroid.
get() ==
nullptr)
559 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making AsteroidSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
564 if (ship.
get() ==
nullptr)
568 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ShipSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
573 if (deployable.
get() ==
nullptr)
578 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making DeployableSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
585 if (structure.
get() ==
nullptr)
592 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making TowerSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
600 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making WeaponSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
610 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making BatterySE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
624 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making ArraySE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
631 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making ReactorSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
636 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making JumpBridgeSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
641 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making StructureSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
650 if (structure.
get() ==
nullptr)
657 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making TCUSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
662 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making SBUSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
667 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making IHubSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
672 _log(POS__ERROR,
"DynamicEntityFactory::BuildEntity() Default sovereignty StructureSE created for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
680 if (structure.
get() ==
nullptr)
697 _log(POS__TRACE,
"DynamicEntityFactory::BuildEntity() making CustomsSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
709 if (wreck.
get() ==
nullptr)
715 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making WreckSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
724 if (contRef.
get() ==
nullptr)
730 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ContainerSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
757 if (celestial.
get() ==
nullptr)
761 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making CelestialSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
766 if (celestial.
get() ==
nullptr)
770 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making WormholeSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
776 if (celestial.
get() ==
nullptr)
780 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making AnomalySE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
787 if (iRef.
get() ==
nullptr)
791 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ISE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
801 if (contRef.
get() ==
nullptr)
807 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ContainerSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
813 if (sentryRef.
get() ==
nullptr)
817 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making SentrySE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
854 if (npcRef.
get() ==
nullptr)
860 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making NPCSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
866 if (iRef.
get() ==
nullptr)
870 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ISE item for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
876 if (drone.
get() ==
nullptr)
880 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making DroneSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
887 if (pRef.
get() ==
nullptr)
891 pRef->ChangeOwner(1);
894 _log(ITEM__TRACE,
"DynamicEntityFactory::BuildEntity() making ProbeSE for %s (%u)", entity.
itemName.c_str(), entity.
itemID);
898 sLog.Warning(
"BuildEntity",
"Called for Survey_Probe");
901 sLog.Warning(
"BuildEntity",
"Called for Warp_Disruption_Probe");
906 sLog.Warning(
"BuildEntity",
"Unhandled dynamic entity category %u for item %u of type %u", entity.
categoryID, entity.
itemID, entity.
typeID);
913 if (pClient ==
nullptr)
917 _log(PLAYER__TRACE,
"%s(%u): Added to system manager for %s(%u) - %u clients now in system. count %s", \
921 _log(PLAYER__ERROR,
"%s(%u): Already in player map for %s(%u)", \
929 _log(PLAYER__INFO,
"%s(%u): Added to player count for %s(%u) - new count: %u", \
936 _log(PLAYER__INFO,
"%s(%u): Add Jump to %s(%u)", \
940 std::map<uint32, uint8>::iterator itr =
m_jumpMap.find(stamp);
951 if (pClient ==
nullptr)
954 _log(PLAYER__TRACE,
"%s(%u): Removed from system manager for %s(%u) - %u clients still in system.", \
965 _log(PLAYER__INFO,
"%s(%u): Removed from player count for %s(%u) - new count: %u", \
972 _log(PLAYER__INFO,
"%s(%u): Add Jump to %s(%u)", \
976 std::map<uint32, uint8>::iterator itr =
m_jumpMap.find(stamp);
1004 _log(PLAYER__INFO,
"%s(%u): %s docked count for %s(%u) - new count: %u", \
1009 if ( pNPC ==
nullptr)
1024 if ( pNPC ==
nullptr)
1113 destinyBuffer->
Append( head );
1115 AddBalls2 addballs2;
1117 addballs2.extraBallData =
new PyList();
1122 addballs2.extraBallData->AddItem(balls);
1126 addballs2.state =
new PyBuffer(&destinyBuffer);
1130 addballs2.Dump( DESTINY__BALL_DUMP,
" " );
1132 PyTuple* up = addballs2.Encode();
1135 cur.second->QueueDestinyUpdate(&up,
true);
1154 std::map<uint32, BountyData>::iterator itr =
m_bountyMap.find(charID);
1156 itr->second.amount += data.
amount;
1157 std::map<uint32, RatDataMap>::iterator rItr =
m_ratMap.find(charID);
1159 RatDataMap::iterator it = rItr->second.begin();
1160 if (it == rItr->second.end()){
1162 vec.emplace(data.
fromID, 1);
1169 vec.emplace(data.
fromID, 1);
1175 vec.emplace(data.
fromID, 1);
1211 std::string reason =
"NBLT: ";
1212 std::map<uint32, RatDataMap>::iterator itr =
m_ratMap.find(cur.first);
1214 count = itr->second.size();
1215 for (
auto cur : itr->second) {
1216 reason += std::to_string(cur.first);
1218 reason += std::to_string(cur.second);
1231 m_bountyMap.clear();
1244 _log(SPAWN__MESSAGE,
"Spawn called for bubble %u(%u) in %s(%u)[%.4f], region %u.",
1252 _log(SPAWN__TRACE,
"SystemManager::DoSpawnForBubble() completed for %s(%u) in bubble %u. %u items in m_ratBubbles", \
1256 _log(SPAWN__TRACE,
"SystemManager::DoSpawnForBubble() returned false for bubble %u.", pBubble->
GetID());
1267 bubbleMap->emplace(itr->first, itr->second);
1275 }
else if (pBubble->
IsGate()) {
1294 head.
stamp = into.stamp;
1295 stateBuffer->
Append( head );
1297 std::map<uint32, SystemEntity*> visibleEntities;
1301 visibleEntities.emplace(cur.first, cur.second);
1305 visibleEntities.emplace(cur.first, cur.second);
1308 std::map<uint32, SystemEntity*>::const_iterator itr =
m_ticEntities.find(into.ego);
1310 visibleEntities.emplace(itr->first, itr->second);
1315 into.slims =
new PyList();
1316 into.slims->clear();
1317 into.effectStates =
new PyList();
1318 into.effectStates->clear();
1319 into.allianceBridges =
new PyList();
1320 into.allianceBridges->clear();
1323 for (
auto cur : visibleEntities) {
1324 if (!cur.second->IsMissileSE() or !cur.second->IsFieldSE())
1325 into.damageState[ cur.first ] = cur.second->MakeDamageState();
1327 into.slims->AddItem(
new PyObject(
"foo.SlimItem", cur.second->MakeSlimItem()));
1330 cur.second->EncodeDestiny( *stateBuffer );
1333 if (cur.second->IsTowerSE())
1334 cur.second->GetTowerSE()->GetEffectState(*(into.effectStates));
1348 into.destiny_state =
new PyBuffer( &stateBuffer );
1365 _log( DESTINY__SETSTATE,
"Current State of %s",
m_data.
name.c_str() );
1366 into.Dump( DESTINY__SETSTATE,
" " );
1370 _log( DESTINY__SETSTATE_DECODE,
" Decoded:" );
1371 Destiny::DumpUpdate( DESTINY__SETSTATE_DECODE, &( into.destiny_state->content() )[0], (
uint32)into.destiny_state->content().size() );
1383 _log(DESTINY__MESSAGE,
"SystemManager::SendStaticBall() - Adding static entity %s(%u) to bubble %u. Dist to center: %.2f", \
1393 destinyBuffer->
Append( head );
1395 AddBalls2 addballs2;
1397 addballs2.extraBallData =
new PyList();
1405 addballs2.extraBallData->AddItem(balls);
1408 if (addballs2.extraBallData->size() < 1) {
1414 addballs2.state =
new PyBuffer(&destinyBuffer);
1417 addballs2.Dump( DESTINY__BALL_DUMP,
" " );
1418 _log( DESTINY__BALL_DECODE,
" Ball Decoded:" );
1420 Destiny::DumpUpdate( DESTINY__BALL_DECODE, &( addballs2.state->content() )[0], (
uint32)addballs2.state->content().size() );
1423 PyTuple* rsp = addballs2.Encode();
1427 cur.second->QueueDestinyUpdate(&rsp,
true);
1447 _log(ITEM__WARNING,
"%s(%u): Called RemoveEntity(), but they weren\'t found in system manager for %s(%u)", \
1455 std::map<uint32, SystemEntity*>::const_iterator itr =
m_entities.find(entityID);
1463 std::map<uint32, NPC*>::const_iterator itr =
m_npcs.find(entityID);
1486 std::map<uint32, SystemEntity*>::iterator itr =
m_planetMap.find(planetID);
1494 std::map<double, SystemEntity*> sorted;
1496 sorted.insert(std::pair<double, SystemEntity*>(myPos.
distance(cur.second->GetPosition()), cur.second));
1498 std::map<double, SystemEntity*>::iterator itr = sorted.begin();
1500 return itr->second->GetID();
1505 std::map<double, SystemEntity*> sorted;
1507 sorted.insert(std::pair<double, SystemEntity*>(myPos.
distance(cur.second->GetPosition()), cur.second));
1509 std::map<double, SystemEntity*>::iterator itr = sorted.begin();
1516 std::map<double, SystemEntity*> sorted;
1518 sorted.insert(std::pair<double, SystemEntity*>(myPos.
distance(cur.second->GetPosition()), cur.second));
1520 std::map<double, SystemEntity*>::iterator itr = sorted.begin();
1527 std::map<double, SystemEntity*> sorted;
1529 sorted.insert(std::pair<double, SystemEntity*>(myPos.
distance(cur.second->GetPosition()), cur.second));
1531 std::map<double, SystemEntity*>::iterator itr = sorted.begin();
1539 cVec.push_back(cur.second);
1564 if (!
sConfig.server.AsteroidsOnDScan)
1566 if (
IsNPC(cur.first))
1568 if (cur.second->IsDeployableSE())
1570 if (cur.second->IsShipSE()) {
1576 if (cur.second->DestinyMgr() !=
nullptr)
1577 if (cur.second->DestinyMgr()->IsCloaked())
1580 if (pos.
distance(cur.second->GetPosition()) < range)
1581 vector.push_back(cur.second);
1616 sig.
ownerID = cur.second->GetOwnerID();
1621 sig.
position = cur.second->GetPosition();
1623 sig.
sigTypeID = cur.second->GetTypeID();
1627 switch (cur.second->GetCategoryID()) {
1647 sig.
sigName = cur.second->GetName();
1655 sig.
sigName = cur.second->GetName();
1658 vector.push_back(sig);
1670 std::map<uint32, uint8>::iterator itr =
m_jumpMap.begin();
1672 if (itr->first < stamp) {
1676 jumps += itr->second;
1698 if (cur.second->IsPOSSE()) {
1725 if (cur.second->IsDocked())
1758 uint8 buffer[
sizeof(i)];
1759 memset(buffer, 0,
sizeof(i));
1760 memcpy(buffer, &i,
sizeof(i));
1761 return *buffer == 0;
#define IsStaticItem(itemID)
void Append(const T &value)
Appends a single value to buffer.
virtual StationSE * GetStationSE()
bool Init(AnomalyMgr *anomMgr, SpawnMgr *spawnMgr)
#define sConfig
A macro for easier access to the singleton.
bool LoadSystemDynamics()
bool Init(BeltMgr *beltMgr, DungeonMgr *dungMgr, SpawnMgr *spawnMgr)
void SetPosition(const GPoint &pos)
void RemoveNPC(NPC *pNPC)
SpawnBubbleMap m_roidBubbles
SystemEntity * GetSE(uint32 entityID) const
void AddEntity(SystemEntity *pSE, bool addSignal=true)
static bool LoadSystemDynamicEntities(uint32 systemID, std::vector< DBSystemDynamicEntity > &into)
#define IsAsteroidID(itemID)
void RemoveClient(Client *pClient, bool count=false, bool jump=false)
virtual ProbeSE * GetProbeSE()
#define _log(type, fmt,...)
const GPoint GetRandPointOnMoon(uint32 systemID)
static void SetSystemActive(uint32 sysID, bool active=false)
void Init(uint32 regionID)
NPC * GetNPCSE(uint32 entityID) const
void RemoveSpawnBubble(SystemBubble *pBubble)
std::map< uint32, SystemEntity * > m_opStaticEntities
virtual PlanetSE * GetPlanetSE()
static bool LoadPlayerDynamicEntities(uint32 systemID, std::vector< DBSystemDynamicEntity > &into)
SystemBubble * SysBubble()
void SetCustomsOffice(CustomsSE *pSE)
virtual ShipSE * GetShipSE()
void GetEntities(std::map< uint32, SystemEntity * > &into) const
ShipItemRef GetShipItemRef()
itemID[count] Create count or of the specified() x() entityID Translocate to the specified entity Immediately stops setting then Sends Bubble AddBalls and Destiny SetState(resets spaceview with current server data)" ) COMMAND( sendstate
SystemEntity * GetClosestGateSE(const GPoint &myPos)
int32 GetCharacterID() const
std::map< uint32, RatDataMap > m_ratMap
std::map< uint32, BountyData > m_bountyMap
std::map< uint32, SystemEntity * > m_gateMap
static void LoadDynamicData(uint32 sysID, SystemKillData &data)
void GetClientList(std::vector< Client * > &cVec)
SystemEntity * GetPlanet(uint32 planetID)
void AddMarker(SystemEntity *pSE, bool sendBall=false, bool addSignal=false)
void SetFleetID(uint32 set)
PyObject * GetDroneState() const
TargetManager * TargetMgr()
bool IsNull(std::map< uint32, SystemEntity * >::iterator &i)
uint32 GetClosestPlanetID(const GPoint &myPos)
bool BuildDynamicEntity(const DBSystemDynamicEntity &entity, uint32 launcherID=0)
virtual WreckSE * GetWreckSE()
virtual bool IsPlanetSE()
const GPoint & GetPosition() const
bool LoadPlayerDynamics()
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
std::map< uint16, uint8 > RatDataMap
const GPoint GetRandPointOnPlanet(uint32 systemID)
PyRep * GetCurrentEntities()
const ItemType & type() const
#define is_log_enabled(type)
#define sLog
Evaluates to a NewLog instance.
virtual PyDict * MakeSlimItem()
void CreateSystemChannel(int32 channelID)
ShipItemRef GetShipFromInventory(uint32 shipID)
std::map< uint32, uint8 > m_jumpMap
Generic class for buffers.
InventoryItemRef GetSelf()
std::map< uint32, SystemEntity * > m_ticEntities
std::map< uint32, Client * > m_clients
std::map< uint32, SystemEntity * > m_planetMap
virtual bool IsStationSE()
PyTuple * MakeDamageState()
CargoContainerRef GetContainerFromInventory(uint32 contID)
void SetItem(size_t index, PyRep *object)
Stores Python object.
void AddBounty(uint32 charID, BountyData &data)
SpawnBubbleMap m_ratBubbles
static SystemEntity * BuildEntity(SystemManager &pSysMgr, const DBSystemDynamicEntity &entity)
virtual bool IsContainerSE()
void RemoveEntity(SystemEntity *pSE)
SystemEntity * GetClosestPlanetSE(const GPoint &myPos)
static void TranserFunds(uint32 fromID, uint32 toID, double amount, std::string reason="", uint8 entryTypeID=Journal::EntryType::Undefined, uint32 referenceID=0, uint16 fromKey=Account::KeyType::Cash, uint16 toKey=Account::KeyType::Cash, Client *pClient=nullptr)
void SetBeltMgr(BeltMgr *beltMgr)
void SetDockCount(Client *pClient, bool docked=false)
std::vector< uint32 > m_beltVector
void RemoveItemFromInventory(InventoryItemRef item)
void SetAttribute(uint16 attrID, int num, bool notify=true)
bool Check(bool reset=true)
void AddClient(Client *pClient, bool count=false, bool jump=false)
uint32 GetFleetID() const
static void UpdatePilotCount(uint32 sysID, uint16 docked=0, uint16 space=0)
const char * GetName() const
void GetAllEntities(std::vector< CosmicSignature > &vector)
const char * GetName() const
#define IsCharacterID(itemID)
void RemoveItemFromInventory(InventoryItemRef iRef)
SystemEntity * GetClosestMoonSE(const GPoint &myPos)
itemID[count] Create count or of the specified() x() entityID Translocate to the specified entity Immediately stops ship
StationItemRef GetStationFromInventory(uint32 stationID)
static RefPtr StaticCast(const RefPtr< Y > &oth)
Acts as static_cast from one RefPtr to another.
PyServiceMgr * GetServiceMgr()
void AddItemToInventory(InventoryItemRef item)
void SendStaticBall(SystemEntity *pSE)
virtual void EncodeDestiny(Buffer &into)
static bool LoadSystemStaticEntities(uint32 systemID, std::vector< DBSystemEntity > &into)
std::map< uint32, SystemEntity * > GetOperationalStatics()
void AddSignal(SystemEntity *pSE, uint32 id=0)
static void ClearDungeons()
#define IsTempItem(itemID)
void ManipulateTimeData()
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
void MakeSetState(const SystemBubble *pBubble, SetState &into) const
std::map< uint32, SystemBubble * > SpawnBubbleMap
GaExpInl bool isZero() const
void DScan(int64 range, const GPoint &pos, std::vector< SystemEntity * > &vector)
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type()() itemID() copy() materialLevel()() itemID(attributeID)-Retrieves attribute value." ) COMMAND( setattr
bool SetField(uint32 index, PyRep *value)
void DumpUpdate(LogType into, const uint8 *data, uint32 len)
void DoSpawnForBubble(SystemBubble *pBubble)
void RemoveSignal(uint32 itemID)
SystemKillData m_killData
static void AddJump(uint32 sysID)
void GetSpawnBubbles(SpawnBubbleMap *bubbleMap)
SolarSystemRef m_solarSystemRef
std::map< uint32, SystemEntity * > m_entities
GaExpInl GaFloat distance(const GaVec3 &oth) const
void SetMySE(SystemEntity *pSE)
void SystemUnload(uint32 systemID, uint32 constID, uint32 regionID)
PyServiceMgr & m_services
void SetMySE(SystemEntity *pSE)
std::map< uint32, NPC * > m_npcs
virtual bool IsStaticEntity()
void SetPlanet(uint32 planetID)
Inventory * GetMyInventory()
SystemManager(uint32 systemID, PyServiceMgr &svc)
bool DoSpawnForBubble(SystemBubble *pBubble)
std::map< uint32, SystemEntity * > m_staticEntities
InventoryItemRef GetByID(uint32 id) const
virtual bool LoadExtras()
void AddItemToInventory(InventoryItemRef iRef)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
std::map< uint32, SystemEntity * > m_moonMap
void SetLaunchedByID(uint32 launcherID)
static void UpdateKillData(uint32 sysID, SystemKillData &data)
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)