34     sLog.Blue(
"   DungeonDataMgr", 
"Dungeon Data Manager Initialized.");
 
  116     sLog.Cyan(
"   DungeonDataMgr", 
"%u entrys, %u rooms and %u groups for %u dungeon templates loaded in %.3fms.",\
 
  130         dunList.push_back(cur.second);
 
  134     std::map<uint32, Dungeon::Template>::iterator itr = 
templates.find(templateID);
 
  136         _log(COSMIC_MGR__ERROR, 
"DungeonDataMgr - templateID %u not found.", templateID);
 
  139     dTemplate = itr->second;
 
  156         default:                            
return "Invalid";
 
  197     if (!
sConfig.cosmic.DungeonEnabled){
 
  202     if (!
sConfig.cosmic.AnomalyEnabled) {
 
  212     if (!
sConfig.cosmic.BeltEnabled) {
 
  237     std::vector<Dungeon::ActiveData> dungeons;
 
  260     if (!
sDunDataMgr.GetTemplate(templateID, dTemplate))
 
  264         _log(COSMIC_MGR__ERROR, 
"DungeonMgr::Create() - roomID is 0 for template %u.", templateID);
 
  286     if (iRef.get() == 
nullptr) 
 
  296     _log(COSMIC_MGR__TRACE, 
"DungeonMgr::Create() - %s using templateID %u and roomID %i", sig.
sigName.c_str(), templateID, dTemplate.
dunRoomID);
 
  324     for (
auto it = roomRange.first; it != roomRange.second; ++it) {
 
  328         auto groupRange = 
sDunDataMgr.groups.equal_range(it->second.dunGroupID);
 
  329         for (
auto it2 = groupRange.first; it2 != groupRange.second; ++it2) {
 
  332             grp.
typeName = it2->second.typeName;
 
  333             grp.
typeID = it2->second.typeID;
 
  334             grp.
x = (x + it2->second.x);
 
  335             grp.
y = (
y + it2->second.y);
 
  336             grp.
z = (z + it2->second.z);
 
  346         float chance = (100.0 /size) /divisor;
 
  349         std::unordered_multimap<float, uint16> roidTypes;
 
  351             roidTypes.emplace(chance, cur.typeID);
 
  355         m_anomalyItems.clear();
 
  365     std::vector<uint32> 
items;
 
  375         if (iRef.get() == 
nullptr) 
 
  380         items.push_back(iRef->itemID());
 
  387     _log(COSMIC_MGR__TRACE, 
"DungeonMgr::Create() - dungeonID %u created for %s with %u items.", \
 
  421     if (secRating < -0.2) {
 
  423     } 
else if (secRating < 0.2) {
 
  425     } 
else if (secRating < 0.6) {
 
  442             } 
else if (level < 0.3) {
 
  452             } 
else if (sec == 2) {      
 
  455             } 
else if (sec == 4) {      
 
  470                 } 
else if (level < 0.3) {   
 
  491             } 
else if (faction == 6) {
 
  507             } 
else if (sec == 2) {
 
  513             } 
else if (sec == 3) {
 
  518                 } 
else if (type == 1) { 
 
  529             } 
else if (sec == 2) {
 
  531             } 
else if (sec == 3) {
 
  546                 } 
else if (sec == 2) {
 
  549                     } 
else if (type == 4) {
 
  552                 } 
else if (sec == 3) {
 
  555                     } 
else if (type == 3) {
 
  591     uint32 templateID = (sig.
dungeonType * 10000) + (sec * 1000) + (type * 100) + (level * 10) + faction;
 
  593     _log(COSMIC_MGR__TRACE, 
"DungeonMgr::MakeDungeon() - Calling Create for type %s(%u) using templateID %u", \
 
  596     return Create(templateID, sig);
 
  623     _log(COSMIC_MGR__TRACE, 
"DungeonMgr::GetRandLevel() - level = %.2f", level);
 
  627     } 
else if (level < 0.25) {
 
  629     } 
else if (level < 0.50) {
 
  670     uint8 factionID = templateID % 10;
 
  671     uint8 level = templateID / 10 % 10;
 
  672     uint8 type = templateID / 100 % 10;
 
  677     std::vector<uint16> groupVec;
 
  680     groupVec.push_back(131);    
 
  681     groupVec.push_back(132);    
 
  682     groupVec.push_back(691);    
 
  693             groupVec.push_back(130);    
 
  694             groupVec.push_back(160);    
 
  695             groupVec.push_back(620);    
 
  696             groupVec.push_back(630);    
 
  699             groupVec.push_back(620);    
 
  700             groupVec.push_back(630);    
 
  701             groupVec.push_back(640);    
 
  702             groupVec.push_back(650);    
 
  703             groupVec.push_back(660);    
 
  704             groupVec.push_back(670);    
 
  705             groupVec.push_back(680);    
 
  706             groupVec.push_back(690);    
 
  709             groupVec.push_back(130);    
 
  710             groupVec.push_back(160);    
 
  711             groupVec.push_back(630);    
 
  712             groupVec.push_back(640);    
 
  715             groupVec.push_back(160);    
 
  716             groupVec.push_back(670);    
 
  717             groupVec.push_back(680);    
 
  718             groupVec.push_back(690);    
 
  722             groupVec.push_back(430);    
 
  723             groupVec.push_back(431);    
 
  724             groupVec.push_back(432);    
 
  725             groupVec.push_back(433);    
 
  726             groupVec.push_back(630);    
 
  727             groupVec.push_back(640);    
 
  728             groupVec.push_back(650);    
 
  731             groupVec.push_back(430);    
 
  732             groupVec.push_back(431);    
 
  733             groupVec.push_back(432);    
 
  734             groupVec.push_back(433);    
 
  737             groupVec.push_back(640);    
 
  738             groupVec.push_back(650);    
 
  752                     groupVec.push_back(401); 
 
  753                     groupVec.push_back(601); 
 
  756                     groupVec.push_back(402);  
 
  757                     groupVec.push_back(602);  
 
  760                     groupVec.push_back(403);  
 
  761                     groupVec.push_back(603);  
 
  764                     groupVec.push_back(404);  
 
  765                     groupVec.push_back(604);  
 
  768                     groupVec.push_back(405);  
 
  769                     groupVec.push_back(605);  
 
  772                     groupVec.push_back(406);  
 
  773                     groupVec.push_back(606);  
 
  785     uint8 factionID = templateID % 10;
 
  786     uint8 level = templateID / 10 % 10;
 
  787     uint8 type = templateID / 100 % 10;
 
  788     uint8 sec = templateID / 1000 % 10;
 
  791     uint16 count = 0, radius = 0, pos = 10000 * level;
 
  797     uint8 origLevel = ceil(level /10);
 
  800     for (
auto cur : groupVec) {
 
  806         _log(COSMIC_MGR__DEBUG, 
"DungeonMgr::AddDecoToVector() - %s(%u):  faction %u, group %u, type %u, level %u, count %u, baseLvl %u",\
 
  807                     sDunDataMgr.GetDungeonType(dunType), dunType, factionID, \
 
  808                     cur, type, level, count, origLevel);
 
  810         auto groupRange = 
sDunDataMgr.groups.equal_range(cur);
 
  811         auto it = groupRange.first;
 
  812         double degreeSeparation = (250/level);
 
  814         for (
uint8 i=0; i < level; ++i) {
 
  817             std::advance(it,step);      
 
  818             grp.
typeID = it->second.typeID;
 
  823             radius = it->second.radius;
 
  828                 grp.
z = (radius + pos * std::sin(theta)) * -1;
 
  840             it = groupRange.first;
 
bool Init(AnomalyMgr *anomMgr, SpawnMgr *spawnMgr)
#define sConfig
A macro for easier access to the singleton. 
void AddEntity(SystemEntity *pSE, bool addSignal=true)
const char * GetText(uint32 index) const 
itemID[count] Create count or of the specified() x() y(z)-Jump to the specified position in space.Stopped." ) COMMAND( translocate
static InventoryItemRef SpawnItem(uint32 itemID, const ItemData &data)
#define _log(type, fmt,...)
int32 GetInt(uint32 index) const 
bool MakeDungeon(CosmicSignature &sig)
static void GetDunRoomData(DBQueryResult &res)
SystemBubble * SysBubble()
void GetDungeons(std::vector< Dungeon::ActiveData > &dunList)
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high]. 
bool Create(CosmicSignature &sig, std::unordered_multimap< float, uint16 > &roidTypes)
const float GetSystemSecurityRating()
bool Create(uint32 templateID, CosmicSignature &sig)
static void GetDunGroupData(DBQueryResult &res)
void SafeDelete(T *&p)
Deletes and nullifies a pointer. 
std::map< uint32, std::vector< uint32 > > m_dungeonList
bool GetRow(DBResultRow &into)
#define sLog
Evaluates to a NewLog instance. 
bool IsEven(int64 number)
static void GetDunTemplates(DBQueryResult &res)
std::vector< Dungeon::GroupData > m_anomalyItems
double Deg2Rad(double deg)
static const GPoint NULL_ORIGIN(0, 0, 0)
void AddDecoToVector(uint8 dunType, uint32 templateID, std::vector< uint16 > &groupVec)
void SetDungMgr(DungeonMgr *pDmgr)
void CreateDeco(uint32 templateID, CosmicSignature &sig)
bool GetTemplate(uint32 templateID, Dungeon::Template &dTemplate)
PyServiceMgr * GetServiceMgr()
void DoSpawnForAnomaly(SystemBubble *pBubble, uint8 spawnClass)
static void ClearDungeons()
ActiveDungeonDef activeDungeons
const char * GetName() const 
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high]. 
void AddDungeon(Dungeon::ActiveData &dungeon)
static void GetDunEntryData(DBQueryResult &res)
DungeonMgr(SystemManager *system, PyServiceMgr &svc)
const char * GetDungeonType(int8 typeID)
static bool GetSavedDungeons(uint32 systemID, std::vector< Dungeon::ActiveData > &into)
int8 GetFaction(uint32 factionID)
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all items