#include "APICharacterDB.h"
|
| APICharacterDB () |
|
bool | GetCharacterSkillsTrained (uint32 characterID, std::vector< std::string > &skillTypeIDList, std::vector< std::string > &skillPointsList, std::vector< std::string > &skillLevelList, std::vector< std::string > &skillPublishedList) |
| ? More...
|
|
bool | GetCharacterInfo (uint32 characterID, std::vector< std::string > &charInfoList) |
| ? More...
|
|
bool | GetCharacterAttributes (uint32 characterID, std::map< std::string, std::string > &attribList) |
| ? More...
|
|
bool | GetCharacterSkillQueue (uint32 characterID, std::vector< std::string > &orderList, std::vector< std::string > &typeIdList, std::vector< std::string > &levelList, std::vector< std::string > &rankList, std::vector< std::string > &skillIdList, std::vector< std::string > &primaryAttrList, std::vector< std::string > &secondaryAttrList, std::vector< std::string > &skillPointsTrainedList) |
| ? More...
|
|
bool | GetCharacterImplants (uint32 characterID, std::map< std::string, std::string > &implantList) |
| NOT DEFINED YET. More...
|
|
bool | GetCharacterCertificates (uint32 characterID, std::vector< std::string > &certList) |
| NOT DEFINED YET. More...
|
|
bool | GetCharacterCorporationRoles (uint32 characterID, std::string roleType, std::map< std::string, std::string > &roleList) |
| NOT DEFINED YET. More...
|
|
Definition at line 31 of file APICharacterDB.h.
APICharacterDB::APICharacterDB |
( |
| ) |
|
bool APICharacterDB::GetCharacterAttributes |
( |
uint32 |
characterID, |
|
|
std::map< std::string, std::string > & |
attribList |
|
) |
| |
?
?
- Parameters
-
- Return values
-
Definition at line 170 of file APICharacterDB.cpp.
References AttrCharisma, AttrIntelligence, AttrMemory, AttrPerception, AttrWillpower, DBResultRow::GetFloat(), DBQueryResult::GetRow(), DBResultRow::GetText(), DBResultRow::GetUInt(), itoa(), sDatabase, and sLog.
Referenced by APICharacterManager::_CharacterSheet(), APICharacterManager::_SkillInTraining(), and APICharacterManager::_SkillQueue().
181 " FROM entity_attributes "
182 " WHERE itemID = %u ", characterID ))
184 sLog.Error(
"APIAccountDB::GetCharacterAttributes()",
"Cannot find characterID %u", characterID );
189 bool row_found =
false;
190 while( res.
GetRow( row ) )
202 attribList.insert( std::pair<std::string, std::string>(std::string(
itoa(
AttrCharisma)), std::string((row.
GetText(2) == NULL ?
"0" : row.
GetText(2))) ));
224 attribList.insert( std::pair<std::string, std::string>(std::string(
itoa(
AttrMemory)), std::string((row.
GetText(2) == NULL ?
"0" : row.
GetText(2))) ));
246 attribList.insert( std::pair<std::string, std::string>(std::string(
itoa(
AttrWillpower)), std::string((row.
GetText(2) == NULL ?
"0" : row.
GetText(2))) ));
252 sLog.Error(
"APIServiceDB::GetAccountIdFromUsername()",
"res.GetRow(row) failed for unknown reason." );
const char * GetText(uint32 index) const
float GetFloat(uint32 index) const
uint32 GetUInt(uint32 index) const
bool GetRow(DBResultRow &into)
#define sLog
Evaluates to a NewLog instance.
const char * itoa(int64 num)
Convers num to string.
bool APICharacterDB::GetCharacterCertificates |
( |
uint32 |
characterID, |
|
|
std::vector< std::string > & |
certList |
|
) |
| |
bool APICharacterDB::GetCharacterCorporationRoles |
( |
uint32 |
characterID, |
|
|
std::string |
roleType, |
|
|
std::map< std::string, std::string > & |
roleList |
|
) |
| |
bool APICharacterDB::GetCharacterImplants |
( |
uint32 |
characterID, |
|
|
std::map< std::string, std::string > & |
implantList |
|
) |
| |
bool APICharacterDB::GetCharacterInfo |
( |
uint32 |
characterID, |
|
|
std::vector< std::string > & |
charInfoList |
|
) |
| |
?
?
- Parameters
-
- Return values
-
Definition at line 110 of file APICharacterDB.cpp.
References DBQueryResult::GetRow(), DBResultRow::GetText(), sDatabase, and sLog.
Referenced by APICharacterManager::_CharacterSheet().
117 " character_.balance, "
118 " character_.skillPoints, "
119 " character_.corporationID, "
120 " character_.corpRole, "
121 " character_.rolesAtAll, "
122 " character_.rolesAtBase, "
123 " character_.rolesAtHQ, "
124 " character_.rolesAtOther, "
125 " character_.startDateTime, "
126 " character_.gender, "
127 " chrAncestries.ancestryName, "
128 " chrBloodlines.bloodlineName, "
129 " chrRaces.raceName, "
131 " corporation.corporationName "
133 " LEFT JOIN chrAncestries ON character_.ancestryID = chrAncestries.ancestryID "
134 " LEFT JOIN chrBloodlines ON chrAncestries.bloodlineID = chrBloodlines.bloodlineID "
135 " LEFT JOIN chrRaces ON chrBloodlines.raceID = chrRaces.raceID "
136 " LEFT JOIN entity ON entity.itemID = character_.characterID "
137 " LEFT JOIN corporation ON corporation.corporationID = character_.corporationID "
138 " WHERE character_.characterID = %u ", characterID ))
140 sLog.Error(
"APIAccountDB::GetCharacterSkillsTrained()",
"Cannot find characterID %u", characterID );
147 sLog.Error(
"APIServiceDB::GetAccountIdFromUsername()",
"res.GetRow(row) failed for unknown reason." );
151 charInfoList.push_back( std::string(row.
GetText(0)) );
152 charInfoList.push_back( std::string(row.
GetText(1)) );
153 charInfoList.push_back( std::string(row.
GetText(2)) );
154 charInfoList.push_back( std::string(row.
GetText(3)) );
155 charInfoList.push_back( std::string(row.
GetText(4)) );
156 charInfoList.push_back( std::string(row.
GetText(5)) );
157 charInfoList.push_back( std::string(row.
GetText(6)) );
158 charInfoList.push_back( std::string(row.
GetText(7)) );
159 charInfoList.push_back( std::string(row.
GetText(8)) );
160 charInfoList.push_back( std::string(row.
GetText(10)) );
161 charInfoList.push_back( std::string(row.
GetText(11)) );
162 charInfoList.push_back( std::string(row.
GetText(12)) );
163 charInfoList.push_back( std::string(row.
GetText(13)) );
164 charInfoList.push_back( std::string(row.
GetText(14)) );
165 charInfoList.push_back( std::string(row.
GetText(9)) );
const char * GetText(uint32 index) const
bool GetRow(DBResultRow &into)
#define sLog
Evaluates to a NewLog instance.
bool APICharacterDB::GetCharacterSkillQueue |
( |
uint32 |
characterID, |
|
|
std::vector< std::string > & |
orderList, |
|
|
std::vector< std::string > & |
typeIdList, |
|
|
std::vector< std::string > & |
levelList, |
|
|
std::vector< std::string > & |
rankList, |
|
|
std::vector< std::string > & |
skillIdList, |
|
|
std::vector< std::string > & |
primaryAttrList, |
|
|
std::vector< std::string > & |
secondaryAttrList, |
|
|
std::vector< std::string > & |
skillPointsTrainedList |
|
) |
| |
?
?
- Parameters
-
- Return values
-
Definition at line 259 of file APICharacterDB.cpp.
References AttrPrimaryAttribute, AttrSecondaryAttribute, AttrSkillPoints, AttrSkillTimeConstant, DBResultRow::GetFloat(), DBQueryResult::GetRow(), DBResultRow::GetText(), DBResultRow::GetUInt(), itoa(), sDatabase, and sLog.
Referenced by APICharacterManager::_SkillInTraining(), and APICharacterManager::_SkillQueue().
269 " dgmTypeAttributes.attributeID, "
270 " dgmTypeAttributes.valueInt, "
271 " dgmTypeAttributes.valueFloat, "
273 " entity_attributes.valueInt, "
274 " entity_attributes.valueFloat "
275 " FROM chrSkillQueue "
276 " LEFT JOIN dgmTypeAttributes ON dgmTypeAttributes.typeID = chrSkillQueue.typeID "
277 " LEFT JOIN entity ON entity.typeID = chrSkillQueue.typeID "
278 " LEFT JOIN entity_attributes ON entity_attributes.itemID = entity.itemID "
279 " WHERE chrSkillQueue.characterID = %u AND dgmTypeAttributes.typeID = chrSkillQueue.typeID AND "
280 " dgmTypeAttributes.attributeID IN (%u,%u,%u) AND entity.ownerID = %u AND entity_attributes.attributeID = %u ",
283 sLog.Error(
"APIAccountDB::GetCharacterSkillQueue()",
"Cannot find characterID %u", characterID );
288 bool row_found =
false;
289 uint32 prev_orderIndex = 4294967295UL;
290 while( res.
GetRow( row ) )
294 if( prev_orderIndex != row.
GetUInt(1) )
296 prev_orderIndex = row.
GetUInt(1);
297 orderList.push_back( std::string(row.
GetText(1)) );
298 typeIdList.push_back( std::string(row.
GetText(2)) );
299 levelList.push_back( std::string(row.
GetText(3)) );
300 skillIdList.push_back( std::string(row.
GetText(7)) );
307 skillPointsTrainedList.push_back( std::string((row.
GetText(8) == NULL ?
"0" : row.
GetText(8))) );
317 primaryAttrList.push_back( std::string((row.
GetText(5) == NULL ?
"0" : row.
GetText(5))) );
326 secondaryAttrList.push_back( std::string((row.
GetText(5) == NULL ?
"0" : row.
GetText(5))) );
335 rankList.push_back( std::string((row.
GetText(5) == NULL ?
"0" : row.
GetText(5))) );
341 sLog.Error(
"APIServiceDB::GetCharacterSkillQueue()",
"res.GetRow(row) failed for unknown reason." );
const char * GetText(uint32 index) const
float GetFloat(uint32 index) const
uint32 GetUInt(uint32 index) const
bool GetRow(DBResultRow &into)
#define sLog
Evaluates to a NewLog instance.
const char * itoa(int64 num)
Convers num to string.
bool APICharacterDB::GetCharacterSkillsTrained |
( |
uint32 |
characterID, |
|
|
std::vector< std::string > & |
skillTypeIDList, |
|
|
std::vector< std::string > & |
skillPointsList, |
|
|
std::vector< std::string > & |
skillLevelList, |
|
|
std::vector< std::string > & |
skillPublishedList |
|
) |
| |
?
?
- Parameters
-
- Return values
-
Definition at line 35 of file APICharacterDB.cpp.
References AttrSkillLevel, AttrSkillPoints, DBResultRow::GetBool(), DBResultRow::GetFloat(), DBQueryResult::GetRow(), DBResultRow::GetText(), DBResultRow::GetUInt(), itoa(), sDatabase, and sLog.
Referenced by APICharacterManager::_CharacterSheet().
45 " entity_attributes.attributeID, "
46 " entity_attributes.valueInt, "
47 " entity_attributes.valueFloat, "
49 " invTypes.published, "
50 " invGroups.categoryID "
52 " LEFT JOIN entity_attributes ON entity_attributes.itemID = entity.itemID "
53 " LEFT JOIN invTypes ON invTypes.typeID = entity.typeID "
54 " LEFT JOIN invGroups ON invGroups.groupID = invTypes.groupID "
55 " WHERE `ownerID` = %u AND invGroups.categoryID = 16 ", characterID ))
57 sLog.Error(
"APIAccountDB::GetCharacterSkillsTrained()",
"Cannot find characterID %u", characterID );
62 bool gotSkillPoints =
false;
63 bool gotSkillLevel =
false;
65 std::map<std::string, std::string> charInfo;
68 if( prevTypeID != row.
GetUInt(1) )
70 if( (!gotSkillPoints) && (prevTypeID != 0) )
71 skillPointsList.push_back( std::string(
"0") );
73 if( (!gotSkillLevel) && (prevTypeID != 0) )
74 skillLevelList.push_back( std::string(
"0") );
76 gotSkillPoints =
false;
77 gotSkillLevel =
false;
78 skillTypeIDList.push_back( std::string(row.
GetText(1)) );
79 skillPublishedList.push_back( std::string(
itoa(row.
GetBool(6) ? 1 : 0)) );
86 gotSkillPoints =
true;
92 skillPointsList.push_back( std::string((row.
GetText(3) == NULL ?
"0" : row.
GetText(3))) );
103 skillLevelList.push_back( std::string((row.
GetText(3) == NULL ?
"0" : row.
GetText(3))) );
const char * GetText(uint32 index) const
float GetFloat(uint32 index) const
uint32 GetUInt(uint32 index) const
bool GetRow(DBResultRow &into)
bool GetBool(uint32 index) const
#define sLog
Evaluates to a NewLog instance.
const char * itoa(int64 num)
Convers num to string.
The documentation for this class was generated from the following files: