58 " shortMaleDescription,"
59 " shortFemaleDescription "
60 " FROM chrBloodlines "
61 " WHERE bloodlineID = %u",
64 codelog(DATABASE__ERROR,
"Failed to query bloodline %u: %s.", bloodlineID, res.
error.
c_str());
70 _log(DATABASE__MESSAGE,
"No data found for bloodline %u.", bloodlineID);
93 if(!
sDatabase.RunQuery(res,
"SELECT typeID FROM bloodlineTypes WHERE bloodlineID = %u", bloodlineID)) {
94 codelog(DATABASE__ERROR,
"Failed to query bloodline %u: %s.", bloodlineID, res.
error.
c_str());
100 _log(DATABASE__MESSAGE,
"No data for bloodline %u.", bloodlineID);
104 characterTypeID = row.
GetUInt(0);
111 if(!
sDatabase.RunQuery(res,
"SELECT bloodlineID FROM bloodlineTypes WHERE typeID = %u", characterTypeID)) {
112 codelog(DATABASE__ERROR,
"Failed to query character type %u: %s.", characterTypeID, res.
error.
c_str());
118 _log(DATABASE__MESSAGE,
"No data for character type %u.", characterTypeID);
144 std::stringstream query;
145 query <<
"SELECT itemID FROM entity WHERE locationID = ";
149 query <<
" AND ownerID = " << od.
ownerID;
158 query <<
" AND ((ownerID = " << od.
ownerID <<
") OR (ownerID = " << od.
corpID <<
"))";
160 query <<
" AND ownerID = " << od.
ownerID;
168 query <<
" AND ((ownerID = " << od.
ownerID <<
") OR (ownerID = " << od.
corpID <<
"))";
170 query <<
" AND ownerID = " << od.
ownerID;
177 query <<
" ORDER BY itemID";
180 if(!
sDatabase.RunQuery(res,query.str().c_str() )) {
181 codelog(DATABASE__ERROR,
"Error in GetItemContents query for locationID %u: %s", od.
locID, res.
error.
c_str());
185 _log(DATABASE__RESULTS,
"GetItemContents: '%s' returned %u items", query.str().c_str(), res.
GetRowCount());
187 while( res.
GetRow( row ) )
188 into.push_back( row.GetUInt( 0 ) );
202 " WHERE locationID=%u"
204 itemID, (
int)flag ) )
206 codelog(DATABASE__ERROR,
"Error in GetItemContents query for item %u: %s", itemID, res.
error.
c_str());
210 _log(DATABASE__RESULTS,
"GetItemContents for item %u returned %u items", itemID, res.
GetRowCount());
212 while( res.
GetRow( row ) )
213 into.push_back( row.GetUInt( 0 ) );
227 " WHERE locationID=%u"
230 itemID, (
int)flag, ownerID ) )
232 codelog(DATABASE__ERROR,
"Error in GetItemContents query for item %u with flag %u: %s", itemID, (
int)flag, res.
error.
c_str());
236 _log(DATABASE__RESULTS,
"GetItemContents for item %u with flag %u returned %u items", itemID, flag, res.
GetRowCount());
238 while( res.
GetRow( row ) )
239 into.push_back( row.GetUInt( 0 ) );
247 sDatabase.RunQuery(err,
"DELETE FROM entity WHERE customInfo LIKE '%Position Test%'");
265 " 0 as logonMinutes,"
275 " careerSpecialityID,"
283 " FROM chrNPCCharacters AS chr"
284 " WHERE characterID = %u", characterID)) {
309 " careerSpecialityID,"
317 " FROM chrCharacters"
318 " WHERE characterID = %u", characterID))
327 _log(DATABASE__MESSAGE,
"No data found for character %u.", characterID);
370 "SELECT corporationID, locationID"
372 " WHERE agentID = %u",
375 codelog(DATABASE__ERROR,
"Failed to query corp member info of character %u: %s.", characterID, res.
error.
c_str());
380 _log(DATABASE__MESSAGE,
"No corp member info found for character %u.", characterID);
397 " grantableRolesAtBase,"
398 " grantableRolesAtHQ,"
399 " grantableRolesAtOther,"
401 " FROM chrCharacters"
402 " WHERE characterID = %u",
405 codelog(DATABASE__ERROR,
"Failed to query corp member info of character %u: %s.", characterID, res.
error.
c_str());
409 _log(DATABASE__MESSAGE,
"No corp member info found for character %u.", characterID);
436 " FROM crpCorporation"
444 _log(DATABASE__MESSAGE,
"No HQ found for character's %u corporation.", characterID);
465 " security, radius, celestialIndex, orbitIndex"
466 " FROM mapDenormalize"
467 " WHERE itemID = %u",
470 codelog(DATABASE__ERROR,
"Failed to query celestial object %u: %s.", celestialID, res.
error.
c_str());
476 _log(DATABASE__MESSAGE,
"Static Celestial object %u not found.", celestialID);
492 " LEFT JOIN invTypes USING (typeID)"
493 " WHERE entity.itemID = %u",
496 codelog(DATABASE__ERROR,
"Failed to query celestial object %u: %s.", celestialID, res.
error.
c_str());
502 _log(DATABASE__MESSAGE,
"Dynamic Celestial object %u not found.", celestialID);
523 " border, fringe, corridor, hub, international, regional, constellation,"
524 " security, factionID, radius, sunTypeID, securityClass"
525 " FROM mapSolarSystems"
526 " WHERE solarSystemID=%u", solarSystemID))
528 codelog(DATABASE__ERROR,
"Error in GetSolarSystem query for system %u: %s.", solarSystemID, res.
error.
c_str());
534 _log(DATABASE__MESSAGE,
"No data found for solar system %u.", solarSystemID);
std::string bloodlineName
const char * GetText(uint32 index) const
static bool GetCharacterTypeByBloodline(uint8 bloodlineID, uint16 &characterTypeID)
#define _log(type, fmt,...)
int32 GetInt(uint32 index) const
bool GetCelestialObject(uint32 celestialID, CelestialObjectData &into)
std::string shortDescription
uint32 GetUInt(uint32 index) const
bool GetCharacterData(uint32 characterID, CharacterData &into)
double GetDouble(uint32 index) const
std::string femaleDescription
bool GetCorpData(uint32 characterID, CorpData &into)
bool GetRow(DBResultRow &into)
bool GetBool(uint32 index) const
bool GetItemContents(OwnerData &od, std::vector< uint32 > &into)
const char * c_str() const
#define codelog(type, fmt,...)
static void DeleteTrackingCans()
bool GetSolarSystem(uint32 solarSystemID, SolarSystemData &into)
std::string maleDescription
bool IsNull(uint32 index) const
#define IsPlayerCorp(itemID)
#define IsCharacterID(itemID)
#define IsOfficeID(itemID)
std::string securityClass
#define IsStaticMapItem(itemID)
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
int64 grantableRolesAtBase
int64 GetInt64(uint32 index) const
int64 grantableRolesAtOther
bool GetCharacterType(uint8 bloodlineID, CharacterTypeData &into)
std::string shortFemaleDescription
std::string shortMaleDescription
uint32 careerSpecialityID
bool GetBloodlineByCharacterType(uint16 characterTypeID, uint8 &bloodlineID)