EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AllianceDB.cpp
Go to the documentation of this file.
1 
11 #include "Client.h"
12 #include "StaticDataMgr.h"
13 #include "character/Character.h"
14 #include "alliance/AllianceDB.h"
15 
16 void AllianceDB::AddBulletin(uint32 allyID, uint32 ownerID, uint32 cCharID, std::string &title, std::string &body)
17 {
18  DBerror err;
19  sDatabase.RunQuery(err,
20  "INSERT INTO alnBulletins (allianceID, ownerID, createCharacterID, createDateTime, editCharacterID, editDateTime, title, body)"
21  " VALUES (%u, %u, %u, %f, %u, %f, '%s', '%s')",
22  allyID, ownerID, cCharID, GetFileTimeNow(), cCharID, GetFileTimeNow(), title.c_str(), body.c_str());
23 }
24 
25 void AllianceDB::EditBulletin(uint32 bulletinID, uint32 eCharID, int64 eDataTime, std::string &title, std::string &body)
26 {
27  DBerror err;
28  sDatabase.RunQuery(err,
29  "UPDATE alnBulletins SET editCharacterID = %u, editDateTime = %li, title = '%s', body = '%s'"
30  " WHERE bulletinID = %u",
31  eCharID, eDataTime, title.c_str(), body.c_str(), bulletinID);
32 }
33 
35 {
36  DBerror err;
37  sDatabase.RunQuery(err,
38  "DELETE from alnBulletins "
39  " WHERE bulletinID = %u",
40  bulletinID);
41 }
42 
44 {
45  DBQueryResult res;
46  if (!sDatabase.RunQuery(res,
47  "SELECT allianceID, bulletinID, ownerID, createCharacterID, createDateTime, editCharacterID, editDateTime, title, body"
48  " FROM alnBulletins"
49  " WHERE allianceID = %u ",
50  allyID))
51  {
52  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
53  return nullptr;
54  }
55  return DBResultToCRowset(res);
56 }
57 
59 {
60  // called by alliance member
61  DBQueryResult res;
62  if (!sDatabase.RunQuery(res,
63  " SELECT "
64  " a.allianceID, a.allianceName, a.description, a.typeID, a.shortName, a.executorCorpID, a.creatorCorpID, "
65  " a.creatorCharID, a.startDate, a.memberCount, a.url, a.deleted, 0 as dictatorial " //Dictatorial is not used in Crucible but must be set
66  " FROM alnAlliance AS a"
67  " WHERE allianceID = %u",
68  allyID))
69  {
70  codelog(ALLY__DB_ERROR, "Error in retrieving alliance's data (%u)", allyID);
71  return nullptr;
72  }
73 
74  DBResultRow row;
75  if (!res.GetRow(row))
76  {
77  codelog(ALLY__DB_WARNING, "Unable to find alliance's data (%u)", allyID);
78  return nullptr;
79  }
80 
81  //return DBRowToRow(row);
82  return DBRowToPackedRow(row);
83  //return DBResultToRowset(res);
84 }
85 
87 {
88 
89  DBQueryResult res;
90  if (!sDatabase.RunQuery(res,
91  " SELECT applicationID, corporationID, allianceID, applicationText, "
92  " state, applicationDateTime, deleted "
93  " FROM alnApplications"
94  " WHERE corporationID = %u ",
95  corpID))
96  {
97  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
98  return nullptr;
99  }
100 
101  PyObjectEx *obj = DBResultToCIndexedRowset(res, "corporationID");
102  if (is_log_enabled(CORP__RSP_DUMP))
103  obj->Dump(CORP__RSP_DUMP, "");
104 
105  return obj;
106 }
107 
109 {
110  DBQueryResult res;
111  if (!sDatabase.RunQuery(res,
112  " SELECT applicationID, corporationID, allianceID, applicationText, "
113  " state, applicationDateTime, deleted "
114  " FROM alnApplications"
115  " WHERE allianceID = %u AND state NOT IN (%u, %u)",
117  {
118  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
119  return nullptr;
120  }
121  PyObjectEx *obj = DBResultToCIndexedRowset(res, "corporationID");
122  if (is_log_enabled(CORP__RSP_DUMP))
123  obj->Dump(CORP__RSP_DUMP, "");
124 
125  return obj;
126 }
127 
129 {
130  DBQueryResult res;
131  if (!sDatabase.RunQuery(res,
132  " SELECT applicationID, corporationID, allianceID, applicationText, "
133  " state, applicationDateTime, deleted "
134  " FROM alnApplications"
135  " WHERE corporationID = %u AND allianceID = %u",
136  corpID, allyID))
137  {
138  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
139  aInfo.valid = false;
140  return false;
141  }
142 
143  DBResultRow row;
144  if (!res.GetRow(row))
145  {
146  codelog(ALLY__DB_WARNING, "There's no previous application.");
147  aInfo.valid = false;
148  return false;
149  }
150 
151  aInfo.appID = row.GetInt(0);
152  aInfo.allyID = allyID;
153  aInfo.corpID = corpID;
154  aInfo.appText = row.GetText(3);
155  aInfo.state = row.GetInt(4);
156  aInfo.appTime = row.GetInt64(5);
157  aInfo.deleted = row.GetInt(6);
158  aInfo.valid = true;
159  return true;
160 }
161 
163 {
164  if (!aInfo.valid)
165  {
166  _log(ALLY__DB_WARNING, "InsertApplication(): aInfo contains invalid data");
167  return false;
168  }
169 
170  std::string escaped;
171  sDatabase.DoEscapeString(escaped, aInfo.appText);
172  DBerror err;
173  if (!sDatabase.RunQueryLID(err, aInfo.appID,
174  " INSERT INTO alnApplications"
175  " (corporationID, allianceID, applicationText, state, applicationDateTime)"
176  " VALUES (%u, %u, '%s', %u, %li)",
177  aInfo.corpID, aInfo.allyID, escaped.c_str(), aInfo.state, GetFileTimeNow()))
178  {
179  codelog(ALLY__DB_ERROR, "Error in query: %s", err.c_str());
180  return false;
181  }
182 
183  return true;
184 }
185 
187 {
188  if (!aInfo.valid)
189  {
190  _log(ALLY__DB_WARNING, "UpdateApplication(): info contains invalid data");
191  return false;
192  }
193 
194  DBerror err;
195  std::string escaped;
196  sDatabase.DoEscapeString(escaped, aInfo.appText);
197  if (!sDatabase.RunQuery(err,
198  " UPDATE alnApplications"
199  " SET state = %u, applicationText = '%s'"
200  " WHERE corporationID = %u and state = 1",
201  aInfo.state, escaped.c_str(), aInfo.corpID))
202  {
203  codelog(ALLY__DB_ERROR, "Error in query: %s", err.c_str());
204  return false;
205  }
206  return true;
207 }
208 
210 {
211  DBerror err;
212  if (!sDatabase.RunQuery(err,
213  " DELETE FROM alnApplications"
214  " WHERE corporationID = %u and allianceID = %u ",
215  aInfo.corpID, aInfo.allyID))
216  {
217  codelog(ALLY__DB_ERROR, "Error in query: %s", err.c_str());
218  return false;
219  }
220  return true;
221 }
222 
224 {
225  DBQueryResult res;
226  if (!sDatabase.RunQuery(res,
227  "SELECT contactID, inWatchlist, relationshipID, labelMask"
228  " FROM alnContacts WHERE ownerID = %u",
229  allyID))
230  {
231  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
232  return nullptr;
233  }
234 
235  PyObjectEx *obj = DBResultToCIndexedRowset(res, "contactID");
236  if (is_log_enabled(CORP__RSP_DUMP))
237  obj->Dump(CORP__RSP_DUMP, "");
238 
239  return obj;
240 }
241 
242 void AllianceDB::AddContact(uint32 ownerID, Call_CorporateContactData contactData)
243 {
244  DBerror err;
245  sDatabase.RunQuery(err,
246  "INSERT INTO alnContacts (ownerID, contactID, relationshipID, "
247  " inWatchlist, labelMask) VALUES "
248  " (%u, %u, %i, 0, 0) ",
249  ownerID, contactData.contactID, contactData.relationshipID);
250 }
251 
252 void AllianceDB::UpdateContact(int32 relationshipID, uint32 contactID, uint32 ownerID)
253 {
254  DBerror err;
255  sDatabase.RunQuery(err,
256  "UPDATE alnContacts SET relationshipID=%i "
257  " WHERE contactID=%u AND ownerID=%u ",
258  relationshipID, contactID, ownerID);
259 }
260 
261 void AllianceDB::RemoveContact(uint32 contactID, uint32 ownerID)
262 {
263  DBerror err;
264  sDatabase.RunQuery(err,
265  "DELETE from alnContacts "
266  " WHERE contactID=%u AND ownerID=%u ",
267  contactID, ownerID);
268 }
269 
271 {
272  DBQueryResult res;
273  if (!sDatabase.RunQuery(res, "SELECT labelID, color, name FROM alnLabels WHERE ownerID = %u", allyID))
274  {
275  codelog(DATABASE__ERROR, "Error on query: %s", res.error.c_str());
276  return nullptr;
277  }
278 
279  return DBResultToCIndexedRowset(res, "labelID");
280 }
281 
282 void AllianceDB::SetLabel(uint32 allyID, uint32 color, std::string name)
283 {
284  std::string escaped;
285  sDatabase.DoEscapeString(escaped, name);
286 
287  DBQueryResult res;
288  sDatabase.RunQuery(res, "INSERT INTO alnLabels (color, name, ownerID) VALUES (%u, '%s', %u)", color, escaped.c_str(), allyID);
289 }
290 
291 void AllianceDB::DeleteLabel(uint32 allyID, uint32 labelID)
292 {
293 }
294 
295 void AllianceDB::EditLabel(uint32 allyID, uint32 labelID, uint32 color, std::string name)
296 {
297 }
298 
300 {
301  DBerror err;
302  if (!sDatabase.RunQuery(err,
303  "INSERT INTO crpEmployment"
304  " (allianceID, corporationID, startDate)"
305  " VALUES (%u, %u, %f)",
306  allyID, corpID, GetFileTimeNow()))
307  {
308  codelog(DATABASE__ERROR, "Error in employment insert query: %s", err.c_str());
309  }
310 
311  if (!sDatabase.RunQuery(err, "UPDATE alnAlliance SET memberCount = memberCount+1 WHERE allianceID = %u", allyID))
312  codelog(ALLY__DB_ERROR, "Error in new corp member increase query: %s", err.c_str());
313  return true;
314 }
315 
317 {
318  DBQueryResult res;
319  //do we really need this order by??
320  if (!sDatabase.RunQuery(res,
321  "SELECT startDate, allianceID, deleted "
322  " FROM crpEmployment "
323  " WHERE corporationID = %u "
324  " ORDER BY startDate DESC",
325  corpID))
326  {
327  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
328  return nullptr;
329  }
330 
331  return DBResultToRowset(res);
332 }
333 
335 {
336  uint32 executorID = 0;
337  DBQueryResult res;
338  if (!sDatabase.RunQuery(res,
339  "SELECT executorCorpID FROM alnAlliance "
340  " WHERE allianceID = %u",
341  allyID))
342  {
343  codelog(DATABASE__ERROR, "Error in checking current alliance executorCorpID: %s", res.error.c_str());
344  }
345 
346  DBResultRow row;
347  while (res.GetRow(row))
348  {
349  executorID = row.GetUInt(0);
350  }
351 
352  return executorID;
353 }
354 
356 {
357 
358  uint32 executorID = GetExecutorID(allyID);
359 
360  DBerror err;
361  if (!sDatabase.RunQuery(err,
362  "UPDATE crpCorporation SET "
363  " allianceID = %u, "
364  " allianceMemberStartDate = %f, "
365  " chosenExecutorID = %u "
366  " WHERE corporationID = %u",
367  allyID, GetFileTimeNow(), executorID, corpID))
368  {
369  codelog(DATABASE__ERROR, "Error in corp alliance update query: %s", err.c_str());
370  }
371  return true;
372 }
373 
375 {
376  DBerror err;
377  if (!sDatabase.RunQuery(err,
378  "UPDATE crpCorporation SET "
379  " allianceID = 0, "
380  " allianceMemberStartDate = 0, "
381  " chosenExecutorID = 0 "
382  " WHERE corporationID = %u",
383  corpID))
384  {
385  codelog(DATABASE__ERROR, "Error in deleting corp from alliance: %s", err.c_str());
386  }
387 
388  if (!sDatabase.RunQuery(err, "UPDATE alnAlliance SET memberCount = memberCount-1 WHERE allianceID = %u", allyID))
389  codelog(ALLY__DB_ERROR, "Error in alliance member decrease query: %s", err.c_str());
390 }
391 
393 {
394  DBerror err;
395  if (!sDatabase.RunQuery(err,
396  "UPDATE crpCorporation SET "
397  " chosenExecutorID = %u "
398  " WHERE corporationID = %u",
399  chosenExecutor, corpID))
400  {
401  codelog(DATABASE__ERROR, "Error in setting chosenExecutor: %s", err.c_str());
402  }
403 }
404 
405 bool AllianceDB::IsShortNameTaken(std::string shortName)
406 {
407  DBQueryResult res;
408  sDatabase.RunQuery(res, " SELECT allianceID FROM alnAlliance WHERE shortName = '%s'", shortName.c_str());
409  return (res.GetRowCount() != 0);
410 }
411 
412 void AllianceDB::UpdateAlliance(uint32 allyID, std::string description, std::string url)
413 {
414  std::string aDesc, aURL;
415  sDatabase.DoEscapeString(aDesc, description);
416  sDatabase.DoEscapeString(aURL, url);
417 
418  DBerror err;
419 
420  if (!sDatabase.RunQuery(err,
421  " UPDATE alnAlliance "
422  " SET description='%s', url='%s' "
423  " WHERE allyID=%u ",
424  aDesc.c_str(), aURL.c_str(), allyID))
425  {
426  codelog(ALLY__DB_ERROR, "Error in UpdateAlliance query: %s", err.c_str());
427  }
428 }
429 
430 bool AllianceDB::CreateAlliance(Call_CreateAlliance &allyInfo, Client *pClient, uint32 &allyID, uint32 &corpID)
431 {
432  std::string aName, aShort, aDesc, aURL;
433  sDatabase.DoEscapeString(aName, allyInfo.allianceName);
434  sDatabase.DoEscapeString(aShort, allyInfo.shortName);
435  sDatabase.DoEscapeString(aDesc, allyInfo.description);
436  sDatabase.DoEscapeString(aURL, allyInfo.url);
437 
438  Character *pChar = pClient->GetChar().get();
439  uint32 charID = pClient->GetCharacterID();
440  corpID = pClient->GetCorporationID();
441 
442  DBerror err;
443 
444  if (!sDatabase.RunQueryLID(err, allyID,
445  " INSERT INTO alnAlliance ( "
446  " allianceName, shortName, description, executorCorpID, creatorCorpID, creatorCharID, "
447  " startDate, memberCount, url )"
448  " VALUES "
449  " ('%s', '%s', '%s', %u, %u, %u, %f, 0, '%s') ",
450  aName.c_str(), aShort.c_str(), aDesc.c_str(), corpID, corpID, charID, GetFileTimeNow(), aURL.c_str()))
451  {
452  codelog(ALLY__DB_ERROR, "Error in CreateAlliance query: %s", err.c_str());
453  return false;
454  }
455  // It has to go into the eveStaticOwners too
456  sDatabase.RunQuery(err, " INSERT INTO eveStaticOwners (ownerID,ownerName,typeID) VALUES (%u, '%s', 16159)", allyID, aName.c_str());
457 
458  return true;
459 }
460 
461 PyRep *AllianceDB::GetMembers(uint32 allyID) //to be called by member of alliance
462 {
463  //This function is called to gather all of the corporationIDs associated to a particular alliance
464  DBQueryResult res;
465  if (!sDatabase.RunQuery(res,
466  "SELECT corporationID, corporationName, chosenExecutorID "
467  " FROM crpCorporation WHERE allianceID = %u AND deleted = 0 ",
468  allyID))
469  {
470  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
471  return nullptr;
472  }
473 
474  PyObject *obj = DBResultToIndexRowset(res, "corporationID");
475  if (is_log_enabled(CORP__RSP_DUMP))
476  obj->Dump(CORP__RSP_DUMP, "");
477 
478  return obj;
479 
480  //return DBResultToIndexRowset(res);
481  //return DBResultToRowset(res);
482 }
483 
484 PyRep *AllianceDB::GetAllianceMembers(uint32 allyID) //to be called from show details pane
485 {
486  //This function is called to gather all of the corporationIDs associated to a particular alliance
487  DBQueryResult res;
488  if (!sDatabase.RunQuery(res,
489  "SELECT corporationID "
490  " FROM crpCorporation WHERE allianceID = %u AND deleted = 0",
491  allyID))
492  {
493  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
494  return nullptr;
495  }
496 
497  return DBResultToRowset(res);
498 }
499 
500 // Not sure how alliances but for now this will simply return an ordered list based upon member count
502 {
503  //This function is called to gather all of the corporationIDs associated to a particular alliance
504  DBQueryResult res;
505  if (!sDatabase.RunQuery(res,
506  "SELECT allianceID,allianceName,executorCorpID, "
507  " description, typeID, shortName, creatorCorpID, "
508  " creatorCharID, startDate, memberCount, url, deleted "
509  " from alnAlliance order by memberCount "))
510  {
511  codelog(ALLY__DB_ERROR, "Error in query: %s", res.error.c_str());
512  return nullptr;
513  }
514 
515  return DBResultToRowset(res);
516 }
517 
518 bool AllianceDB::CreateAllianceChangePacket(OnAllianceChanged &ac, uint32 oldAllyID, uint32 newAllyID)
519 {
520  // New Alliance \/
521  if (newAllyID == 0)
522  {
523  ac.allianceIDNew = PyStatic.NewNone();
524  ac.allianceNameNew = PyStatic.NewNone();
525  ac.descriptionNew = PyStatic.NewNone();
526  ac.typeIDNew = PyStatic.NewNone();
527  ac.shortNameNew = PyStatic.NewNone();
528  ac.executorCorpIDNew = PyStatic.NewNone();
529  ac.creatorCorpIDNew = PyStatic.NewNone();
530  ac.creatorCharIDNew = PyStatic.NewNone();
531  ac.startDateNew = PyStatic.NewNone();
532  ac.memberCountNew = PyStatic.NewNone();
533  ac.urlNew = PyStatic.NewNone();
534  ac.deletedNew = PyStatic.NewNone();
535  ac.dictatorialNew = PyStatic.NewNone();
536  }
537  else
538  {
539  DBQueryResult res;
540  if (!sDatabase.RunQuery(res,
541  " SELECT "
542  " a.allianceID, a.allianceName, a.description, a.typeID, a.shortName, a.executorCorpID, a.creatorCorpID, "
543  " a.creatorCharID, a.startDate, a.memberCount, a.url, a.deleted, 0 as dictatorial " //Dictatorial is not used in Crucible but must be set
544  " FROM alnAlliance AS a"
545  " WHERE allianceID = %u",
546  newAllyID))
547  {
548  codelog(ALLY__DB_ERROR, "Error in retrieving new alliance's data (%u)", newAllyID);
549  return false;
550  }
551 
552  DBResultRow row;
553  if (!res.GetRow(row))
554  {
555  codelog(ALLY__DB_WARNING, "Unable to find new alliance's data (%u)", newAllyID);
556  return false;
557  }
558 
559  ac.allianceIDNew = new PyInt(row.GetUInt(0));
560  ac.allianceNameNew = new PyString(row.GetText(1));
561  ac.descriptionNew = new PyString(row.GetText(2));
562  ac.typeIDNew = new PyInt(row.GetUInt(3));
563  ac.shortNameNew = new PyString(row.GetText(4));
564  ac.executorCorpIDNew = new PyInt(row.GetUInt(5));
565  ac.creatorCorpIDNew = new PyInt(row.GetUInt(6));
566  ac.creatorCharIDNew = new PyInt(row.GetUInt(7));
567  ac.startDateNew = new PyLong(row.GetInt64(8));
568  ac.memberCountNew = new PyInt(row.GetUInt(9));
569  ac.urlNew = new PyString(row.GetText(10));
570  ac.deletedNew = new PyInt(row.GetInt(11));
571  ac.dictatorialNew = new PyInt(row.GetInt(12));
572  }
573 
574  // Old Alliance \/
575  if (oldAllyID == 0)
576  {
577  ac.allianceIDOld = PyStatic.NewNone();
578  ac.allianceNameOld = PyStatic.NewNone();
579  ac.descriptionOld = PyStatic.NewNone();
580  ac.typeIDOld = PyStatic.NewNone();
581  ac.shortNameOld = PyStatic.NewNone();
582  ac.executorCorpIDOld = PyStatic.NewNone();
583  ac.creatorCorpIDOld = PyStatic.NewNone();
584  ac.creatorCharIDOld = PyStatic.NewNone();
585  ac.startDateOld = PyStatic.NewNone();
586  ac.memberCountOld = PyStatic.NewNone();
587  ac.urlOld = PyStatic.NewNone();
588  ac.deletedOld = PyStatic.NewNone();
589  ac.dictatorialOld = PyStatic.NewNone();
590  }
591  else
592  {
593  DBQueryResult res;
594  if (!sDatabase.RunQuery(res,
595  " SELECT "
596  " a.allianceID, a.allianceName, a.description, a.typeID, a.shortName, a.executorCorpID, a.creatorCorpID, "
597  " a.creatorCharID, a.startDate, a.memberCount, a.url, a.deleted, 0 as dictatorial " //Dictatorial is not used in Crucible but must be set
598  " FROM alnAlliance AS a"
599  " WHERE allianceID = %u",
600  oldAllyID))
601  {
602  codelog(ALLY__DB_ERROR, "Error in retrieving old alliance's data (%u)", oldAllyID);
603  return false;
604  }
605 
606  DBResultRow row;
607  if (!res.GetRow(row))
608  {
609  codelog(ALLY__DB_WARNING, "Unable to find old alliance's data (%u)", oldAllyID);
610  return false;
611  }
612  ac.allianceIDOld = new PyInt(row.GetUInt(0));
613  ac.allianceNameOld = new PyString(row.GetText(1));
614  ac.descriptionOld = new PyString(row.GetText(2));
615  ac.typeIDOld = new PyInt(row.GetUInt(3));
616  ac.shortNameOld = new PyString(row.GetText(4));
617  ac.executorCorpIDOld = new PyInt(row.GetUInt(5));
618  ac.creatorCorpIDOld = new PyInt(row.GetUInt(6));
619  ac.creatorCharIDOld = new PyInt(row.GetUInt(7));
620  ac.startDateOld = new PyLong(row.GetInt64(8));
621  ac.memberCountOld = new PyInt(row.GetUInt(9));
622  ac.urlOld = new PyString(row.GetText(10));
623  ac.deletedOld = new PyInt(row.GetInt(11));
624  ac.dictatorialOld = new PyInt(row.GetInt(12));
625  }
626 
627  return true;
628 }
Base Python wire object.
Definition: PyRep.h:66
bool DeleteApplication(const Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:209
void UpdateAlliance(uint32 allyID, std::string description, std::string url)
Definition: AllianceDB.cpp:412
#define sDatabase
Definition: dbcore.h:199
const char * GetText(uint32 index) const
Definition: dbcore.h:104
#define _log(type, fmt,...)
Definition: logsys.h:124
bool CreateAllianceChangePacket(OnAllianceChanged &ac, uint32 oldAllyID, uint32 newAllyID)
Definition: AllianceDB.cpp:518
PyObjectEx * DBResultToCRowset(DBQueryResult &result)
Definition: EVEDBUtils.cpp:402
Python string.
Definition: PyRep.h:430
int32 GetInt(uint32 index) const
Definition: dbcore.cpp:635
static void EditBulletin(uint32 bulletinID, uint32 eCharID, int64 eDataTime, std::string &title, std::string &body)
Definition: AllianceDB.cpp:25
uint32 GetUInt(uint32 index) const
Definition: dbcore.cpp:658
void DeleteMember(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:374
PyRep * GetMembers(uint32 allyID)
Definition: AllianceDB.cpp:461
int32 GetCharacterID() const
Definition: Client.h:113
int32 GetCorporationID() const
Definition: Client.h:123
bool AddEmployment(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:299
CharacterRef GetChar() const
Definition: Client.h:164
PyObjectEx * DBResultToCIndexedRowset(DBQueryResult &result, const char *key)
Definition: EVEDBUtils.cpp:419
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
Definition: PyRep.cpp:84
void DeclareExecutorSupport(uint32 corpID, uint32 chosenExecutor)
Definition: AllianceDB.cpp:392
signed __int32 int32
Definition: eve-compat.h:49
PyRep * GetAllianceMembers(uint32 allyID)
Definition: AllianceDB.cpp:484
static uint32 GetExecutorID(uint32 allyID)
Definition: AllianceDB.cpp:334
bool GetRow(DBResultRow &into)
Definition: dbcore.cpp:552
#define is_log_enabled(type)
Definition: logsys.h:78
Python extended object.
Definition: PyRep.h:861
bool UpdateCorpAlliance(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:355
bool InsertApplication(Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:162
const char * c_str() const
Definition: dbcore.h:48
Python object.
Definition: PyRep.h:826
void DeleteLabel(uint32 allyID, uint32 labelID)
Definition: AllianceDB.cpp:291
PyRep * GetRankedAlliances()
Definition: AllianceDB.cpp:501
#define codelog(type, fmt,...)
Definition: logsys.h:128
PyObject * DBResultToRowset(DBQueryResult &result)
Definition: EVEDBUtils.cpp:81
PyRep * GetLabels(uint32 allyID)
Definition: AllianceDB.cpp:270
Python integer.
Definition: PyRep.h:231
PyRep * GetBulletins(uint32 allyID)
Definition: AllianceDB.cpp:43
PyRep * GetAlliance(uint32 allyID)
Definition: AllianceDB.cpp:58
void UpdateContact(int32 relationshipID, uint32 contactID, uint32 ownerID)
Definition: AllianceDB.cpp:252
#define PyStatic
Definition: PyRep.h:1209
X * get() const
Definition: RefPtr.h:213
static void DeleteBulletin(uint32 bulletinID)
Definition: AllianceDB.cpp:34
void SetLabel(uint32 allyID, uint32 color, std::string name)
Definition: AllianceDB.cpp:282
Definition: Client.h:66
PyRep * GetApplications(uint32 allyID)
Definition: AllianceDB.cpp:108
unsigned __int32 uint32
Definition: eve-compat.h:50
void EditLabel(uint32 allyID, uint32 labelID, uint32 color, std::string name)
Definition: AllianceDB.cpp:295
PyObject * DBResultToIndexRowset(DBQueryResult &result, const char *key)
Definition: EVEDBUtils.cpp:144
PyRep * GetMyApplications(uint32 allyID)
Definition: AllianceDB.cpp:86
double GetFileTimeNow()
Definition: utils_time.cpp:84
DBerror error
Definition: dbcore.h:69
signed __int64 int64
Definition: eve-compat.h:51
PyRep * GetEmploymentRecord(uint32 corpID)
Definition: AllianceDB.cpp:316
void AddBulletin(uint32 allyID, uint32 ownerID, uint32 cCharID, std::string &title, std::string &body)
Definition: AllianceDB.cpp:16
void RemoveContact(uint32 contactID, uint32 ownerID)
Definition: AllianceDB.cpp:261
PyRep * GetContacts(uint32 allyID)
Definition: AllianceDB.cpp:223
size_t GetRowCount()
Definition: dbcore.h:72
PyPackedRow * DBRowToPackedRow(DBResultRow &row)
Definition: EVEDBUtils.cpp:453
void AddContact(uint32 ownerID, Call_CorporateContactData contactData)
Definition: AllianceDB.cpp:242
int64 GetInt64(uint32 index) const
Definition: dbcore.cpp:670
bool UpdateApplication(const Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:186
bool IsShortNameTaken(std::string shortName)
Definition: AllianceDB.cpp:405
Definition: dbcore.h:39
bool CreateAlliance(Call_CreateAlliance &allyInfo, Client *pClient, uint32 &allyID, uint32 &corpID)
Definition: AllianceDB.cpp:430
Python long integer.
Definition: PyRep.h:261
bool GetCurrentApplicationInfo(uint32 allyID, uint32 corpID, Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:128