EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StaticDataMgr.cpp
Go to the documentation of this file.
1 
15 #include "../eve-common/EVE_Character.h"
16 #include "StaticDataMgr.h"
17 #include "database/EVEDBUtils.h"
19 #include "station/StationDataMgr.h"
20 #include "system/SystemManager.h"
21 
22 /*
23  * DATA__ERROR # specific "data not found but should be there" msgs
24  * DATA__WARNING # misc "data not found but nbd" msgs
25  * DATA__MESSAGE # misc data msgs (mt)
26  * DATA__INFO # data loading msgs (container and amount) (mt)
27  */
28 
30 : m_keyMap(nullptr),
31 m_agents(nullptr),
32 m_operands(nullptr),
33 m_billTypes(nullptr),
34 m_entryTypes(nullptr),
35 m_factionInfo(nullptr),
36 m_npcDivisions(nullptr)
37 {
38  m_ramReq.clear();
39  m_moonGoo.clear();
40  m_ramMatl.clear();
41  m_regions.clear();
42  m_compounds.clear();
43  m_minerals.clear();
44  m_bpMatlData.clear();
45  m_systemData.clear();
46  m_staticData.clear();
47  m_salvageMap.clear();
48  m_agentSystem.clear();
49  m_corpFaction.clear();
50  m_typeAttrMap.clear();
51  m_LootGroupMap.clear();
52  m_stationCount.clear();
53  m_stationConst.clear();
54  m_stationRegion.clear();
55  m_stationSystem.clear();
56  m_oreBySecClass.clear();
57  m_LootGroupTypeMap.clear();
58  m_WrecksToTypesMap.clear();
59 }
60 
62 {
63  //Clear();
64 }
65 
67 {
75 
76  for (auto cur : m_bpMatlData)
77  PySafeDecRef(cur.second);
78 
79  sLog.Warning(" StaticDataMgr", "Static Data Manager has been closed." );
80 }
81 
82 
84 {
85  Populate();
86  sLog.Blue(" StaticDataMgr", "Static Data Manager Initialized.");
87  return 1;
88 }
89 
91 {
92  m_ramReq.clear();
93  m_moonGoo.clear();
94  m_ramMatl.clear();
95  m_regions.clear();
96  m_compounds.clear();
97  m_minerals.clear();
98  m_systemData.clear();
99  m_staticData.clear();
100  m_salvageMap.clear();
101  m_agentSystem.clear();
102  m_corpFaction.clear();
103  m_typeAttrMap.clear();
104  m_stationCount.clear();
105  m_stationConst.clear();
106  m_LootGroupMap.clear();
107  m_stationRegion.clear();
108  m_stationSystem.clear();
109  m_oreBySecClass.clear();
110  m_LootGroupTypeMap.clear();
111  m_WrecksToTypesMap.clear();
112 
120 
121  for (auto cur : m_bpMatlData)
122  PySafeDecRef(cur.second);
123  m_bpMatlData.clear();
124 }
125 
127 {
128  double beginTime = GetTimeMSeconds();
129  double startTime = GetTimeMSeconds();
130 
132  if (m_keyMap == nullptr)
133  sLog.Error(" StaticDataMgr", "m_keyMap is null");
134 
136  if (m_agents == nullptr)
137  sLog.Error(" StaticDataMgr", "m_agents is null");
138 
140  if (m_operands == nullptr)
141  sLog.Error(" StaticDataMgr", "m_operands is null");
142 
144  if (m_billTypes == nullptr)
145  sLog.Error(" StaticDataMgr", "m_billTypes is null");
146 
148  if (m_entryTypes == nullptr)
149  sLog.Error(" StaticDataMgr", "m_entryTypes is null");
150 
152  if (m_npcDivisions == nullptr)
153  sLog.Error(" StaticDataMgr", "m_npcDivisions is null");
154 
155  sLog.Cyan(" StaticDataMgr", "Base Static data sets loaded in %.3fms.", (GetTimeMSeconds() - startTime));
156 
157  startTime = GetTimeMSeconds();
158  GetFactionInfoRsp rsp;
159  ManagerDB::LoadCorpFactions(rsp.factionIDbyNPCCorpID);
160  ManagerDB::LoadFactionStationCounts(rsp.factionStationCount);
161  ManagerDB::LoadFactionSystemCounts(rsp.factionSolarSystemCount);
162  ManagerDB::LoadFactionRegions(rsp.factionRegions);
163  ManagerDB::LoadFactionConstellations(rsp.factionConstellations);
164  ManagerDB::LoadFactionSolarSystems(rsp.factionSolarSystems);
165  ManagerDB::LoadFactionRaces(rsp.factionRaces);
166  rsp.npcCorpInfo = ManagerDB::LoadNPCCorpInfo();
167  m_factionInfo = rsp.Encode();
168  if (m_factionInfo == nullptr) {
169  sLog.Error(" StaticDataMgr", "m_factionInfo is null");
170  } else {
171  sLog.Cyan(" StaticDataMgr", "Faction data sets loaded in %.3fms.", (GetTimeMSeconds() - startTime));
172  }
173 
174  DBQueryResult* res = new DBQueryResult();
175  DBResultRow row;
176 
177  startTime = GetTimeMSeconds();
179  while (res->GetRow(row)) {
180  //SELECT corporationID, factionID FROM crpNPCCorporations
181  m_corpFaction.emplace(row.GetUInt(0), row.GetUInt(1));
182  }
183  sLog.Cyan(" StaticDataMgr", "%u Corps in NPC Corp Faction map loaded in %.3fms.", m_corpFaction.size(), (GetTimeMSeconds() - startTime));
184 
185  startTime = GetTimeMSeconds();
187  while (res->GetRow(row)) {
188  //SELECT categoryID, categoryName, description, published FROM invCategories
189  Inv::CatData data = Inv::CatData();
190  data.id = row.GetUInt(0);
191  data.name = row.GetText(1);
192  data.description = row.GetText(2);
193  data.published = (sConfig.server.AllowNonPublished ? true : row.GetBool(3));
194  m_catData.emplace(row.GetUInt(0), data);
195  }
196  sLog.Cyan(" StaticDataMgr", "%u Inventory Categories loaded in %.3fms.", m_catData.size(), (GetTimeMSeconds() - startTime));
197 
198  startTime = GetTimeMSeconds();
200  while (res->GetRow(row)) {
201  //SELECT groupID, categoryID, groupName, description, useBasePrice, allowManufacture, allowRecycler,
202  // anchored, anchorable, fittableNonSingleton, published FROM invGroups
203  Inv::GrpData data = Inv::GrpData();
204  data.id = row.GetUInt(0);
205  data.catID = row.GetUInt(1);
206  data.name = row.GetText(2);
207  data.description = row.GetText(3);
208  data.useBasePrice = row.GetBool(4);
209  data.allowManufacture = row.GetBool(5);
210  data.allowRecycler = row.GetBool(6);
211  data.anchored = row.GetBool(7);
212  data.anchorable = row.GetBool(8);
213  data.fittableNonSingleton = row.GetBool(9);
214  data.published = (sConfig.server.AllowNonPublished ? true : row.GetBool(10));
215  m_grpData.emplace(row.GetUInt(0), data);
216  }
217  sLog.Cyan(" StaticDataMgr", "%u Inventory Groups loaded in %.3fms.", m_grpData.size(), (GetTimeMSeconds() - startTime));
218 
219  startTime = GetTimeMSeconds();
221  while (res->GetRow(row)) {
222  Inv::TypeData data = Inv::TypeData();
223  data.id = row.GetUInt(0);
224  data.groupID = row.GetUInt(1);
225  data.name = row.GetText(2);
226  data.description = row.GetText(3);
227  data.radius = row.GetFloat(4);
228  data.mass = row.GetFloat(5);
229  data.volume = row.GetFloat(6);
230  data.capacity = row.GetFloat(7);
231  data.portionSize = row.GetUInt(8);
232  data.race = row.GetUInt(9);
233  data.basePrice = row.GetDouble(10);
234  data.published = (sConfig.server.AllowNonPublished ? true : row.GetBool(11));
235  data.marketGroupID = (row.IsNull(11) ? 0 : row.GetUInt(12));
236  data.chanceOfDuplicating = row.GetFloat(13);
237  data.metaLvl = (row.IsNull(14) ? 0 : row.GetUInt(14));
238  // these will take a bit of work, but will eliminate multiple db hits on inventory/menu loading ingame
239  data.isRecyclable = FactoryDB::IsRecyclable(data.id); // +30s to startup
240  data.isRefinable = FactoryDB::IsRefinable(data.id); // +8s to startup
241  m_typeData.emplace(row.GetUInt(0), data);
242  }
243  sLog.Cyan(" StaticDataMgr", "%u Inventory Types loaded in %.3fms.", m_typeData.size(), (GetTimeMSeconds() - startTime));
244 
245  startTime = GetTimeMSeconds();
247  while (res->GetRow(row)) {
248  //SELECT solarSystemID, solarSystemName, constellationID, regionID, securityClass, security FROM mapSolarSystems
249  SystemData sysData = SystemData();
250  sysData.systemID = row.GetInt(0);
251  sysData.name = row.GetText(1);
252  sysData.constellationID = row.GetInt(2);
253  sysData.regionID = row.GetInt(3);
254  sysData.securityClass = (row.IsNull(4) ? "0" : row.GetText(4));
255  sysData.securityRating = row.GetFloat(5); // this gives system trueSec
256  sysData.factionID = (row.IsNull(6) ? 0 : row.GetUInt(6));
257  m_systemData.emplace(row.GetInt(0), sysData);
258  }
259  sLog.Cyan(" StaticDataMgr", "%u Static System data sets loaded in %.3fms.", m_systemData.size(), (GetTimeMSeconds() - startTime));
260 
261  //res->Reset(); <<--- this is redundant. object is reset in dbcore on each call
262  startTime = GetTimeMSeconds();
264  while (res->GetRow(row)) {
265  //SELECT locationID, wormholeClassID FROM mapLocationWormholeClasses
266  m_whRegions.emplace(row.GetInt(0), row.GetInt(1));
267  }
268  sLog.Cyan(" StaticDataMgr", "%u WH System Classes loaded in %.3fms.", m_whRegions.size(), (GetTimeMSeconds() - startTime));
269 
270  startTime = GetTimeMSeconds();
272  while (res->GetRow(row)) {
273  //SELECT itemID, regionID, constellationID, solarSystemID, typeID, radius, x, y, z FROM mapDenormalize
274  StaticData data = StaticData();
275  data.itemID = row.GetInt(0);
276  data.regionID = row.GetInt(1);
277  data.constellationID = row.GetInt(2);
278  data.systemID = row.GetInt(3);
279  data.typeID = row.GetInt(4);
280  data.radius = row.GetFloat(5);
281  data.position = GPoint(row.GetDouble(6),row.GetDouble(7),row.GetDouble(8));
282  m_staticData.emplace(row.GetInt(0), data);
283  }
284  sLog.Cyan(" StaticDataMgr", "%u Static Entity data sets loaded in %.3fms.", m_staticData.size(), (GetTimeMSeconds() - startTime));
285 
286  startTime = GetTimeMSeconds();
288  while (res->GetRow(row)) {
289  //SELECT map.solarSystemID, count(sta.stationID) FROM staStations sta
290  m_stationCount.emplace(row.GetInt(0), row.GetInt(1));
291  }
293  while (res->GetRow(row)) {
294  //SELECT stationID, regionID FROM staStations
295  m_stationRegion.emplace(row.GetInt(0), row.GetInt(1));
296  }
298  while (res->GetRow(row)) {
299  //SELECT stationID, constellationID FROM staStations
300  m_stationConst.emplace(row.GetInt(0), row.GetInt(1));
301  }
303  while (res->GetRow(row)) {
304  //SELECT stationID, solarSystemID FROM staStations
305  m_stationSystem.emplace(row.GetInt(0), row.GetInt(1));
306  }
307 
308  std::map<uint32, std::vector<uint32>>::iterator itr = m_stationList.begin();
309  for (auto cur : m_stationSystem) {
310  itr = m_stationList.find(cur.second);
311  if (itr != m_stationList.end()) {
312  itr->second.push_back(cur.first);
313  } else {
314  std::vector<uint32> sVec;
315  sVec.push_back(cur.first);
316  m_stationList.emplace(std::pair<uint32, std::vector<uint32>>(cur.second, sVec));
317  }
318  }
319  sLog.Cyan(" StaticDataMgr", "%u Static Station query sets loaded in %.3fms.", (m_stationConst.size() + m_stationRegion.size() + m_stationSystem.size() + m_stationList.size()), (GetTimeMSeconds() - startTime));
320 
321  startTime = GetTimeMSeconds();
323  while (res->GetRow(row)) {
324  //SELECT typeID, attributeID, valueInt, valueFloat FROM dgmTypeAttributes
325  DmgTypeAttribute typeAttr = DmgTypeAttribute();
326  typeAttr.attributeID = row.GetInt(1);
327  if (row.IsNull(2)) {
328  typeAttr.value = row.GetDouble(3);
329  } else {
330  typeAttr.value = row.GetInt(2); // highest value seen is 2,000,000,000 (struct HP)
331  }
332 
333  m_typeAttrMap.emplace(row.GetInt(0), typeAttr);
334  }
335  sLog.Cyan(" StaticDataMgr", "%u Type Attribute Sets loaded in %.3fms", m_typeAttrMap.size(), (GetTimeMSeconds() - startTime));
336 
337  startTime = GetTimeMSeconds();
339  while (res->GetRow(row)) {
340  //SELECT typeID, typeName FROM invTypes [where type=skill]
341  m_skills.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
342  }
343  sLog.Cyan(" StaticDataMgr", "%u Skills loaded in %.3fms.", m_skills.size(), (GetTimeMSeconds() - startTime));
344 
345  startTime = GetTimeMSeconds();
346  FactoryDB::GetComponents(*res); //766
347  while (res->GetRow(row)) {
348  //SELECT typeID, typeName FROM invTypes [where type=composite or component]
349  m_components.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
350  }
351  FactoryDB::GetMinerals(*res); //8
352  while (res->GetRow(row)) {
353  //SELECT typeID, typeName FROM invTypes [where type=mineral]
354  m_minerals.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
355  }
356  FactoryDB::GetCompounds(*res); //181
357  while (res->GetRow(row)) {
358  //SELECT typeID, typeName FROM invTypes [where type=compound]
359  m_compounds.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
360  }
361  FactoryDB::GetSalvage(*res); //53
362  while (res->GetRow(row)) {
363  //SELECT typeID, typeName FROM invTypes [where type=salvage]
364  m_salvage.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
365  }
366  FactoryDB::GetResources(*res); //15
367  while (res->GetRow(row)) {
368  //SELECT typeID, typeName FROM invTypes [where type=pi resource]
369  m_resources.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
370  }
371  FactoryDB::GetCommodities(*res); //66
372  while (res->GetRow(row)) {
373  //SELECT typeID, typeName FROM invTypes [where type=pi commodity]
374  m_commodities.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
375  }
376  FactoryDB::GetMiscCommodities(*res); //456
377  while (res->GetRow(row)) {
378  //SELECT typeID, typeName FROM invTypes [where type=misc commodity]
379  m_miscCommodities.insert(std::pair<uint16, std::string>(row.GetInt(0), row.GetText(1)));
380  }
382  while (res->GetRow(row)) {
383  //SELECT typeID, materialTypeID, quantity FROM invTypeMaterials
385  ramMatls.quantity = row.GetInt(2);
386  ramMatls.materialTypeID = row.GetInt(1);
387  m_ramMatl.emplace(row.GetInt(0), ramMatls);
388  }
390  while (res->GetRow(row)) {
391  //SELECT typeID, activityID, requiredTypeID, quantity, damagePerJob, extra FROM ramTypeRequirements
393  ramReq.activityID = row.GetInt(1);
394  ramReq.requiredTypeID = row.GetInt(2);
395  ramReq.quantity = row.GetInt(3);
396  ramReq.damagePerJob = row.GetFloat(4);
397  ramReq.extra = row.GetBool(5);
398  m_ramReq.emplace(row.GetInt(0), ramReq);
399  }
400  sLog.Cyan(" StaticDataMgr", "%u R.A.M. defs loaded in %.3fms.", (m_ramMatl.size() + m_ramReq.size()), (GetTimeMSeconds() - startTime));
401 
402  startTime = GetTimeMSeconds();
404  while (res->GetRow(row)) {
405  //SELECT blueprintTypeID, parentBlueprintTypeID, productTypeID, productionTime, techLevel, researchProductivityTime, researchMaterialTime, researchCopyTime,
406  // researchTechTime, productivityModifier, materialModifier, wasteFactor, maxProductionLimit, chanceOfRE, catID FROM invBlueprintTypes
407  EvERam::bpTypeData bpTypeData = EvERam::bpTypeData();
408  bpTypeData.parentBlueprintTypeID = row.GetInt(1);
409  bpTypeData.productTypeID = row.GetInt(2);
410  bpTypeData.productionTime = row.GetInt(3);
411  bpTypeData.techLevel = row.GetInt(4);
412  bpTypeData.researchProductivityTime = row.GetInt(5);
413  bpTypeData.researchMaterialTime = row.GetInt(6);
414  bpTypeData.researchCopyTime = row.GetInt(7);
415  bpTypeData.researchTechTime = row.GetInt(8);
416  bpTypeData.productivityModifier = row.GetInt(9);
417  bpTypeData.materialModifier = row.GetInt(10);
418  bpTypeData.wasteFactor = row.GetInt(11);
419  bpTypeData.maxProductionLimit = row.GetInt(12);
420  bpTypeData.chanceOfRE = row.GetFloat(13);
421  bpTypeData.catID = (row.IsNull(14) ? 0 : row.GetInt(14));
422  m_bpTypeData.emplace(row.GetInt(0), bpTypeData);
423  m_bpProductData.emplace(row.GetInt(2), bpTypeData);
424  }
425  for (auto cur : m_bpTypeData)
426  m_bpMatlData[cur.first] = SetBPMatlType(cur.second.catID, cur.first, cur.second.productTypeID);
427  sLog.Cyan(" StaticDataMgr", "%u BP Type defs loaded in %.3fms.", m_bpTypeData.size(), (GetTimeMSeconds() - startTime));
428 
429  startTime = GetTimeMSeconds();
431  while (res->GetRow(row)) {
432  //SELECT typeID,volume FROM invTypes [where group=moongoo]
433  m_moonGoo.emplace(row.GetInt(0), (uint8)(row.GetFloat(1) *10));
434  }
435  sLog.Cyan(" StaticDataMgr", "%u Moon Resources loaded in %.3fms.", m_moonGoo.size(), (GetTimeMSeconds() - startTime));
436 
437  startTime = GetTimeMSeconds();
439  while (res->GetRow(row)) {
440  //SELECT systemSec, roidID, percent FROM roidDistribution
441  OreTypeChance oreChance = OreTypeChance();
442  oreChance.typeID = row.GetInt(1);
443  oreChance.chance = row.GetFloat(2);
444  m_oreBySecClass.emplace(row.GetText(0), oreChance);
445  }
446  sLog.Cyan(" StaticDataMgr", "%u Ore defs loaded in %.3fms.", m_oreBySecClass.size(), (GetTimeMSeconds() - startTime));
447 
448  startTime = GetTimeMSeconds();
449  //SELECT factionID, itemID FROM facSalvage
451  while (res->GetRow(row))
452  m_salvageMap.emplace(row.GetInt(0), row.GetInt(1));
453  sLog.Cyan(" StaticDataMgr", "%u salvage definitions loaded in %.3fms.", m_salvageMap.size(), (GetTimeMSeconds() - startTime));
454 
455  startTime = GetTimeMSeconds();
457  while (res->GetRow(row)) {
458  //SELECT regionID, factionID FROM mapRegions
459  m_regions.emplace(row.GetInt(0), row.GetInt(1));
460  }
461 
463  while (res->GetRow(row)) {
464  //SELECT regionID, ratFactionID FROM mapRegions WHERE ratFactionID != 0
465  m_ratRegions.emplace(row.GetInt(0), row.GetInt(1));
466  }
467  sLog.Cyan(" StaticDataMgr", "%u Region Faction Data Sets loaded in %.3fms.", (m_regions.size() + m_ratRegions.size()), (GetTimeMSeconds() - startTime));
468 
469  startTime = GetTimeMSeconds();
471  DBQueryResult* res2 = new DBQueryResult();
472  DBResultRow row2;
473  RatFactionGroups factionGroup;
474  uint16 typeCount = 0;
475  while (res->GetRow(row)) {
476  //SELECT shipClass, groupID, factionID FROM npcClassGroup
477  factionGroup.shipClass = row.GetInt(0);
478  factionGroup.groupID = (uint16)row.GetInt(1);
479  m_npcGroups.emplace(row.GetInt(2), factionGroup);
480 
481  rt_typeIDs rtt;
482  ManagerDB::GetGroupTypeIDs((uint8)row.GetInt(0), (uint16)row.GetInt(1), row.GetInt(2), *res2);
483  while (res2->GetRow(row2)) {
484  //SELECT typeID FROM invTypes WHERE groupID = %u (plus specific checks) ORDER BY typeID
485  rtt.push_back((uint16)row2.GetInt(0));
486  ++typeCount;
487  }
488  rt_groups rtg;
489  rtg.emplace((uint16)row.GetInt(1), rtt);
490  m_npcTypes.emplace((uint8)row.GetInt(0), rtg);
491  }
492 
494  while (res->GetRow(row)) {
495  //SELECT type, sub, f, af, d, c, ac, bc, bs, h, o, cf, cd, cc, cbc, cbs FROM npcSpawnClass
496  RatSpawnClass spawnClass = RatSpawnClass();
497  spawnClass.type = row.GetInt(0);
498  spawnClass.sub = row.GetInt(1);
499  spawnClass.f = row.GetInt(2);
500  spawnClass.af = row.GetInt(3);
501  spawnClass.d = row.GetInt(4);
502  spawnClass.c = row.GetInt(5);
503  spawnClass.ac = row.GetInt(6);
504  spawnClass.bc = row.GetInt(7);
505  spawnClass.bs = row.GetInt(8);
506  spawnClass.h = row.GetInt(9);
507  spawnClass.o = row.GetInt(10);
508  spawnClass.cf = row.GetInt(11);
509  spawnClass.cd = row.GetInt(12);
510  spawnClass.cc = row.GetInt(13);
511  spawnClass.cbc = row.GetInt(14);
512  spawnClass.cbs = row.GetInt(15);
513  m_npcClasses.emplace((uint8)row.GetInt(0), spawnClass);
514  }
515  sLog.Cyan(" StaticDataMgr", "%u Rat Groups, %u Rat Classes, and %u Rat Types for %u regions loaded in %.3fms.",\
516  m_npcGroups.size(), m_npcClasses.size(), typeCount, m_ratRegions.size(), (GetTimeMSeconds() - startTime));
517 
518  startTime = GetTimeMSeconds();
520  while (res->GetRow(row)) {
521  //SELECT typeID, wreckTypeID FROM invTypesToWrecks
522  m_WrecksToTypesMap[row.GetInt(0)] = row.GetInt(1);
523  }
524  sLog.Cyan(" StaticDataMgr", "%u wreck objects loaded in %.3fms.", m_WrecksToTypesMap.size(), (GetTimeMSeconds() - startTime));
525 
526  startTime = GetTimeMSeconds();
528  while (res->GetRow(row)) {
529  //SELECT npcGroupID, itemGroupID, groupDropChance FROM lootGroup
530  LootGroup lootGroup = LootGroup();
531  lootGroup.lootGroupID = row.GetInt(1);
532  lootGroup.dropChance = row.GetDouble(2);
533  m_LootGroupMap.emplace(row.GetInt(0), lootGroup);
534  }
535 
536  startTime = GetTimeMSeconds();
538  while (res->GetRow(row)) {
539  //SELECT itemGroupID, itemID, itemMetaLevel, minAmount, maxAmount FROM lootItemGroup
540  LootGroupType GroupType = LootGroupType();
541  GroupType.lootGroupID = row.GetInt(0);
542  GroupType.typeID = row.GetInt(1);
543  GroupType.metaLevel = row.GetInt(2);
544  GroupType.minQuantity = row.GetInt(3);
545  GroupType.maxQuantity = row.GetInt(4);
546  m_LootGroupTypeMap.emplace(row.GetInt(0), GroupType);
547  }
548  sLog.Cyan(" StaticDataMgr", "%u loot groups and %u loot group types loaded in %.3fms.",
549  m_LootGroupMap.size(), m_LootGroupTypeMap.size(), (GetTimeMSeconds() - startTime));
550 
551  startTime = GetTimeMSeconds();
552  uint32 locationID = 0;
554  while (res->GetRow(row)) {
555  //SELECT agentID, locationID FROM agtAgents
556  locationID = row.GetInt(1);
557  if (IsStationID(locationID)) {
558  locationID = GetStationSystem(locationID);
559  }
560  if (!IsSolarSystemID(locationID)) {
561  _log(DATA__MESSAGE, "Failed to query info: locationID %u is neither station nor system.", locationID);
562  continue;
563  }
564 
565  m_agentSystem.emplace(row.GetInt(0), locationID);
566  }
567  sLog.Cyan(" StaticDataMgr", "%u Agent Data Sets loaded in %.3fms.", m_agentSystem.size(), (GetTimeMSeconds() - startTime));
568 
569  //cleanup
570  SafeDelete(res);
571  SafeDelete(res2);
572 
573  sLog.Cyan(" StaticDataMgr", "Static Data loaded in %.3fms.", (GetTimeMSeconds() - beginTime));
574 }
575 
577 {
578  /* return info about loaded items? */
579  /*
580  * m_systemData;
581  * m_staticData;
582  *
583  */
584 }
585 
587 {
588  std::map<uint16, Inv::CatData>::const_iterator itr = m_catData.find(catID);
589  if (itr != m_catData.end())
590  into = itr->second;
591 }
592 
594 {
595  std::map<uint16, Inv::CatData>::const_iterator itr = m_catData.find(catID);
596  if (itr != m_catData.end())
597  return itr->second.name.c_str();
598 
599  _log(DATA__ERROR, "GetCategoryName() - Category %u not found in map", catID);
600  return "None";
601 }
602 
604 {
605  std::map<uint16, Inv::GrpData>::const_iterator itr = m_grpData.find(grpID);
606  if (itr != m_grpData.end())
607  into = itr->second;
608 }
609 
611 {
612  std::map<uint16, Inv::GrpData>::const_iterator itr = m_grpData.find(grpID);
613  if (itr != m_grpData.end())
614  return itr->second.name.c_str();
615 
616  _log(DATA__ERROR, "GetGroupName() - Group %u not found in map", grpID);
617  return "None";
618 }
619 
621 {
622  std::map<uint16, Inv::TypeData>::const_iterator itr = m_typeData.find(typeID);
623  if (itr != m_typeData.end())
624  into = itr->second;
625 }
626 
628 {
629  std::map<uint16, Inv::TypeData>::const_iterator itr = m_typeData.find(typeID);
630  if (itr != m_typeData.end())
631  return itr->second.name.c_str();
632 
633  _log(DATA__ERROR, "GetGroupName() - Group %u not found in map", typeID);
634  return "None";
635 }
636 
637 void StaticDataMgr::GetTypes(std::map< uint16, Inv::TypeData >& into)
638 {
639  into = m_typeData;
640 }
641 
642 
644 {
645  std::map<uint32, uint32>::iterator itr = m_agentSystem.find(agentID);
646  if (itr != m_agentSystem.end())
647  return new PyInt(itr->second);
648 
649  _log(DATA__WARNING, "Failed to query system info for agent %u: Agent not found.", agentID);
650  return new PyInt(0);
651 }
652 
653 void StaticDataMgr::GetSalvage(uint32 factionID, std::vector<uint32> &itemList) {
654  auto itr = m_salvageMap.equal_range(factionID);
655  for (auto it = itr.first; it != itr.second; ++it)
656  itemList.push_back(it->second);
657 }
658 
659 bool StaticDataMgr::GetRoidDist(const char* secClass, std::unordered_multimap<float, uint16>& roids) {
660  auto groupRange = m_oreBySecClass.equal_range(secClass);
661  for (auto it = groupRange.first; it != groupRange.second; ++it) {
662  _log(MINING__INFO, "GetRoidDist - adding %u with chance %.3f", it->second.typeID, it->second.chance);
663  roids.insert(std::pair<float, uint32>(it->second.chance, it->second.typeID));
664  }
665 
666  return !roids.empty();
667 }
668 
669 void StaticDataMgr::GetDgmTypeAttrVec(uint16 typeID, std::vector< DmgTypeAttribute >& typeAttrVec)
670 {
671  auto itr = m_typeAttrMap.equal_range(typeID);
672  for (auto it = itr.first; it != itr.second; ++it)
673  typeAttrVec.push_back(it->second);
674 }
675 
677 {
678  return (m_skills.find(typeID) != m_skills.end());
679 }
680 
682 {
683  std::map<uint16, std::string>::iterator itr = m_skills.find(skillID);
684  if (itr != m_skills.end()) {
685  name = itr->second;
686  return true;
687  }
688 
689  _log(DATA__MESSAGE, "Failed to query name for skill %u: Skill not found.", skillID);
690  return false;
691 }
692 
693 void StaticDataMgr::GetComponentData(std::map< uint16, Market::matlData >& into)
694 {
695  for (auto cur : m_components) {
697  data.typeID = cur.first;
698  data.name = cur.second;
699  into[cur.first] = data;
700  }
701 }
702 
703 void StaticDataMgr::GetMineralData(std::map< uint16, Market::matlData >& into)
704 {
705  for (auto cur : m_minerals) {
707  data.typeID = cur.first;
708  data.name = cur.second;
709  into[cur.first] = data;
710  }
711 }
712 
713 void StaticDataMgr::GetCompoundData(std::map< uint16, Market::matlData >& into)
714 {
715  for (auto cur : m_compounds) {
717  data.typeID = cur.first;
718  data.name = cur.second;
719  into[cur.first] = data;
720  }
721 }
722 
723 void StaticDataMgr::GetSalvageData(std::map< uint16, Market::matlData >& into)
724 {
725  for (auto cur : m_salvage) {
727  data.typeID = cur.first;
728  data.name = cur.second;
729  into[cur.first] = data;
730  }
731 }
732 
733 void StaticDataMgr::GetPIResourceData(std::map< uint16, Market::matlData >& into)
734 {
735  for (auto cur : m_resources) {
737  data.typeID = cur.first;
738  data.name = cur.second;
739  into[cur.first] = data;
740  }
741 }
742 
743 void StaticDataMgr::GetPICommodityData(std::map< uint16, Market::matlData >& into)
744 {
745  for (auto cur : m_commodities) {
747  data.typeID = cur.first;
748  data.name = cur.second;
749  into[cur.first] = data;
750  }
751 }
752 
753 void StaticDataMgr::GetMiscCommodityData(std::map< uint16, Market::matlData >& into)
754 {
755  for (auto cur : m_miscCommodities) {
757  data.typeID = cur.first;
758  data.name = cur.second;
759  into[cur.first] = data;
760  }
761 }
762 
763 void StaticDataMgr::GetMoonResouces(std::map<uint16, uint8>& data)
764 {
765  // make copy
766  for (auto cur : m_moonGoo)
767  data.emplace(cur.first, cur.second);
768 }
769 
771 {
772  if (groupID == 0)
773  return 0;
774  std::vector< uint16 > typeVec;
775  auto classRange = m_npcTypes.equal_range(sClass);
776  for (auto it = classRange.first; it != classRange.second; ++it) {
777  for (auto itr : it->second)
778  if (itr.first == groupID) {
779  for (auto tItr : itr.second)
780  typeVec.push_back(tItr);
781  break;
782  }
783  }
784  if (typeVec.size())
785  return typeVec.at(MakeRandomInt(0, typeVec.size()));
786 
787  _log(DATA__WARNING, "Failed to get random rat for sClass %u and groupID %u", sClass, groupID);
788  return 0;
789 }
790 
791 bool StaticDataMgr::GetNPCTypes(uint16 groupID, std::vector< uint16 >& typeVec)
792 {
793  /* this is now invalid.....
794  auto groupRange = m_npcTypes.equal_range(groupID);
795  for (auto it = groupRange.first; it != groupRange.second; ++it)
796  typeVec.push_back(it->second);
797 
798  return !typeVec.empty();
799  */
800  return false;
801 }
802 
803 bool StaticDataMgr::GetNPCGroups(uint32 factionID, std::map< uint8, uint16 >& groupMap)
804 {
805  auto groupRange = m_npcGroups.equal_range(factionID);
806  for (auto it = groupRange.first; it != groupRange.second; ++it)
807  groupMap.emplace(it->second.shipClass, it->second.groupID);
808 
809  return !groupMap.empty();
810 }
811 
812 bool StaticDataMgr::GetNPCClasses(uint8 sClass, std::vector< RatSpawnClass >& classMap)
813 {
814  auto classRange = m_npcClasses.equal_range(sClass);
815  for (auto it = classRange.first; it != classRange.second; ++it) {
816  RatSpawnClass spawnClass = RatSpawnClass();
817  spawnClass.type = it->second.type;
818  spawnClass.sub = it->second.sub;
819  spawnClass.f = it->second.f;
820  spawnClass.af = it->second.af;
821  spawnClass.d = it->second.d;
822  spawnClass.c = it->second.c;
823  spawnClass.ac = it->second.ac;
824  spawnClass.bc = it->second.bc;
825  spawnClass.bs = it->second.bs;
826  spawnClass.h = it->second.h;
827  spawnClass.o = it->second.o;
828  spawnClass.cf = it->second.cf;
829  spawnClass.cd = it->second.cd;
830  spawnClass.cc = it->second.cc;
831  spawnClass.cbc = it->second.cbc;
832  spawnClass.cbs = it->second.cbs;
833  classMap.push_back(spawnClass);
834  }
835 
836  return !classMap.empty();
837 }
838 
840 {
841  std::map<uint32, uint32>::const_iterator itr = m_WrecksToTypesMap.find(typeID);
842  if (itr != m_WrecksToTypesMap.end())
843  return itr->second;
844  return 0;
845 }
846 
847 void StaticDataMgr::GetLoot(uint32 groupID, std::vector<LootList>& lootList) {
848  double profileStartTime = GetTimeUSeconds();
849 
850  float randChance(0.0f);
851  uint8 metaLevel(0);
852  std::vector<LootGroupType> lootGrpVec;
853  lootGrpVec.clear();
854 
855  // Finds a range containing all elements whose key is k.
856  // pair<iterator, iterator> equal_range(const key_type& k)
857  auto range = m_LootGroupMap.equal_range(groupID);
858  for ( auto it = range.first; it != range.second; ++it ) {
859  // make lootMap of lootGroupID's
860  if (MakeRandomFloat(0, 1) < it->second.dropChance) {
861  randChance = MakeRandomFloat(0, 1);
862  metaLevel = 0;
863  if (randChance < 0.1) {
864  metaLevel = 4;
865  } else if (randChance < 0.25) {
866  metaLevel = 3;
867  } else if (randChance < 0.4) {
868  metaLevel = 2;
869  } else if (randChance < 0.6) {
870  metaLevel = 1;
871  }
872  /*need to figure out how to get faction loot for faction wrecks
873  * elif meta_level == 7:
874  * drop_chance = 0.15 # Faction stuff = 15%
875  * elif meta_level == 8:
876  * drop_chance = 0.15 # Faction projectiles = 15%
877  * elif meta_level == 9:
878  * drop_chance = 0.15 # Faction SB's and Missile launchers
879  */
880 
881  auto range2 = m_LootGroupTypeMap.equal_range(it->second.lootGroupID);
882  for (auto it2 = range2.first; it2 != range2.second; ++it2)
883  if (it2->second.metaLevel == metaLevel)
884  lootGrpVec.push_back(it2->second);
885 
886  if (!lootGrpVec.empty()) {
887  LootList loot_list;
888  uint16 i = MakeRandomInt(0, lootGrpVec.size());
889  loot_list.itemID = lootGrpVec[i].typeID;
890  loot_list.minDrop = lootGrpVec[i].minQuantity;
891  loot_list.maxDrop = lootGrpVec[i].maxQuantity;
892  lootList.push_back(loot_list);
893  lootGrpVec.clear();
894  }
895  }
896  }
897 
898  if (sConfig.debug.UseProfiling)
899  sProfiler.AddTime(Profile::loot, GetTimeUSeconds() - profileStartTime);
900 }
901 
903 {
904  std::map<uint16, EvERam::bpTypeData>::iterator itr = m_bpTypeData.find(typeID);
905  if (itr != m_bpTypeData.end()) {
906  tData = itr->second;
907  } else {
908  _log(DATA__MESSAGE, "Failed to query info for bpType %u: Type not found.", typeID);
909  }
910 }
911 
913 {
914  std::map<uint16, EvERam::bpTypeData>::iterator itr = m_bpProductData.find(typeID);
915  if (itr != m_bpProductData.end()) {
916  tData = itr->second;
917  return true;
918  }
919  return false;
920 }
921 
923 {
924  std::map<uint16, Inv::TypeData>::iterator itr = m_typeData.find(typeID);
925  if (itr != m_typeData.end())
926  return itr->second.isRecyclable;
927  return false;
928 }
929 
931 {
932  std::map<uint16, Inv::TypeData>::iterator itr = m_typeData.find(typeID);
933  if (itr != m_typeData.end())
934  return itr->second.isRefinable;
935  return false;
936 }
937 
938 void StaticDataMgr::GetRamReturns(uint16 typeID, int8 activityID, std::vector< EvERam::RequiredItem >& ramReqs)
939 {
940  auto itr = m_ramReq.equal_range(typeID);
941  for (auto it = itr.first; it != itr.second; ++it)
942  if ((it->second.activityID == activityID) and (it->second.extra) and !(IsSkillTypeID(it->second.requiredTypeID))) {
944  data.typeID = it->second.requiredTypeID;
945  data.quantity = it->second.quantity;
946  data.damagePerJob = it->second.damagePerJob;
947  data.isSkill = IsSkillTypeID(it->second.requiredTypeID);
948  data.extra = it->second.extra;
949  ramReqs.push_back(data);
950  }
951 }
952 
953 void StaticDataMgr::GetRamMaterials(uint16 typeID, std::vector< EvERam::RamMaterials >& ramMatls)
954 {
955  auto itr = m_ramMatl.equal_range(typeID);
956  for (auto it = itr.first; it != itr.second; ++it)
957  ramMatls.push_back(it->second);
958 }
959 
960 void StaticDataMgr::GetRamRequirements(uint16 typeID, std::vector< EvERam::RamRequirements >& ramReqs)
961 {
962  auto itr = m_ramReq.equal_range(typeID);
963  for (auto it = itr.first; it != itr.second; ++it)
964  ramReqs.push_back(it->second);
965 }
966 
967 void StaticDataMgr::GetRamRequiredItems(const uint32 typeID, const int8 activity, std::vector< EvERam::RequiredItem >& into)
968 {
969  if (activity == EvERam::Activity::Manufacturing) {
970  std::map<uint16, EvERam::bpTypeData>::iterator itr = m_bpTypeData.find(typeID);
971  if (itr != m_bpTypeData.end()) {
972  auto range = m_ramMatl.equal_range(itr->second.productTypeID);
973  for (auto it = range.first; it != range.second; ++it) {
975  data.typeID = it->second.materialTypeID;
976  data.quantity = it->second.quantity;
977  into.push_back(data);
978  }
979  }
980  }
981 
982  auto itr = m_ramReq.equal_range(typeID);
983  for (auto it = itr.first; it != itr.second; ++it)
984  if (it->second.activityID == activity) {
986  data.typeID = it->second.requiredTypeID;
987  data.quantity = it->second.quantity;
988  data.damagePerJob = it->second.damagePerJob;
989  data.isSkill = IsSkillTypeID(it->second.requiredTypeID);
990  data.extra = it->second.extra;
991  into.push_back(data);
992  }
993 }
994 
996 {
997  PyList* list = new PyList();
998  std::map<uint32, uint8>::iterator itr = m_stationCount.begin(), end = m_stationCount.end();
999  while (itr != end) {
1000  PyTuple* tuple = new PyTuple(2);
1001  tuple->SetItem(0, new PyInt(itr->first));
1002  tuple->SetItem(1, new PyInt(itr->second));
1003  list->AddItem(tuple);
1004  ++itr;
1005  }
1006  return list;
1007 }
1008 
1010 {
1011  std::map<uint32, uint8>::iterator itr = m_stationCount.find(systemID);
1012  if (itr != m_stationCount.end())
1013  return itr->second;
1014 
1015  _log(DATA__MESSAGE, "Failed to query station count for system %u: System not found.", systemID);
1016  return 0;
1017 }
1018 
1019 bool StaticDataMgr::GetStationList(uint32 systemID, std::vector< uint32 >& data)
1020 {
1021  std::map<uint32, std::vector<uint32>>::iterator itr = m_stationList.find(systemID);
1022  if (itr != m_stationList.end()) {
1023  data = itr->second;
1024  return true;
1025  }
1026  return false;
1027 }
1028 
1030 {
1031  std::map<uint32, uint32>::iterator itr = m_stationRegion.find(stationID);
1032  if (itr != m_stationRegion.end())
1033  return itr->second;
1034 
1035  _log(DATA__MESSAGE, "Failed to query region info for station %u: Station not found.", stationID);
1036  return 0;
1037 }
1038 
1040 {
1041  std::map<uint32, uint32>::iterator itr = m_stationConst.find(stationID);
1042  if (itr != m_stationConst.end())
1043  return itr->second;
1044 
1045  _log(DATA__MESSAGE, "Failed to query constellation info for station %u: Station not found.", stationID);
1046  return 0;
1047 }
1048 
1050 {
1051  std::map<uint32, uint32>::iterator itr = m_stationSystem.find(stationID);
1052  if (itr != m_stationSystem.end())
1053  return itr->second;
1054 
1055  _log(DATA__MESSAGE, "Failed to query system info for station %u: Station not found.", stationID);
1056  return 0;
1057 }
1058 
1060 {
1061  std::map<uint32, uint8>::iterator itr = m_whRegions.find(systemID);
1062  if (itr != m_whRegions.end())
1063  return itr->second;
1064 
1065  SystemManager* pSysMgr(sEntityList.FindOrBootSystem(systemID));
1066  if (pSysMgr == nullptr)
1067  return 0;
1068 
1069  itr = m_whRegions.find(pSysMgr->GetRegionID());
1070  if (itr != m_whRegions.end())
1071  return itr->second;
1072 
1073  // dont have data for systemID nor regionID...throw error and ?something else?
1074  _log(DATA__MESSAGE, "Failed to query WH Class for systemID %u: System not found.", systemID);
1075  if (IsKSpaceID(systemID))
1076  return 0;
1077  if (IsWSpaceID(systemID))
1078  return 0;
1079 
1080  return 0;
1081 }
1082 
1084 {
1085  if (IsStation(locationID)) {
1086  locationID = GetStationSystem(locationID);
1087  }
1088  if (!IsSolarSystem(locationID)) {
1089  _log(DATA__MESSAGE, "Failed to query info: locationID %u is neither station nor system.", locationID);
1090  return false;
1091  }
1092 
1093  std::map<uint32, SystemData>::iterator itr = m_systemData.find(locationID);
1094  if (itr != m_systemData.end()) {
1095  data = itr->second;
1096  return true;
1097  }
1098 
1099  _log(DATA__MESSAGE, "Failed to query info for system %u: System not found.", locationID);
1100  return false;
1101 }
1102 
1103 const char* StaticDataMgr::GetSystemName(uint32 locationID)
1104 {
1105  if (IsStation(locationID)) {
1106  locationID = GetStationSystem(locationID);
1107  }
1108  if (!IsSolarSystem(locationID)) {
1109  _log(DATA__MESSAGE, "Failed to query info: locationID %u is neither station nor system.", locationID);
1110  return "Error";
1111  }
1112 
1113  std::map<uint32, SystemData>::iterator itr = m_systemData.find(locationID);
1114  if (itr != m_systemData.end())
1115  return itr->second.name.c_str();
1116 
1117  _log(DATA__MESSAGE, "Failed to query info for system %u: System not found.", locationID);
1118  return "Invalid";
1119 }
1120 
1122 {
1123  std::map<uint32, StaticData>::iterator itr = m_staticData.find(itemID);
1124  if (itr != m_staticData.end()) {
1125  data = itr->second;
1126  return true;
1127  }
1128 
1129  _log(DATA__MESSAGE, "Failed to query info for static item %u: Item not found.", itemID);
1130  return false;
1131 }
1132 
1134 {
1135  std::map<uint32, StaticData>::iterator itr = m_staticData.find(itemID);
1136  if (itr != m_staticData.end())
1137  return itr->second.typeID;
1138  return 0;
1139 }
1140 
1142 {
1143  std::map<uint32, uint32>::iterator itr = m_regions.find(regionID);
1144  if (itr != m_regions.end())
1145  return itr->second;
1146 
1147  _log(DATA__MESSAGE, "Failed to query faction for region %u: region not found.", regionID);
1148  return 0;
1149 }
1150 
1152 {
1153  std::map<uint32, uint32>::iterator itr = m_ratRegions.find(regionID);
1154  if (itr != m_ratRegions.end())
1155  return itr->second;
1156 
1157  _log(DATA__MESSAGE, "Failed to query rat faction for region %u: region not found.", regionID);
1158  return 0;
1159 
1160 /*
1161 def GetPirateFactionsOfRegion(self, regionID):
1162 return {10000001: (500019,),
1163  10000002: (500010,),
1164  10000003: (500010,),
1165  10000005: (500011,),
1166  10000006: (500011,),
1167  10000007: (500011,),
1168  10000008: (500011,),
1169  10000009: (500011,),
1170  10000010: (500010,),
1171  10000011: (500011,),
1172  10000012: (500011,),
1173  10000014: (500019,),
1174  10000015: (500010,),
1175  10000016: (500010,),
1176  10000020: (500019,),
1177  10000022: (500019,),
1178  10000023: (500010,),
1179  10000025: (500011,),
1180  10000028: (500011,),
1181  10000029: (500010,),
1182  10000030: (500011,),
1183  10000031: (500011,),
1184  10000032: (500020,),
1185  10000033: (500010,),
1186  10000035: (500010,),
1187  10000036: (500019,),
1188  10000037: (500020,),
1189  10000038: (500012,),
1190  10000039: (500019,),
1191  10000041: (500020,),
1192  10000042: (500011,),
1193  10000043: (500019,),
1194  10000044: (500020,),
1195  10000045: (500010,),
1196  10000046: (500020,),
1197  10000047: (500019,),
1198  10000048: (500020,),
1199  10000049: (500012, 500019),
1200  10000050: (500012,),
1201  10000051: (500020,),
1202  10000052: (500012,),
1203  10000054: (500012,),
1204  10000055: (500010,),
1205  10000056: (500011,),
1206  10000057: (500020,),
1207  10000058: (500020,),
1208  10000059: (500019,),
1209  10000060: (500012,),
1210  10000061: (500011,),
1211  10000062: (500011,),
1212  10000063: (500012,),
1213  10000064: (500020,),
1214  10000065: (500012,),
1215  10000067: (500012,),
1216  10000068: (500020,)}
1217  */
1218 }
1219 
1221 {
1222  // if systemID has entry here, it is valid
1223  std::map<uint32, SystemData>::iterator itr = m_systemData.find(systemID);
1224  return (itr != m_systemData.end());
1225 }
1226 
1227 bool StaticDataMgr::IsStation(uint32 stationID/*0*/)
1228 {
1229  // if stationID has entry here, it is valid
1230  std::map<uint32, uint32>::iterator itr = m_stationRegion.find(stationID);
1231  return (itr != m_stationRegion.end());
1232 }
1233 
1235  // this is correct data for crucible. dont alter
1236  PyList *keywords = new PyList();
1237  keywords->AddItem(new_tuple(new PyString("stacksize"), new PyToken("util.StackSize")));
1238  keywords->AddItem(new_tuple(new PyString("singleton"), new PyToken("util.Singleton")));
1239  DBRowDescriptor* header = new DBRowDescriptor(keywords);
1240  header->AddColumn("itemID", DBTYPE_I8);
1241  header->AddColumn("typeID", DBTYPE_I4);
1242  header->AddColumn("ownerID", DBTYPE_I4);
1243  header->AddColumn("locationID", DBTYPE_I4);
1244  header->AddColumn("flagID", DBTYPE_I2);
1245  header->AddColumn("quantity", DBTYPE_I4);
1246  header->AddColumn("groupID", DBTYPE_I4);
1247  header->AddColumn("categoryID", DBTYPE_I4);
1248  header->AddColumn("customInfo", DBTYPE_STR);
1249  return header;
1250 }
1251 
1253 {
1254  auto itr = m_bpMatlData.find(typeID);
1255  if (itr != m_bpMatlData.end()) {
1256  PyIncRef(itr->second);
1257  itr->second->Dump(MANUF__DEBUG, " ");
1258  return itr->second;
1259  }
1260  return nullptr;
1261 }
1262 
1264 {
1265  // dunno how to do this part better...
1266  PyList* matlListManuf = new PyList();
1267  PyList* skillListManuf = new PyList();
1268  PyList* extraListManuf = new PyList();
1269  PyList* matlListTE = new PyList();
1270  PyList* skillListTE = new PyList();
1271  PyList* matlListME = new PyList();
1272  PyList* skillListME = new PyList();
1273  PyList* matlListCopy = new PyList();
1274  PyList* skillListCopy = new PyList();
1275  PyList* matlListDup = new PyList();
1276  PyList* skillListDup = new PyList();
1277  PyList* extraListDup = new PyList();
1278  PyList* matlListRE = new PyList();
1279  PyList* skillListRE = new PyList();
1280  PyList* matlListInvent = new PyList();
1281  PyList* skillListInvent = new PyList();
1282 
1283  DBRowDescriptor* header = new DBRowDescriptor();
1284  header->AddColumn( "quantity", DBTYPE_I4 );
1285  header->AddColumn( "requiredTypeID", DBTYPE_I4 );
1286  header->AddColumn( "damagePerJob", DBTYPE_R4 );
1287 
1288  // NOTE: this is for BLUEPRINTS ONLY and is always populated (ancient relic error fix)
1289  if (catID == EVEDB::invCategories::Blueprint) {
1290  // ramMaterials is only for manufacturing the bp product
1291  std::vector<EvERam::RamMaterials> ramMatls;
1292  ramMatls.clear();
1293  GetRamMaterials(prodID, ramMatls);
1294  for (auto cur : ramMatls) {
1295  PyPackedRow* row = new PyPackedRow( header );
1296  row->SetField( "quantity", new PyInt(cur.quantity));
1297  row->SetField( "requiredTypeID", new PyInt(cur.materialTypeID));
1298  row->SetField( "damagePerJob", new PyFloat(1.0f));
1299  matlListManuf->AddItem(row);
1300  }
1301  }
1302 
1303  // booleans to only set items that are populated NOTE: manuf is always populated for blueprints
1304  bool manuf(false), copy(false), invent(false), dup(false), me(false), re(false), te(false), tech(false);
1305  // get R.A.M. skills and materials for both bp typeID and product typeID
1306  // the ramRequirements table holds ALL skill/item data for all aspects of RAM per BlueprintTypeID.
1307  std::vector<EvERam::RamRequirements> ramReqs;
1308  ramReqs.clear();
1309  GetRamRequirements(typeID, ramReqs);
1310  //GetRamRequirements(prodID, ramReqs);
1311  for (auto cur : ramReqs) {
1312  PyPackedRow* row = new PyPackedRow( header );
1313  row->SetField("quantity", new PyInt(cur.quantity));
1314  row->SetField("requiredTypeID", new PyInt(cur.requiredTypeID));
1315  row->SetField("damagePerJob", new PyFloat(cur.damagePerJob));
1316 
1317  using namespace EvERam;
1318  switch(cur.activityID) {
1319  case Activity::Manufacturing: { //1
1321  manuf = true;
1322  if (IsSkillTypeID(cur.requiredTypeID)) {
1323  skillListManuf->AddItem(row);
1324  } else if (cur.extra) {
1325  extraListManuf->AddItem(row);
1326  } else {
1327  matlListManuf->AddItem(row);
1328  }
1329  } break;
1330  case Activity::ResearchTech: { //2
1331  // not used. not defined in client. no data for this activity
1332  } break;
1333  case Activity::ResearchTime: { //3
1334  te = true;
1335  if (IsSkillTypeID(cur.requiredTypeID)) {
1336  skillListTE->AddItem(row);
1337  } else {
1338  matlListTE->AddItem(row);
1339  }
1340  } break;
1341  case Activity::ResearchMaterial: { //4
1342  me = true;
1343  if (IsSkillTypeID(cur.requiredTypeID)) {
1344  skillListME->AddItem(row);
1345  } else {
1346  matlListME->AddItem(row);
1347  }
1348  } break;
1349  case Activity::Copying: { //5
1350  copy = true;
1351  if (IsSkillTypeID(cur.requiredTypeID)) {
1352  skillListCopy->AddItem(row);
1353  } else {
1354  matlListCopy->AddItem(row);
1355  }
1356  } break;
1357  case Activity::Duplicating: { //6
1358  dup = true;
1359  if (IsSkillTypeID(cur.requiredTypeID)) {
1360  skillListDup->AddItem(row);
1361  } else if (cur.extra) {
1362  extraListDup->AddItem(row);
1363  } else {
1364  matlListDup->AddItem(row);
1365  }
1366  } break;
1367  case Activity::ReverseEngineering: { //7
1368  re = true;
1369  if (IsSkillTypeID(cur.requiredTypeID)) {
1370  skillListRE->AddItem(row);
1371  } else {
1372  matlListRE->AddItem(row);
1373  }
1374  } break;
1375  case Activity::Invention: { //8
1376  invent = true;
1377  if (IsSkillTypeID(cur.requiredTypeID)) {
1378  skillListInvent->AddItem(row);
1379  } else {
1380  matlListInvent->AddItem(row);
1381  }
1382  } break;
1383  }
1384  }
1385 
1386  // this is the response. test for items populated above and create an ItemString in the dict for that item.
1387  // items not populated will not be shown in the BP info.
1388  DBQueryResult mtRes;
1389  PyRep* mtCRowSet = DBResultToCRowset(mtRes);
1390  PyDict* rsp = new PyDict();
1391  // activity '0' should stay empty
1392  //activityNone = 0
1393  //rsp->SetItem(0, new PyDict());
1394 
1395  if (manuf) { //activityManufacturing = 1
1396  PyDict* Manufacturing = new PyDict();
1397  Manufacturing->SetItemString("skills", skillListManuf);
1398  Manufacturing->SetItemString("rawMaterials", matlListManuf);
1399  CRowSet *rowset = new CRowSet( &header );
1400  PyList::const_iterator itr = extraListManuf->begin();
1401  for (; itr != extraListManuf->end(); ++itr) {
1402  PyPackedRow* from = (*itr)->AsPackedRow();
1403  PyPackedRow* into = rowset->NewRow();
1404  into->SetField((uint32)0, from->GetField(0));
1405  into->SetField((uint32)1, from->GetField(1));
1406  into->SetField((uint32)2, from->GetField(2));
1407  }
1408  Manufacturing->SetItemString("extras", rowset); // have to build a crowset for this
1409  rsp->SetItem(new PyInt(1), new PyObject("util.KeyVal", Manufacturing));
1410  }
1411  if (tech) { //activityResearchingTechnology = 2
1412  // not used. not defined in client. no data for this activity
1413  }
1414  if (te) { //activityResearchingTimeProductivity = 3
1415  PyDict* ResearchTime = new PyDict();
1416  ResearchTime->SetItemString("skills", skillListTE);
1417  ResearchTime->SetItemString("rawMaterials", matlListTE);
1418  PyIncRef(mtCRowSet);
1419  ResearchTime->SetItemString("extras", mtCRowSet);
1420  rsp->SetItem(new PyInt(3), new PyObject("util.KeyVal", ResearchTime));
1421  }
1422  if (me) { //activityResearchingMaterialProductivity = 4
1423  PyDict* ResearchMaterial = new PyDict();
1424  ResearchMaterial->SetItemString("skills", skillListME);
1425  ResearchMaterial->SetItemString("rawMaterials", matlListME);
1426  PyIncRef(mtCRowSet);
1427  ResearchMaterial->SetItemString("extras", mtCRowSet);
1428  rsp->SetItem(new PyInt(4), new PyObject("util.KeyVal", ResearchMaterial));
1429  }
1430  if (copy) { //activityCopying = 5
1431  PyDict* Copying = new PyDict();
1432  Copying->SetItemString("skills", skillListCopy);
1433  Copying->SetItemString("rawMaterials", matlListCopy);
1434  PyIncRef(mtCRowSet);
1435  Copying->SetItemString("extras", mtCRowSet);
1436  rsp->SetItem(new PyInt(5), new PyObject("util.KeyVal", Copying));
1437  }
1438  if (dup) { //activityDuplicating = 6
1439  // no longer used...updated to "copying" after RMR
1440  PyDict* Duplicating = new PyDict();
1441  Duplicating->SetItemString("skills", skillListDup);
1442  Duplicating->SetItemString("rawMaterials", matlListDup);
1443  CRowSet *rowset = new CRowSet( &header );
1444  PyList::const_iterator itr = extraListDup->begin();
1445  for (; itr != extraListDup->end(); ++itr) {
1446  PyPackedRow* from = (*itr)->AsPackedRow();
1447  PyPackedRow* into = rowset->NewRow();
1448  into->SetField((uint32)0, from->GetField(0));
1449  into->SetField((uint32)1, from->GetField(1));
1450  into->SetField((uint32)2, from->GetField(2));
1451  }
1452  Duplicating->SetItemString("extras", rowset); // have to build a crowset for this
1453  rsp->SetItem(new PyInt(6), new PyObject("util.KeyVal", Duplicating));
1454  }
1455  if (re) { //activityReverseEngineering = 7
1456  PyDict* ReverseEngineering = new PyDict();
1457  ReverseEngineering->SetItemString("skills", skillListRE);
1458  ReverseEngineering->SetItemString("rawMaterials", matlListRE);
1459  PyIncRef(mtCRowSet);
1460  ReverseEngineering->SetItemString("extras", mtCRowSet);
1461  rsp->SetItem(new PyInt(7), new PyObject("util.KeyVal", ReverseEngineering));
1462  }
1463  if (invent) { //activityInvention = 8
1464  PyDict* Invention = new PyDict();
1465  Invention->SetItemString("skills", skillListInvent);
1466  Invention->SetItemString("rawMaterials", matlListInvent);
1467  PyIncRef(mtCRowSet);
1468  Invention->SetItemString("extras", mtCRowSet);
1469  rsp->SetItem(new PyInt(8), new PyObject("util.KeyVal", Invention));
1470  }
1471 
1472  // cleanup
1473  PyDecRef(matlListManuf);
1474  PyDecRef(skillListManuf);
1475  PyDecRef(extraListManuf);
1476  PyDecRef(matlListTE);
1477  PyDecRef(skillListTE);
1478  PyDecRef(matlListME);
1479  PyDecRef(skillListME);
1480  PyDecRef(matlListCopy);
1481  PyDecRef(skillListCopy);
1482  PyDecRef(matlListDup);
1483  PyDecRef(skillListDup);
1484  PyDecRef(extraListDup);
1485  PyDecRef(matlListRE);
1486  PyDecRef(skillListRE);
1487  PyDecRef(matlListInvent);
1488  PyDecRef(skillListInvent);
1489 
1490  return rsp;
1491 }
1492 
1495 {
1496  if (ownerID == 1)
1497  return "System";
1498 
1499  return "Unknown - WIP";
1500 }
1501 
1503 {
1504  uint32 factionID = 0;
1505  std::map<uint32, uint32>::iterator itr = m_regions.find(regionID);
1506  if (itr != m_regions.end())
1507  factionID = (*itr).second;
1508 
1509  // caldari=1, minmatar=2, amarr=3, gallente=4, none=5
1510  switch (factionID) {
1511  case factionCaldari: //Caldari State
1512  case factionGuristas: //Guristas Pirates
1513  return 1;
1514  case factionMinmatar: //Minmatar Republic
1515  case factionAngel: //Angel Cartel
1516  return 2;
1517  case factionAmarr: //Amarr Empire
1518  case factionAmmatar: //Ammatar Mandate
1519  case factionKhanid: //Khanid Kingdom
1520  case factionBloodRaider: //Blood Raider Covenant
1521  case factionSanshas: //Sansha's Nation
1522  return 3;
1523  case factionGallente: //Gallente Federation
1524  case factionSerpentis: //Serpentis
1525  return 4;
1526  case factionJove: //Jove Empire
1527  case factionCONCORD: //CONCORD Assembly
1528  case factionSyndicate: //The Syndicate
1529  case factionInterBus: //The InterBus
1530  case factionORE: //ORE
1531  case factionThukker: //Thukker Tribe
1532  case factionSistersOfEVE: //Servant Sisters of EVE
1533  case factionSociety: //The Society of Conscious Thought
1534  case factionMordusLegion: //Mordu's Legion Command
1535  return 5;
1536  }
1537  // default to 'none'
1538  return 5;
1539 }
1540 
1542 {
1543  switch (factionID) {
1544  case factionAngel: return corpArchangels;
1545  case factionSanshas: return corpTruePower;
1546  case factionBloodRaider: return corpBloodRaider;
1547  case factionGuristas: return corpGuristas;
1548  case factionSerpentis: return corpSerpentis;
1549  case factionRogueDrones: return corpRogueDrones;
1550 
1551  case factionCONCORD: return corpCONCORD;
1552  case factionInterBus: return corpInterbus;
1553  case factionSociety: return corpSocietyofCT;
1555 
1556  case factionCaldari: return corpCaldariNavy;
1557  case factionORE: return corpORE;
1558  case factionAmarr: return corpAmarrNavy;
1559  case factionGallente: return corpGuristas;
1560  case factionJove: return corpJovianDirectorate;
1561  case factionAmmatar: return corpAmmatarConsulate;
1562 
1563  case factionKhanid: return corpKhanidNavy;
1564  case factionThukker: return corpThukkerMix;
1565  case factionSistersOfEVE: return corpSoE;
1566 
1567  case factionNoFaction:
1568  default: return 0;
1569 
1570  //case factionSleepers: return corpRogueDrones;
1571  //case factionMinmatar: return corp;
1572  //case factionSyndicate: return corps;
1573  }
1574 
1575  return 0;
1576 }
1577 
1579 {
1580  switch (corpID) {
1581  case corpArchangels: return "Angel Cartel";
1582  case corpTrueCreations: return "True Creations/Sansha"; // sansha's nation
1583  case corpTruePower: return "True Power/Sansha"; // sansha's nation
1584  case corpBloodRaider: return "Blood Raiders";
1585  case corpGuristas: return "Guristas";
1586  case corpSerpentis: return "Serpentis";
1587  case corpSerpentisInquest: return "Serpentis Inquest";
1588  case corpRogueDrones: return "Rogue Drones";
1589  }
1590 
1591  _log(DATA__ERROR, "Name not found for corp %u", corpID);
1592  return "Undefined - WIP";
1593 }
1594 
1596 {
1597  std::map<uint32, uint32>::iterator itr = m_corpFaction.find(corpID);
1598  if (itr != m_corpFaction.end())
1599  return itr->second;
1600 
1601  if (IsNPCCorp(corpID))
1602  _log(DATA__ERROR, "Faction not found for NPC corp %s", GetCorpName(corpID).c_str());
1603 
1604  return 0;
1605 }
1606 
1608 {
1609  switch (factionID) {
1610  case factionAngel: return "Angel Cartel";
1611  case factionSanshas: return "Sansha Nation";
1612  case factionBloodRaider: return "Blood Raiders";
1613  case factionGuristas: return "Guristas Pirates";
1614  case factionSerpentis: return "Serpentis";
1615  case factionRogueDrones: return "Drone";
1616  }
1617  return "Undefined";
1618 }
1619 
1621 {
1622  switch (raceID) {
1623  case Char::Race::Caldari: return "Caldari";
1624  case Char::Race::Minmatar: return "Minmatar";
1625  case Char::Race::Amarr: return "Amarr";
1626  case Char::Race::Gallente: return "Gallente";
1627  case Char::Race::Jove: return "Jove";
1628  case Char::Race::Pirate: return "Pirate";
1629  case Char::Race::Sleepers: return "Sleeper";
1630  case Char::Race::ORE: return "ORE";
1631  }
1632  // default to none
1633  return "Race Not Defined";
1634 }
1635 
1637 {
1638  switch (raceID) {
1639  case Char::Race::Caldari: return factionCaldari;
1641  case Char::Race::Amarr: return factionAmarr;
1643  case Char::Race::Jove: return factionJove;
1644  case Char::Race::Pirate: return factionNoFaction;
1646  case Char::Race::ORE: return factionORE;
1647  }
1648  // default to none
1649  return factionNoFaction;
1650 }
1651 
1653 {
1654  switch (factionID) {
1655  case factionCaldari: return Char::Race::Caldari;
1657  case factionAmarr: return Char::Race::Amarr;
1659  case factionJove: return Char::Race::Jove;
1660  case factionNoFaction: return Char::Race::Pirate;
1662  case factionORE: return Char::Race::ORE;
1663  case factionAmmatar: return Char::Race::Ammatar;
1664  }
1665  // default to Gallente
1666  return Char::Race::Gallente;
1667 }
1668 
1670 {
1671  switch (size) {
1672  case 0: return "Undefined";
1673  case 1: return "Small";
1674  case 2: return "Medium";
1675  case 3: return "Large";
1676  case 4: return "Capitol";
1677  }
1678  return "Undefined";
1679 }
1680 
1682 {
1683  using namespace EVEPOS;
1684  switch(state) {
1685  case ProcState::Invalid: return "Invalid";
1686  case ProcState::Unanchoring: return "Unanchoring";
1687  case ProcState::Anchoring: return "Anchoring";
1688  case ProcState::Offlining: return "Offlining";
1689  case ProcState::Onlining: return "Onlining";
1690  case ProcState::Online: return "Online";
1691  case ProcState::Operating: return "Operating";
1692  case ProcState::Reinforcing: return "Reinforcing";
1693  case ProcState::SheildReinforcing: return "SheildReinforcing";
1694  case ProcState::ArmorReinforcing: return "ArmorReinforcing";
1695  default: return "Bad State";
1696  }
1697  return "Undefined";
1698 }
1699 
1701 {
1702  return GetFlagName((EVEItemFlags)flag);
1703 }
1704 
1706 {
1707  switch (flag) {
1708  case flagNone: return "AutoFit";
1709  case flagWallet: return "Wallet";
1710  //case flagFactory: return "Factory";
1711  case flagWardrobe: return "Wardrobe";
1712  case flagHangar: return "Hangar";
1713  case flagCargoHold: return "Cargo Hold";
1714  case flagBriefcase: return "Briefcase";
1715  case flagSkill: return "Skill";
1716  case flagReward: return "Reward";
1717  case flagConnected: return "Connected";
1718  case flagDisconnected: return "Disconnected";
1719  case flagLowSlot0: return "First Low Slot";
1720  case flagLowSlot1: return "Second Low Slot";
1721  case flagLowSlot2: return "Third Low Slot";
1722  case flagLowSlot3: return "Fourth Low Slot";
1723  case flagLowSlot4: return "Fifth Low Slot";
1724  case flagLowSlot5: return "Sixth Low Slot";
1725  case flagLowSlot6: return "Seventh Low Slot";
1726  case flagLowSlot7: return "Eighth Low Slot";
1727  case flagMidSlot0: return "First Mid Slot";
1728  case flagMidSlot1: return "Second Mid Slot";
1729  case flagMidSlot2: return "Third Mid Slot";
1730  case flagMidSlot3: return "Fourth Mid Slot";
1731  case flagMidSlot4: return "Fifth Mid Slot";
1732  case flagMidSlot5: return "Sixth Mid Slot";
1733  case flagMidSlot6: return "Seventh Mid Slot";
1734  case flagMidSlot7: return "Eighth Mid Slot";
1735  case flagHiSlot0: return "First Hi Slot";
1736  case flagHiSlot1: return "Second Hi Slot";
1737  case flagHiSlot2: return "Third Hi Slot";
1738  case flagHiSlot3: return "Fourth Hi Slot";
1739  case flagHiSlot4: return "Fifth Hi Slot";
1740  case flagHiSlot5: return "Sixth Hi Slot";
1741  case flagHiSlot6: return "Seventh Hi Slot";
1742  case flagHiSlot7: return "Eighth Hi Slot";
1743  case flagFixedSlot: return "Fixed Slot";
1744  case flagFactoryBlueprint: return "Factory Blueprint";
1745  case flagFactoryMinerals: return "Factory Minerals";
1746  case flagFactoryOutput: return "Factory Output";
1747  case flagFactoryActive: return "Factory Active";
1748  //case flagPromenadeSlot1: return "PromenadeSlot1";
1749  case flagCapsule: return "Capsule";
1750  case flagPilot: return "Pilot";
1751  case flagPassenger: return "Passenger";
1752  case flagBoardingGate: return "Boarding Gate";
1753  case flagCrew: return "Crew";
1754  case flagSkillInTraining: return "Skill In Training";
1755  case flagCorpMarket: return "Corp Market";
1756  case flagLocked: return "Locked";
1757  case flagUnlocked: return "Unlocked";
1758  case flagOffice: return "Office";
1759  case flagImpounded: return "Impounded";
1760  case flagProperty: return "Property";
1761  //case flagDelivery: return "Delivery";
1762  case flagBonus: return "Bonus";
1763  case flagDroneBay: return "Drone Bay";
1764  case flagBooster: return "Booster";
1765  case flagImplant: return "Implant";
1766  case flagShipHangar: return "Ship Hangar";
1767  case flagShipOffline: return "Ship Offline";
1768  case flagRigSlot0: return "First Rig Slot";
1769  case flagRigSlot1: return "Second Rig Slot";
1770  case flagRigSlot2: return "Third Rig Slot";
1771  case flagRigSlot3: return "Fourth Rig Slot";
1772  case flagRigSlot4: return "Fifth Rig Slot";
1773  case flagRigSlot5: return "Sixth Rig Slot";
1774  case flagRigSlot6: return "Seventh Rig Slot";
1775  case flagRigSlot7: return "Eighth Rig Slot";
1776  case flagFactoryOperation: return "Factory Operation";
1777  case flagCorpHangar2: return "CorpHangar2";
1778  case flagCorpHangar3: return "CorpHangar3";
1779  case flagCorpHangar4: return "CorpHangar4";
1780  case flagCorpHangar5: return "CorpHangar5";
1781  case flagCorpHangar6: return "CorpHangar6";
1782  case flagCorpHangar7: return "CorpHangar7";
1783  case flagSecondaryStorage: return "Secondary Storage";
1784  case flagCaptainsQuarters: return "Captains Quarters";
1785  case flagWisPromenade: return "Promenade";
1786  //case flagWorldSpace: return "WorldSpace";
1787  case flagSubSystem0: return "First SubSystem";
1788  case flagSubSystem1: return "Second SubSystem";
1789  case flagSubSystem2: return "Third SubSystem";
1790  case flagSubSystem3: return "Fourth SubSystem";
1791  case flagSubSystem4: return "Fifth SubSystem";
1792  case flagSubSystem5: return "Sixth SubSystem";
1793  case flagSubSystem6: return "Seventh SubSystem";
1794  case flagSubSystem7: return "Eighth SubSystem";
1795  case flagFuelBay: return "Fuel Bay";
1796  case flagOreHold: return "Ore Hold";
1797  case flagGasHold: return "Gas Hold";
1798  case flagMineralHold: return "Mineral Hold";
1799  case flagSalvageHold: return "Salvage Hold";
1800  case flagShipHold: return "Ship Hold";
1801  case flagSmallShipHold: return "Small Ship Hold";
1802  case flagMediumShipHold: return "Medium Ship Hold";
1803  case flagLargeShipHold: return "Large Ship Hold";
1804  case flagIndustrialShipHold: return "Industrial Ship Hold";
1805  case flagAmmoHold: return "Ammunition Hold";
1806  case flagStructureActive: return "Structure Active";
1807  case flagStructureInactive: return "Structure Inactive";
1808  case flagJunkyardReprocessed: return "Junkyard Reprocessed";
1809  case flagJunkyardTrashed: return "Junkyard Trashed";
1810  case flagCommandCenterHold: return "Command Center Hold";
1811  case flagPlanetaryCommoditiesHold: return "Planetary Commodities Hold";
1812  case flagPlanetSurface: return "Planet Surface";
1813  case flagMaterialBay: return "Material Bay";
1814  case flagDustCharacterBackpack: return "DustCharacterBackpack";
1815  case flagDustCharacterBattle: return "DustCharacterBattle";
1816  case flagQuafeBay: return "Quafe Bay";
1817  case flagFleetHangar: return "Fleet Hangar";
1818  case flagResearchFacilitySlotFirst: return "ResearchFacilitySlotFirst";
1819  case flagResearchFacilitySlotLast: return "ResearchFacilitySlotLast";
1820  case flagMissile: return "Missile";
1821  case flagClone: return "Clone";
1822  case flagIllegal: return "Illegal";
1823  }
1824  return "Undefined";
1825 }
1826 
1828 {
1829  // these will need to be separated and updated after detailed salvage table is completed
1830  switch(typeID) {
1831  case 26469: // Amarr Battlecruiser Wreck
1832  case 26470: // Amarr Battleship Wreck
1833  case 26472: // Amarr Carrier Wreck
1834  case 26473: // Amarr Cruiser Wreck
1835  case 26474: // Amarr Destroyer Wreck
1836  case 26475: // Amarr Dreadnought Wreck
1837  case 26476: // Amarr Elite Battlecruiser Wreck
1838  case 26477: // Amarr Elite Battleship Wreck
1839  case 26478: // Amarr Elite Cruiser Wreck
1840  case 26479: // Amarr Elite Destroyer Wreck
1841  case 26480: // Amarr Elite Frigate Wreck
1842  case 26481: // Amarr Elite Industrial Wreck
1843  case 26482: // Amarr Elite Mining Barge Wreck
1844  case 26483: // Amarr Freighter Wreck
1845  case 26484: // Amarr Frigate Wreck
1846  case 26485: // Amarr Industrial Wreck
1847  case 26486: // Amarr Mining Barge Wreck
1848  case 26487: // Amarr Supercarrier Wreck
1849  case 26488: // Amarr Rookie ship Wreck
1850  case 26489: // Amarr Shuttle Wreck
1851  case 26490: // Amarr Titan Wreck
1852  case 27050: // Amarr Large Wreck
1853  case 27051: // Amarr Medium Wreck
1854  case 27052: // Amarr Small Wreck
1855  case 29033: // Amarr Elite Freighter Wreck
1856  case 27927: // Mission Amarr Carrier Wreck
1857  case 30822: { // Amarr Advanced Cruiser Wreck
1858  return factionAmarr;
1859  } break;
1860 
1861  case 26491: // Caldari Battlecruiser Wreck
1862  case 26492: // Caldari Battleship Wreck
1863  case 26494: // Caldari Carrier Wreck
1864  case 26495: // Caldari Cruiser Wreck
1865  case 26496: // Caldari Destroyer Wreck
1866  case 26497: // Caldari Dreadnought Wreck
1867  case 26498: // Caldari Elite Battlecruiser Wreck
1868  case 26499: // Caldari Elite Battleship Wreck
1869  case 26500: // Caldari Elite Cruiser Wreck
1870  case 26501: // Caldari Elite Destroyer Wreck
1871  case 26502: // Caldari Elite Frigate Wreck
1872  case 26503: // Caldari Elite Industrial Wreck
1873  case 26504: // Caldari Elite Mining Barge Wreck
1874  case 26505: // Caldari Freighter Wreck
1875  case 26506: // Caldari Frigate Wreck
1876  case 26507: // Caldari Industrial Wreck
1877  case 26508: // Caldari Mining Barge Wreck
1878  case 26509: // Caldari Supercarrier Wreck
1879  case 26510: // Caldari Rookie ship Wreck
1880  case 26511: // Caldari Shuttle Wreck
1881  case 26512: // Caldari Titan Wreck
1882  case 27926: // Mission Caldari Carrier Wreck
1883  case 30823: // Caldari Advanced Cruiser Wreck
1884  case 29034: // Caldari Elite Freighter Wreck
1885  case 27047: // Caldari Large Wreck
1886  case 27048: // Caldari Medium Wreck
1887  case 27049: { // Caldari Small Wreck
1888  return factionCaldari;
1889  } break;
1890 
1891  case 29035: // Gallente Elite Freighter Wreck
1892  case 30824: // Gallente Advanced Cruiser Wreck
1893  case 27929: // Mission Gallente Carrier Wreck
1894  case 27053: // Gallente Large Wreck
1895  case 27054: // Gallente Medium Wreck
1896  case 27055: // Gallente Small Wreck
1897  case 26513: // Gallente Battlecruiser Wreck
1898  case 26514: // Gallente Battleship Wreck
1899  case 26516: // Gallente Carrier Wreck
1900  case 26517: // Gallente Cruiser Wreck
1901  case 26518: // Gallente Destroyer Wreck
1902  case 26519: // Gallente Dreadnought Wreck
1903  case 26520: // Gallente Elite Battlecruiser Wreck
1904  case 26521: // Gallente Elite Battleship Wreck
1905  case 26522: // Gallente Elite Cruiser Wreck
1906  case 26523: // Gallente Elite Destroyer Wreck
1907  case 26524: // Gallente Elite Frigate Wreck
1908  case 26525: // Gallente Elite Industrial Wreck
1909  case 26526: // Gallente Elite Mining Barge Wreck
1910  case 26527: // Gallente Freighter Wreck
1911  case 26528: // Gallente Frigate Wreck
1912  case 26529: // Gallente Industrial Wreck
1913  case 26530: // Gallente Mining Barge Wreck
1914  case 26531: // Gallente Supercarrier Wreck
1915  case 26532: // Gallente Rookie ship Wreck
1916  case 26533: // Gallente Shuttle Wreck
1917  case 26534: { // Gallente Titan Wreck
1918  return factionGallente;
1919  } break;
1920 
1921  case 26535: // Minmatar Battlecruiser Wreck
1922  case 26536: // Minmatar Battleship Wreck
1923  case 26538: // Minmatar Carrier Wreck
1924  case 26539: // Minmatar Cruiser Wreck
1925  case 26540: // Minmatar Destroyer Wreck
1926  case 26541: // Minmatar Dreadnought Wreck
1927  case 26542: // Minmatar Elite Battlecruiser Wreck
1928  case 26543: // Minmatar Elite Battleship Wreck
1929  case 26544: // Minmatar Elite Cruiser Wreck
1930  case 26545: // Minmatar Elite Destroyer Wreck
1931  case 26546: // Minmatar Elite Frigate Wreck
1932  case 26547: // Minmatar Elite Industrial Wreck
1933  case 26548: // Minmatar Elite Mining Barge Wreck
1934  case 29036: // Minmatar Elite Freighter Wreck
1935  case 26549: // Minmatar Freighter Wreck
1936  case 26550: // Minmatar Frigate Wreck
1937  case 26551: // Minmatar Industrial Wreck
1938  case 26552: // Minmatar Mining Barge Wreck
1939  case 26553: // Minmatar Supercarrier Wreck
1940  case 26554: // Minmatar Rookie ship Wreck
1941  case 26555: // Minmatar Shuttle Wreck
1942  case 26556: // Minmatar Titan Wreck
1943  case 27928: // Mission Minmatar Carrier Wreck
1944  case 30825: // Minmatar Advanced Cruiser Wreck
1945  case 27041: // Minmatar Large Wreck
1946  case 27042: // Minmatar Medium Wreck
1947  case 27043: { // Minmatar Small Wreck
1948  return factionMinmatar;
1949  } break;
1950 
1951  case 26972: // Faction Drone Wreck - faction police drones
1952  case 26939: // CONCORD Large Wreck
1953  case 26940: // CONCORD Medium Wreck
1954  case 26941: { // CONCORD Small Wreck
1955  return factionCONCORD;
1956  } break;
1957 
1958  case 27044: // Khanid Large Wreck
1959  case 27045: // Khanid Medium Wreck
1960  case 27046: { // Khanid Small Wreck
1961  return factionKhanid;
1962  } break;
1963 
1964  case 27056: // Thukker Large Wreck
1965  case 27057: // Thukker Medium Wreck
1966  case 27058: { // Thukker Small Wreck
1967  return factionThukker;
1968  } break;
1969 
1970  case 27060: // Mordu Large Wreck
1971  case 27061: // Mordu Medium Wreck
1972  case 27062: { // Mordu Small Wreck
1973  return factionMordusLegion;
1974  } break;
1975 
1976  case 28603: // Rorqual Wreck
1977  case 29639: { // Orca Wreck
1978  return factionORE;
1979  } break;
1980 
1981  case 30457: // Sleeper Small Advanced Wreck
1982  case 30458: // Sleeper Medium Advanced Wreck
1983  case 30459: // Sleeper Large Wreck
1984  case 30484: // Sleeper Small Basic Wreck
1985  case 30485: // Sleeper Small Intermediate Wreck
1986  case 30492: // Sleeper Medium Basic Wreck
1987  case 30493: // Sleeper Medium Intermediate Wreck
1988  case 30494: // Sleeper Large Basic Wreck
1989  case 30495: // Sleeper Large Intermediate Wreck
1990  case 30496: { // Sleeper Large Advanced Wreck
1991  return factionSleepers;
1992  } break;
1993 
1994  case 26561: // Angel Small Wreck
1995  case 26562: // Angel Medium Wreck
1996  case 26563: // Angel Large Wreck
1997  case 26564: // Angel Small Commander Wreck
1998  case 26699: // Angel Medium Commander Wreck
1999  case 26565: // Angel Large Commander Wreck
2000  case 26566: { // Angel Officer Wreck
2001  return factionAngel;
2002  } break;
2003 
2004  case 26567: // Blood Small Wreck
2005  case 26568: // Blood Medium Wreck
2006  case 26569: // Blood Large Wreck
2007  case 26570: // Blood Small Commander Wreck
2008  case 26571: // Blood Medium Commander Wreck
2009  case 26700: // Blood Large Commander Wreck
2010  case 26572: { // Blood Officer Wreck
2011  return factionBloodRaider;
2012  } break;
2013 
2014  case 26573: // Guristas Small Wreck
2015  case 26574: // Guristas Medium Wreck
2016  case 26575: // Guristas Large Wreck
2017  case 26576: // Guristas Small Commander Wreck
2018  case 26577: // Guristas Medium Commander Wreck
2019  case 26701: // Guristas Large Commander Wreck
2020  case 26578: { // Guristas Officer Wreck
2021  return factionGuristas;
2022  } break;
2023 
2024  case 26579: // Sanshas Small Wreck
2025  case 26580: // Sanshas Medium Wreck
2026  case 26581: // Sanshas Large Wreck
2027  case 26582: // Sanshas Small Commander Wreck
2028  case 26583: // Sanshas Medium Commander Wreck
2029  case 26702: // Sanshas Large Commander Wreck
2030  case 26584: // Sanshas Officer Wreck
2031  case 3260: { // Sanshas Supercarrier Wreck
2032  return factionSanshas;
2033  } break;
2034 
2035  case 26585: // Serpentis Small Wreck
2036  case 26586: // Serpentis Medium Wreck
2037  case 26587: // Serpentis Large Wreck
2038  case 26588: // Serpentis Small Commander Wreck
2039  case 26589: // Serpentis Medium Commander Wreck
2040  case 26703: // Serpentis Large Commander Wreck
2041  case 26590: { // Serpentis Officer Wreck
2042  return factionSerpentis;
2043  } break;
2044 
2045  case 26591: // Rogue Small Wreck
2046  case 26592: // Rogue Medium Wreck
2047  case 26593: // Rogue Large Wreck
2048  case 26594: // Rogue Elite Small Wreck
2049  case 26595: // Rogue Elite Medium Wreck
2050  case 26596: // Rogue Officer Wreck
2051  case 28221: // Rogue Large Commander Wreck
2052  case 28222: // Rogue Medium Commander Wreck
2053  case 28223: { // Rogue Small Commander Wreck
2054  return factionRogueDrones;
2055  } break;
2056 
2057  // generic wrecks
2058  case 26468: // Capsule Wreck
2059  case 26557: // Frigate Wreck
2060  case 26558: // Cruiser Wreck
2061  case 26559: // Battleship Wreck
2062  case 26918: // Overseer Frigate Wreck
2063  case 26919: // Overseer Cruiser Wreck
2064  case 26920: // Overseer Battleship Wreck
2065  case 27202: // Convoy Wreck
2066  case 27286: // Pirate Drone Wreck
2067  case 26560: { // Pirate Wreck
2068  return factionUnknown;
2069  } break;
2070  }
2071 
2072  // safe default
2073  return factionUnknown;
2074 
2075  /*
2076  * 28255 : // Mission Faction Freighter Wreck
2077  * 29347: // Mission Faction Vessels Wreck
2078  * 29365: // Mission Faction Industrials Wreck
2079  */
2080 }
2081 
2082 
static void LoadFactionSolarSystems(std::map< int32, PyRep * > &into)
Definition: ManagerDB.cpp:227
Base Python wire object.
Definition: PyRep.h:66
void GetMoonResouces(std::map< uint16, uint8 > &data)
void GetType(uint16 typeID, Inv::TypeData &into)
#define sConfig
A macro for easier access to the singleton.
PyObjectEx * m_operands
unsigned __int8 uint8
Definition: eve-compat.h:46
std::map< uint16, PyDict * > m_bpMatlData
std::map< uint16, std::string > m_minerals
PyDict * GetBPMatlData(uint16 typeID)
std::map< uint16, std::string > m_skills
void GetMineralData(std::map< uint16, Market::matlData > &into)
void GetComponentData(std::map< uint16, Market::matlData > &into)
#define IsNPCCorp(itemID)
Definition: EVE_Defines.h:238
static void GetSpawnClasses(DBQueryResult &res)
Definition: ManagerDB.cpp:395
uint16 productTypeID
Definition: EVE_RAM.h:118
uint32 GetFactionCorp(uint32 factionID)
const char * GetProcStateName(int8 state)
static void GetTypeData(DBQueryResult &res)
Definition: ManagerDB.cpp:44
static void LoadCorpFactions(std::map< uint32, uint32 > &into)
Definition: ManagerDB.cpp:170
void GetRamReturns(uint16 typeID, int8 activityID, std::vector< EvERam::RequiredItem > &ramReqs)
static void GetMinerals(DBQueryResult &res)
Definition: FactoryDB.cpp:46
static PyDict * LoadNPCCorpInfo()
Definition: ManagerDB.cpp:249
const char * GetText(uint32 index) const
Definition: dbcore.h:104
std::map< uint32, std::vector< uint32 > > m_stationList
PyTuple * m_factionInfo
static void GetFactionGroups(DBQueryResult &res)
Definition: ManagerDB.cpp:390
#define _log(type, fmt,...)
Definition: logsys.h:124
float GetFloat(uint32 index) const
Definition: dbcore.cpp:682
static PyObjectEx * GetAgents()
Definition: ManagerDB.cpp:130
PyObjectEx * DBResultToCRowset(DBQueryResult &result)
Definition: EVEDBUtils.cpp:402
uint8 GetRegionQuarter(uint32 regionID)
Python string.
Definition: PyRep.h:430
int32 GetInt(uint32 index) const
Definition: dbcore.cpp:635
const char * GetGroupName(uint16 grpID)
bool allowRecycler
Definition: EVE_Inventory.h:61
std::map< uint16, std::string > m_commodities
PyObject * m_keyMap
uint8 GetWHSystemClass(uint32 systemID)
void GetCategory(uint8 catID, Inv::CatData &into)
Python's dictionary.
Definition: PyRep.h:719
std::multimap< uint8, RatSpawnClass > m_npcClasses
const char * GetSystemName(uint32 locationID)
uint16 wasteFactor
Definition: EVE_RAM.h:117
std::string GetCorpName(uint32 corpID)
uint32 factionID
static void LoadFactionSystemCounts(std::map< uint32, uint32 > &into)
Definition: ManagerDB.cpp:193
std::string name
uint32 GetUInt(uint32 index) const
Definition: dbcore.cpp:658
std::multimap< uint32, LootGroupType > m_LootGroupTypeMap
static void GetLootGroups(DBQueryResult &res)
Definition: SystemDB.cpp:322
double GetDouble(uint32 index) const
Definition: dbcore.cpp:693
bool fittableNonSingleton
Definition: EVE_Inventory.h:64
uint32 materialModifier
Definition: EVE_RAM.h:126
std::map< uint16, std::string > m_components
EVEItemFlags
Definition: EVE_Flags.h:13
std::string description
Definition: EVE_Inventory.h:90
static void GetGroupData(DBQueryResult &res)
Definition: ManagerDB.cpp:23
static bool IsRecyclable(const uint16 typeID)
Definition: FactoryDB.cpp:737
std::string name
Definition: EVE_Inventory.h:53
uint32 GetStationSystem(uint32 stationID)
static void GetComponents(DBQueryResult &res)
Definition: FactoryDB.cpp:52
uint32 researchCopyTime
Definition: EVE_RAM.h:123
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
Definition: misc.cpp:114
static void GetLootGroupTypes(DBQueryResult &res)
Definition: SystemDB.cpp:330
double dropChance
uint32 researchTechTime
Definition: EVE_RAM.h:124
void AddColumn(const char *name, DBTYPE type)
Definition: PyDatabase.cpp:96
#define sProfiler
Definition: dbcore.cpp:39
static void GetAgentLocation(DBQueryResult &res)
Definition: ManagerDB.cpp:313
static void GetWHSystemClass(DBQueryResult &res)
Definition: ManagerDB.cpp:598
Python floating point number.
Definition: PyRep.h:292
uint8 maxDrop
static void LoadFactionRaces(std::map< int32, PyRep * > &into)
Definition: ManagerDB.cpp:238
std::map< uint32, uint8 > m_stationCount
DBRowDescriptor * CreateHeader()
std::map< uint16, std::string > m_salvage
void GetDgmTypeAttrVec(uint16 typeID, std::vector< DmgTypeAttribute > &typeAttrVec)
static void GetRAMMaterials(DBQueryResult &res)
Definition: FactoryDB.cpp:76
const_iterator begin() const
Definition: PyRep.h:660
std::map< uint32, uint32 > m_stationRegion
#define sEntityList
Definition: EntityList.h:208
storage_type::const_iterator const_iterator
Definition: PyRep.h:644
std::map< uint16, rt_typeIDs > rt_groups
std::vector< uint16 > rt_typeIDs
std::map< uint16, Inv::TypeData > m_typeData
std::map< uint16, EvERam::bpTypeData > m_bpTypeData
void GetPICommodityData(std::map< uint16, Market::matlData > &into)
std::map< uint32, uint32 > m_stationSystem
std::map< uint16, uint8 > m_moonGoo
void GetSalvage(uint32 factionID, std::vector< uint32 > &itemList)
static void GetStaticData(DBQueryResult &res)
Definition: ManagerDB.cpp:306
bool GetNPCClasses(uint8 sClass, std::vector< RatSpawnClass > &classMap)
Python tuple.
Definition: PyRep.h:567
PyRep * GetStationCount()
uint32 itemID
const char * GetFlagName(uint16 flag)
static PyObject * GetNPCDivisions()
Definition: ManagerDB.cpp:269
std::string name
Definition: EVE_Inventory.h:68
signed __int8 int8
Definition: eve-compat.h:45
static bool IsRefinable(const uint16 typeID)
Definition: FactoryDB.cpp:719
std::map< uint32, SystemData > m_systemData
uint32 GetWreckID(uint32 typeID)
void GetCompoundData(std::map< uint16, Market::matlData > &into)
void GetTypes(std::map< uint16, Inv::TypeData > &into)
uint32 GetCorpFaction(uint32 corpID)
static void LoadFactionConstellations(std::map< int32, PyRep * > &into)
Definition: ManagerDB.cpp:216
static void LoadFactionRegions(std::map< int32, PyRep * > &into)
Definition: ManagerDB.cpp:205
const char * GetCategoryName(uint8 catID)
void AddItem(PyRep *i)
Definition: PyRep.h:701
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
Definition: SafeMem.h:83
std::string name
Definition: EVE_Market.h:138
void GetMiscCommodityData(std::map< uint16, Market::matlData > &into)
bool GetNPCGroups(uint32 factionID, std::map< uint8, uint16 > &groupMap)
uint32 GetRegionRatFaction(uint32 regionID)
signed __int32 int32
Definition: eve-compat.h:49
PyObject * m_entryTypes
std::multimap< std::string, OreTypeChance > m_oreBySecClass
static void GetStationCount(DBQueryResult &res)
Definition: MapDB.cpp:84
static void GetStationConstellation(DBQueryResult &res)
Definition: StationDB.cpp:169
bool GetRow(DBResultRow &into)
Definition: dbcore.cpp:552
bool GetBool(uint32 index) const
Definition: dbcore.cpp:647
uint32 marketGroupID
Definition: EVE_Inventory.h:82
uint16 portionSize
Definition: EVE_Inventory.h:81
static void GetBlueprintType(DBQueryResult &res)
Definition: FactoryDB.cpp:170
std::map< uint32, uint8 > m_whRegions
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
PyRep * GetField(size_t index) const
Definition: PyRep.h:990
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type()() itemID() copy() materialLevel()()() itemID() itemID Fits selected item to active ship() skillID(level)-gives skillID to specified level." ) COMMAND( online
static void GetStationRegion(DBQueryResult &res)
Definition: StationDB.cpp:163
Definition: gpoint.h:33
static void GetStationSystem(DBQueryResult &res)
Definition: StationDB.cpp:157
static void GetSalvageGroups(DBQueryResult &res)
Definition: ManagerDB.cpp:282
double GetTimeUSeconds()
Definition: utils_time.cpp:116
bool GetSkillName(uint16 skillID, std::string &name)
std::map< uint16, Inv::CatData > m_catData
static void GetRegionFaction(DBQueryResult &res)
Definition: ManagerDB.cpp:380
bool IsRefinable(uint16 typeID)
std::string GetFactionName(uint32 factionID)
std::multimap< uint16, DmgTypeAttribute > m_typeAttrMap
double GetTimeMSeconds()
Definition: utils_time.cpp:104
Python object.
Definition: PyRep.h:826
Python object "blue.DBRowDescriptor".
Definition: PyDatabase.h:41
PyTuple * new_tuple(int64 arg1)
Definition: PyRep.cpp:1160
PyInt * GetAgentSystemID(int32 agentID)
uint32 maxProductionLimit
Definition: EVE_RAM.h:127
void SetItem(size_t index, PyRep *object)
Stores Python object.
Definition: PyRep.h:610
void GetGroup(uint16 grpID, Inv::GrpData &into)
#define IsKSpaceID(itemID)
Definition: EVE_Defines.h:285
std::string GetOwnerName(int32 ownerID)
Python object "dbutil.CRowset".
Definition: PyDatabase.h:124
float chanceOfDuplicating
Definition: EVE_Inventory.h:83
std::map< uint16, EvERam::bpTypeData > m_bpProductData
void GetRamRequiredItems(const uint32 typeID, const int8 activity, std::vector< EvERam::RequiredItem > &into)
uint32 constellationID
uint8 minDrop
std::multimap< uint32, RatFactionGroups > m_npcGroups
uint16 GetRandRatType(uint8 sClass, uint16 groupID)
uint32 productivityModifier
Definition: EVE_RAM.h:125
Python integer.
Definition: PyRep.h:231
std::multimap< uint16, EvERam::RamMaterials > m_ramMatl
bool IsSkillTypeID(uint16 typeID)
static void GetCommodities(DBQueryResult &res)
Definition: FactoryDB.cpp:58
const char * GetRaceName(uint8 raceID)
void GetRamRequirements(uint16 typeID, std::vector< EvERam::RamRequirements > &ramReqs)
static void GetOreBySSC(DBQueryResult &res)
Definition: ManagerDB.cpp:290
bool GetStationList(uint32 systemID, std::vector< uint32 > &data)
PyPackedRow * AsPackedRow()
Definition: PyRep.h:156
uint16 parentBlueprintTypeID
Definition: EVE_RAM.h:119
static void GetTypeAttributes(DBQueryResult &res)
Definition: ManagerDB.cpp:78
void GetPIResourceData(std::map< uint16, Market::matlData > &into)
std::map< uint32, uint32 > m_WrecksToTypesMap
uint32 productionTime
Definition: EVE_RAM.h:120
uint32 GetWreckFaction(uint32 typeID)
bool IsNull(uint32 index) const
Definition: dbcore.h:102
static void LoadNPCCorpFactionData(DBQueryResult &res)
Definition: ManagerDB.cpp:86
uint8 GetFactionRace(uint32 factionID)
#define PyDecRef(op)
Definition: PyRep.h:57
PyObject * m_billTypes
std::map< uint32, uint32 > m_stationConst
#define IsSolarSystemID(itemID)
Definition: EVE_Defines.h:279
std::string description
Definition: EVE_Inventory.h:69
PyDict * SetBPMatlType(int8 catID, uint16 typeID, uint16 prodID)
unsigned __int32 uint32
Definition: eve-compat.h:50
uint32 systemID
if(sConfig.world.saveOnMove)
#define PyIncRef(op)
Definition: PyRep.h:56
uint32 researchProductivityTime
Definition: EVE_RAM.h:121
uint32 regionID
bool IsSolarSystem(uint32 systemID=0)
GPoint position
static void GetRAMRequirements(DBQueryResult &res)
Definition: FactoryDB.cpp:82
void GetLoot(uint32 groupID, std::vector< LootList > &lootList)
std::map< uint16, std::string > m_miscCommodities
std::map< uint16, Inv::GrpData > m_grpData
static PyObjectEx * GetOperands()
Definition: ManagerDB.cpp:157
const char * GetTypeName(uint16 typeID)
uint32 regionID
Python token (eg. class name).
Definition: PyRep.h:522
uint32 lootGroupID
bool IsRecyclable(uint16 typeID)
float securityRating
std::map< uint32, uint32 > m_regions
bool GetNPCTypes(uint16 groupID, std::vector< uint16 > &typeVec)
static void GetCompounds(DBQueryResult &res)
Definition: FactoryDB.cpp:40
#define IsStationID(itemID)
Definition: EVE_Defines.h:294
bool GetRoidDist(const char *secClass, std::unordered_multimap< float, uint16 > &roids)
static void GetCategoryData(DBQueryResult &res)
Definition: ManagerDB.cpp:16
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
Definition: misc.cpp:109
const char * GetRigSizeName(uint8 size)
const_iterator end() const
Definition: PyRep.h:661
uint16 GetStaticType(uint32 itemID)
static void GetGroupTypeIDs(uint8 shipClass, uint16 groupID, uint32 factionID, DBQueryResult &res)
Definition: ManagerDB.cpp:401
void GetRamMaterials(uint16 typeID, std::vector< EvERam::RamMaterials > &ramMatls)
uint32 GetRaceFaction(uint8 raceID)
static void GetResources(DBQueryResult &res)
Definition: FactoryDB.cpp:70
uint32 GetStationRegion(uint32 stationID)
static void GetSkillList(DBQueryResult &res)
Definition: ManagerDB.cpp:70
std::map< uint16, std::string > m_resources
uint32 systemID
std::map< uint32, uint32 > m_ratRegions
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)
Definition: PyRep.cpp:1031
std::string description
Definition: EVE_Inventory.h:54
PyObject * m_npcDivisions
bool GetBpDataForItem(uint16 typeID, EvERam::bpTypeData &tData)
double basePrice
Definition: EVE_Inventory.h:88
static PyObject * GetBillTypes()
Definition: ManagerDB.cpp:118
static void GetSystemData(DBQueryResult &res)
Definition: ManagerDB.cpp:296
static bool GetWrecksToTypes(DBQueryResult &res)
Definition: SystemDB.cpp:314
PyPackedRow * NewRow()
Definition: PyDatabase.cpp:132
static void GetMoonResouces(DBQueryResult &res)
Definition: ManagerDB.cpp:319
Definition: EVE_RAM.h:18
#define PySafeDecRef(op)
Definition: PyRep.h:61
std::map< uint32, StaticData > m_staticData
Packed row.
Definition: PyRep.h:961
PyObjectEx * m_agents
uint32 constellationID
static void LoadFactionStationCounts(std::map< uint32, uint32 > &into)
Definition: ManagerDB.cpp:180
uint32 GetStationConstellation(uint32 stationID)
static PyObject * GetEntryTypes()
Definition: ManagerDB.cpp:94
std::multimap< uint32, LootGroup > m_LootGroupMap
void GetBpTypeData(uint16 typeID, EvERam::bpTypeData &tData)
static void GetSalvage(DBQueryResult &res)
Definition: FactoryDB.cpp:34
std::map< uint32, uint32 > m_agentSystem
bool GetStaticInfo(uint32 itemID, StaticData &data)
void GetSalvageData(std::map< uint16, Market::matlData > &into)
std::map< uint16, std::string > m_compounds
bool allowManufacture
Definition: EVE_Inventory.h:60
uint32 GetRegionFaction(uint32 regionID)
unsigned __int16 uint16
Definition: eve-compat.h:48
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 kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state
#define IsWSpaceID(itemID)
Definition: EVE_Defines.h:282
bool IsStation(uint32 stationID=0)
std::string name
Definition: EVE_Inventory.h:89
void SetItem(PyRep *key, PyRep *value)
SetItem adds or sets a database entry.
Definition: PyRep.cpp:713
std::multimap< uint8, rt_groups > m_npcTypes
Definition: EVE_POS.h:14
static void GetMiscCommodities(DBQueryResult &res)
Definition: FactoryDB.cpp:64
std::multimap< uint16, EvERam::RamRequirements > m_ramReq
Python list.
Definition: PyRep.h:639
std::map< uint32, uint32 > m_corpFaction
std::string securityClass
static PyObject * GetKeyMap()
Definition: ManagerDB.cpp:106
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
Definition: PyRep.h:812
std::multimap< uint32, uint32 > m_salvageMap
uint32 researchMaterialTime
Definition: EVE_RAM.h:122
static void GetRegionRatFaction(DBQueryResult &res)
Definition: ManagerDB.cpp:385
bool GetSystemData(uint32 locationID, SystemData &data)
uint16 materialTypeID
Definition: EVE_RAM.h:79