EvEmu
0.8.4
11 September 2021
|
#include "BeltMgr.h"
Public Member Functions | |
~BeltMgr () | |
Protected Attributes | |
ManagerDB | m_db |
Timer | m_respawnTimer |
Private Attributes | |
SystemManager * | m_system |
PyServiceMgr & | m_services |
bool | m_initialized |
uint32 | m_systemID |
uint32 | m_regionID |
std::map< uint32, bool > | m_spawned |
std::map< uint32, bool > | m_active |
std::map< uint32, InventoryItemRef > | m_belts |
std::unordered_multimap < uint32, AsteroidSE * > | m_asteroids |
BeltMgr.cpp | |
Asteroid Belt Spawn management system for EVEmu : Allan
| |
BeltMgr (SystemManager *mgr, PyServiceMgr &svc) | |
void | Init (uint32 regionID) |
void | Save () |
void | Process () |
void | ClearAll () |
void | ClearBelt (uint16 bubbleID) |
void | SetActive (uint16 bubbleID, bool active=true) |
void | RegisterBelt (InventoryItemRef itemRef) |
bool | Create (CosmicSignature &sig, std::unordered_multimap< float, uint16 > &roidTypes) |
bool | Load (uint16 bubbleID) |
bool | IsActive (uint16 bubbleID) |
bool | IsSpawned (uint16 bubbleID) |
void | CheckSpawn (uint16 bubbleID) |
void | GetList (uint32 beltID, std::vector< AsteroidSE * > &list) |
void | RemoveAsteroid (uint32 beltID, AsteroidSE *pASE) |
void | SpawnBelt (uint16 bubbleID, std::unordered_multimap< float, uint16 > &roidTypes, int type=0, bool anomaly=false) |
void | SpawnAsteroid (uint32 beltID, uint32 typeID, double radius, const GPoint &position, bool ice=false) |
void | GetIceDist (uint8 quarter, float secStatus, std::unordered_multimap< float, uint16 > &roidDist) |
uint32 | GetAsteroidType (double p, const std::unordered_multimap< float, uint16 > &roids) |
BeltMgr::BeltMgr | ( | SystemManager * | mgr, |
PyServiceMgr & | svc | ||
) |
Definition at line 28 of file BeltMgr.cpp.
void BeltMgr::CheckSpawn | ( | uint16 | bubbleID | ) |
Definition at line 82 of file BeltMgr.cpp.
References IsSpawned(), Load(), and SpawnBelt().
Referenced by SystemBubble::Add().
void BeltMgr::ClearAll | ( | ) |
Definition at line 71 of file BeltMgr.cpp.
References m_asteroids, m_belts, m_system, SystemManager::RemoveEntity(), SafeDelete(), and Save().
Referenced by SystemManager::UnloadSystem().
void BeltMgr::ClearBelt | ( | uint16 | bubbleID | ) |
Definition at line 66 of file BeltMgr.cpp.
bool BeltMgr::Create | ( | CosmicSignature & | sig, |
std::unordered_multimap< float, uint16 > & | roidTypes | ||
) |
Definition at line 244 of file BeltMgr.cpp.
References SystemBubble::GetID(), SystemManager::GetSE(), SystemEntity::GetSelf(), m_system, SystemBubble::SetBelt(), CosmicSignature::sigItemID, SpawnBelt(), and SystemEntity::SysBubble().
Referenced by DungeonMgr::Create().
|
protected |
Definition at line 362 of file BeltMgr.cpp.
References _log.
Referenced by SpawnBelt().
|
protected |
Definition at line 446 of file BeltMgr.cpp.
Referenced by SpawnBelt().
void BeltMgr::GetList | ( | uint32 | beltID, |
std::vector< AsteroidSE * > & | list | ||
) |
Definition at line 221 of file BeltMgr.cpp.
References m_asteroids.
Referenced by Command_beltlist(), and ActiveModule::DeactivateCycle().
void BeltMgr::Init | ( | uint32 | regionID | ) |
Definition at line 36 of file BeltMgr.cpp.
References _log, SystemManager::GetID(), SystemManager::GetName(), m_active, m_belts, m_initialized, m_regionID, m_respawnTimer, m_spawned, m_system, m_systemID, sConfig, and Timer::Start().
Referenced by SystemManager::LoadCosmicMgrs().
bool BeltMgr::IsActive | ( | uint16 | bubbleID | ) |
Definition at line 105 of file BeltMgr.cpp.
References m_active, and sBubbleMgr.
Referenced by AsteroidSE::Process().
bool BeltMgr::IsSpawned | ( | uint16 | bubbleID | ) |
Definition at line 96 of file BeltMgr.cpp.
References m_spawned, and sBubbleMgr.
Referenced by CheckSpawn(), and SpawnBelt().
bool BeltMgr::Load | ( | uint16 | bubbleID | ) |
Definition at line 139 of file BeltMgr.cpp.
References _log, SystemManager::AddEntity(), AttrMass, AttrQuantity, AttrRadius, AttrVolume, RefPtr< X >::get(), SystemManager::GetName(), SystemManager::GetServiceMgr(), ManagerDB::LoadSystemRoids(), m_active, m_asteroids, m_db, m_spawned, m_system, m_systemID, sBubbleMgr, AsteroidSE::SetMgr(), and sItemFactory.
Referenced by CheckSpawn().
void BeltMgr::Process | ( | ) |
Definition at line 125 of file BeltMgr.cpp.
References Timer::Check(), m_initialized, m_respawnTimer, m_spawned, and SpawnBelt().
Referenced by SystemManager::ProcessTic().
void BeltMgr::RegisterBelt | ( | InventoryItemRef | itemRef | ) |
Definition at line 57 of file BeltMgr.cpp.
References m_active, m_belts, and m_spawned.
Referenced by SystemBubble::SetBelt().
void BeltMgr::RemoveAsteroid | ( | uint32 | beltID, |
AsteroidSE * | pASE | ||
) |
Definition at line 424 of file BeltMgr.cpp.
References SystemEntity::GetID(), m_asteroids, m_db, and ManagerDB::RemoveAsteroid().
Referenced by AsteroidSE::Delete().
void BeltMgr::Save | ( | ) |
Definition at line 187 of file BeltMgr.cpp.
References _log, AsteroidData::beltID, SystemManager::GetName(), GetTimeUSeconds(), IsTempItem, AsteroidData::itemID, AsteroidData::itemName, m_asteroids, m_db, m_system, m_systemID, AsteroidData::position, AsteroidData::quantity, AsteroidData::radius, ManagerDB::SaveSystemRoids(), AsteroidData::systemID, and AsteroidData::typeID.
Referenced by ClearAll().
void BeltMgr::SetActive | ( | uint16 | bubbleID, |
bool | active = true |
||
) |
Definition at line 114 of file BeltMgr.cpp.
References m_active, and sBubbleMgr.
Referenced by MiningLaser::CanActivate().
|
protected |
Definition at line 375 of file BeltMgr.cpp.
References _log, SystemManager::AddEntity(), AsteroidData::beltID, flagNone, RefPtr< X >::get(), SystemManager::GetServiceMgr(), IsNaN(), IsTempItem, m_asteroids, m_system, m_systemID, ownerSystem, AsteroidData::position, AsteroidData::quantity, AsteroidData::radius, sConfig, AsteroidSE::SetMgr(), sItemFactory, AsteroidItem::SpawnTemp(), AsteroidData::systemID, and AsteroidData::typeID.
Referenced by SpawnBelt().
|
protected |
Definition at line 255 of file BeltMgr.cpp.
References _log, EvE::Trig::Deg2Rad(), GetAsteroidType(), SystemBubble::GetCenter(), GetIceDist(), SystemManager::GetName(), SystemManager::GetSE(), SystemManager::GetSecValue(), SystemManager::GetSystemSecurityClass(), SystemManager::GetSystemSecurityRating(), SystemEntity::GetTypeID(), IsCelestialID, IsSpawned(), m_active, m_regionID, m_spawned, m_system, m_systemID, MakeRandomFloat(), MakeRandomInt(), NULL_ORIGIN(), EvE::Trig::Pi, sBubbleMgr, sConfig, sDataMgr, SpawnAsteroid(), and SystemEntity::SysBubble().
Referenced by CheckSpawn(), Create(), and Process().
|
private |
Definition at line 79 of file BeltMgr.h.
Referenced by Init(), IsActive(), Load(), RegisterBelt(), SetActive(), and SpawnBelt().
|
private |
Definition at line 83 of file BeltMgr.h.
Referenced by ClearAll(), GetList(), Load(), RemoveAsteroid(), Save(), and SpawnAsteroid().
|
private |
Definition at line 81 of file BeltMgr.h.
Referenced by ClearAll(), Init(), and RegisterBelt().
|
protected |
Definition at line 59 of file BeltMgr.h.
Referenced by Load(), RemoveAsteroid(), and Save().
|
private |
|
private |
Definition at line 74 of file BeltMgr.h.
Referenced by Init(), and SpawnBelt().
|
protected |
|
private |
|
private |
Definition at line 77 of file BeltMgr.h.
Referenced by Init(), IsSpawned(), Load(), Process(), RegisterBelt(), and SpawnBelt().
|
private |
Definition at line 69 of file BeltMgr.h.
Referenced by ClearAll(), Create(), Init(), Load(), Save(), SpawnAsteroid(), and SpawnBelt().
|
private |
Definition at line 73 of file BeltMgr.h.
Referenced by Init(), Load(), Save(), SpawnAsteroid(), and SpawnBelt().