EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SovereigntyDB Class Reference

#include "SovereigntyDB.h"

Inheritance diagram for SovereigntyDB:
Collaboration diagram for SovereigntyDB:

Static Public Member Functions

static void GetSovereigntyData (DBQueryResult &res)
 
static void GetSovereigntyDataForSystem (DBQueryResult &res, uint32 systemID)
 
static void AddSovereigntyData (SovereigntyData data, uint32 &claimID)
 
static void RemoveSovereigntyData (uint32 systemID)
 
static void SetContested (uint32 systemID, bool contested)
 
static void SetHubID (uint32 systemID, uint32 hubID)
 
static void SetJammerID (uint32 systemID, uint32 jammerID)
 
static void SetBeaconID (uint32 systemID, uint32 beaconID)
 
static void GetUpgradeData (DBQueryResult &res)
 
static void GetUpgradesForSystem (DBQueryResult &res, uint32 systemID)
 
static void AddSystemUpgrade (uint32 systemID, uint32 upgradeID)
 
static void RemoveSystemUpgrade (uint32 systemID, uint32 upgradeID)
 
- Static Public Member Functions inherited from ServiceDB
static bool GetAccountInformation (CryptoChallengePacket &ccp, AccountData &aData, std::string &failMsg)
 
static bool UpdateAccountHash (const char *username, std::string &hash)
 
static bool IncrementLoginCount (uint32 accountID)
 
static void UpdatePassword (uint32 accountID, const char *pass)
 
static void SaveKillOrLoss (CharKillData &data)
 
static bool GetConstant (const char *name, uint32 &into)
 
static void SetServerOnlineStatus (bool online=false)
 
static void SetCharacterOnlineStatus (uint32 char_id, bool online=false)
 
static void SetAccountOnlineStatus (uint32 accountID, bool online=false)
 
static void SetAccountBanStatus (uint32 accountID, bool banned=false)
 
static void SaveServerStats (double threads, float rss, float vm, float user, float kernel, uint32 items, uint32 bubbles)
 
static uint32 SetClientSeed ()
 
static PyRepLookupChars (const char *match, bool exact=false)
 
static PyRepLookupOwners (const char *match, bool exact=false)
 
static PyRepLookupCorporations (const std::string &)
 
static PyRepLookupFactions (const std::string &)
 
static PyRepLookupCorporationTickers (const std::string &)
 
static PyRepLookupStations (const std::string &)
 
static PyRepLookupKnownLocationsByGroup (const std::string &, uint32)
 
static PyRepPrimeOwners (std::vector< int32 > &itemIDs)
 
static bool ValidateAccountName (CryptoChallengePacket &ccp, std::string &failMsg)
 
static void GetCorpHangarNames (uint32 corpID, std::map< uint8, std::string > &hangarNames)
 

Additional Inherited Members

- Public Member Functions inherited from ServiceDB
uint32 GetStationOwner (uint32 stationID)
 
- Protected Member Functions inherited from ServiceDB
void ProcessStringChange (const char *key, const std::string &oldValue, std::string newValue, PyDict *notif, std::vector< std::string > &dbQ)
 
void ProcessRealChange (const char *key, double oldValue, double newValue, PyDict *notif, std::vector< std::string > &dbQ)
 
void ProcessIntChange (const char *key, uint32 oldValue, uint32 newValue, PyDict *notif, std::vector< std::string > &dbQ)
 
void ProcessLongChange (const char *key, int64 oldValue, int64 newValue, PyDict *notif, std::vector< std::string > &dbQ)
 
- Static Protected Member Functions inherited from ServiceDB
static uint32 CreateNewAccount (const char *login, const char *pass, const char *passHash, int64 role)
 

Detailed Description

Definition at line 34 of file SovereigntyDB.h.

Member Function Documentation

void SovereigntyDB::AddSovereigntyData ( SovereigntyData  data,
uint32 claimID 
)
static

Definition at line 60 of file SovereigntyDB.cpp.

References SovereigntyData::allianceID, DBerror::c_str(), SovereigntyData::claimStructureID, codelog, SovereigntyData::contested, SovereigntyData::corporationID, GetFileTimeNow(), SovereigntyData::hubID, sDatabase, and SovereigntyData::solarSystemID.

Referenced by SovereigntyDataMgr::AddSovClaim().

61 {
62  DBerror err;
63  if (!sDatabase.RunQueryLID(err, claimID,
64  "INSERT into mapSystemSovInfo (solarSystemID, corporationID, "
65  " allianceID, claimStructureID, claimTime, hubID, contested) "
66  " VALUES (%u, %u, %u, %u, %f, %u, %u)", data.solarSystemID,
67  data.corporationID, data.allianceID, data.claimStructureID,
68  GetFileTimeNow(), data.hubID, data.contested))
69  {
70  codelog(SOV__ERROR, "Error in adding new claim: %s", err.c_str());
71  }
72 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
double GetFileTimeNow()
Definition: utils_time.cpp:84
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:

static void SovereigntyDB::AddSystemUpgrade ( uint32  systemID,
uint32  upgradeID 
)
static
void SovereigntyDB::GetSovereigntyData ( DBQueryResult res)
static

Definition at line 31 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, DBQueryResult::error, and sDatabase.

Referenced by SovereigntyDataMgr::Populate().

32 {
33  if (!sDatabase.RunQuery(res,
34  "SELECT mapSystemSovInfo.solarSystemID, mapSolarSystems.constellationID, mapSolarSystems.regionID, corporationID, "
35  " allianceID, claimStructureID, claimTime, "
36  " hubID, contested, 0 as stationCount, "
37  " 5 as militaryPoints, 5 as industrialPoints, claimID, beaconID, jammerID"
38  " FROM mapSystemSovInfo "
39  " INNER JOIN mapSolarSystems ON mapSolarSystems.solarSystemID=mapSystemSovInfo.solarSystemID"))
40  {
41  codelog(SOV__ERROR, "Error in query: %s", res.error.c_str());
42  }
43 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
DBerror error
Definition: dbcore.h:69

Here is the call graph for this function:

Here is the caller graph for this function:

void SovereigntyDB::GetSovereigntyDataForSystem ( DBQueryResult res,
uint32  systemID 
)
static

Definition at line 45 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, DBQueryResult::error, and sDatabase.

Referenced by SovereigntyDataMgr::UpdateClaim().

46 {
47  if (!sDatabase.RunQuery(res,
48  "SELECT mapSystemSovInfo.solarSystemID, mapSolarSystems.constellationID, mapSolarSystems.regionID, corporationID, "
49  " allianceID, claimStructureID, claimTime, "
50  " hubID, contested, 0 as stationCount, "
51  " 5 as militaryPoints, 5 as industrialPoints, claimID, beaconID, jammerID"
52  " FROM mapSystemSovInfo "
53  " INNER JOIN mapSolarSystems ON mapSolarSystems.solarSystemID=mapSystemSovInfo.solarSystemID"
54  " WHERE mapSystemSovInfo.solarSystemID=%u ", systemID))
55  {
56  codelog(SOV__ERROR, "Error in query: %s", res.error.c_str());
57  }
58 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
DBerror error
Definition: dbcore.h:69

Here is the call graph for this function:

Here is the caller graph for this function:

static void SovereigntyDB::GetUpgradeData ( DBQueryResult res)
static
static void SovereigntyDB::GetUpgradesForSystem ( DBQueryResult res,
uint32  systemID 
)
static
void SovereigntyDB::RemoveSovereigntyData ( uint32  systemID)
static

Definition at line 74 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, and sDatabase.

Referenced by SovereigntyDataMgr::RemoveSovClaim().

75 {
76  DBerror err;
77  if (!sDatabase.RunQuery(err,
78  "DELETE from mapSystemSovInfo WHERE solarSystemID=%u", systemID))
79  {
80  codelog(SOV__ERROR, "Error in removing claim: %s", err.c_str());
81  }
82 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:

static void SovereigntyDB::RemoveSystemUpgrade ( uint32  systemID,
uint32  upgradeID 
)
static
void SovereigntyDB::SetBeaconID ( uint32  systemID,
uint32  beaconID 
)
static

Definition at line 114 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, and sDatabase.

Referenced by SovereigntyDataMgr::UpdateSystemBeaconID().

115 {
116  DBerror err;
117  if (!sDatabase.RunQuery(err,
118  "UPDATE mapSystemSovInfo SET beaconID=%u WHERE solarSystemID=%u", beaconID, systemID))
119  {
120  codelog(SOV__ERROR, "Error in changing Beacon ID: %s", err.c_str());
121  }
122 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:

void SovereigntyDB::SetContested ( uint32  systemID,
bool  contested 
)
static

Definition at line 84 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, and sDatabase.

Referenced by SovereigntyDataMgr::MarkContested().

85 {
86  DBerror err;
87  if (!sDatabase.RunQuery(err,
88  "UPDATE mapSystemSovInfo SET contested=%u WHERE solarSystemID=%u", int(contested), systemID))
89  {
90  codelog(SOV__ERROR, "Error in changing contested state: %s", err.c_str());
91  }
92 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:

void SovereigntyDB::SetHubID ( uint32  systemID,
uint32  hubID 
)
static

Definition at line 94 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, and sDatabase.

Referenced by SovereigntyDataMgr::UpdateSystemHubID().

95 {
96  DBerror err;
97  if (!sDatabase.RunQuery(err,
98  "UPDATE mapSystemSovInfo SET hubID=%u WHERE solarSystemID=%u", hubID, systemID))
99  {
100  codelog(SOV__ERROR, "Error in changing IHub ID: %s", err.c_str());
101  }
102 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:

void SovereigntyDB::SetJammerID ( uint32  systemID,
uint32  jammerID 
)
static

Definition at line 104 of file SovereigntyDB.cpp.

References DBerror::c_str(), codelog, and sDatabase.

Referenced by SovereigntyDataMgr::UpdateSystemJammerID().

105 {
106  DBerror err;
107  if (!sDatabase.RunQuery(err,
108  "UPDATE mapSystemSovInfo SET jammerID=%u WHERE solarSystemID=%u", jammerID, systemID))
109  {
110  codelog(SOV__ERROR, "Error in changing Jammer ID: %s", err.c_str());
111  }
112 }
#define sDatabase
Definition: dbcore.h:199
const char * c_str() const
Definition: dbcore.h:48
#define codelog(type, fmt,...)
Definition: logsys.h:128
Definition: dbcore.h:39

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
  • /backups/local/src/eve/EvEmu_Crucible/src/eve-server/system/sov/SovereigntyDB.h
  • /backups/local/src/eve/EvEmu_Crucible/src/eve-server/system/sov/SovereigntyDB.cpp