EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AllianceBound.cpp
Go to the documentation of this file.
1 
11 #include <string>
12 
13 #include "EVE_Corp.h"
14 #include "EVE_Mail.h"
15 #include "StaticDataMgr.h"
16 #include "account/AccountService.h"
17 #include "alliance/AllianceBound.h"
18 #include "alliance/AllianceDB.h"
19 #include "alliance/AllianceData.h"
20 #include "cache/ObjCacheService.h"
21 #include "chat/LSCService.h"
22 #include "packets/CorporationPkts.h"
24 #include "station/StationDB.h"
25 #include "station/StationDataMgr.h"
26 
27 /*
28  * ALLY__ERROR
29  * ALLY__WARNING
30  * ALLY__INFO
31  * ALLY__MESSAGE
32  * ALLY__TRACE
33  * ALLY__CALL
34  * ALLY__CALL_DUMP
35  * ALLY__RSP_DUMP
36  */
37 
38 AllianceBound::AllianceBound(PyServiceMgr *mgr, AllianceDB &db, uint32 allyID)
39  : PyBoundObject(mgr),
40  m_db(db),
41  m_dispatch(new Dispatcher(this))
42 {
43  _SetCallDispatcher(m_dispatch);
44 
45  m_strBoundObjectName = "AllianceBound";
46 
47  PyCallable_REG_CALL(AllianceBound, GetAlliance);
48  PyCallable_REG_CALL(AllianceBound, AddBulletin);
49  PyCallable_REG_CALL(AllianceBound, GetBulletins);
50  PyCallable_REG_CALL(AllianceBound, DeleteBulletin);
51  PyCallable_REG_CALL(AllianceBound, CreateLabel);
53  PyCallable_REG_CALL(AllianceBound, DeleteLabel);
55  PyCallable_REG_CALL(AllianceBound, AssignLabels);
56  PyCallable_REG_CALL(AllianceBound, RemoveLabels);
58  PyCallable_REG_CALL(AllianceBound, DeclareExecutorSupport);
59  PyCallable_REG_CALL(AllianceBound, DeleteMember);
60  PyCallable_REG_CALL(AllianceBound, GetApplications);
61  PyCallable_REG_CALL(AllianceBound, UpdateApplication);
62  PyCallable_REG_CALL(AllianceBound, AddToVoiceChat);
65  PyCallable_REG_CALL(AllianceBound, GetBillsReceivable);
66  PyCallable_REG_CALL(AllianceBound, GetAllianceContacts);
67  PyCallable_REG_CALL(AllianceBound, AddAllianceContact);
68  PyCallable_REG_CALL(AllianceBound, EditAllianceContact);
69  PyCallable_REG_CALL(AllianceBound, RemoveAllianceContacts);
70  PyCallable_REG_CALL(AllianceBound, EditContactsRelationshipID);
71  PyCallable_REG_CALL(AllianceBound, UpdateAlliance);
72 
73  m_allyID = allyID;
74 }
75 
76 PyResult AllianceBound::Handle_GetAlliance(PyCallArgs &call)
77 {
78  // Works
79  // self.members = self.GetMoniker().GetAlliance()
80  _log(ALLY__CALL, "AllianceBound::Handle_GetAlliance() size=%u", call.tuple->size());
81  call.Dump(ALLY__CALL_DUMP);
82 
83  // called by member of this alliance
84  return m_db.GetAlliance(m_allyID);
85 }
86 
87 PyResult AllianceBound::Handle_GetMembers(PyCallArgs &call)
88 {
89  // Works
90  // self.members = self.GetMoniker().GetMembers()
91  _log(ALLY__CALL, "AllianceBound::Handle_GetMembers() size=%u", call.tuple->size());
92  call.Dump(ALLY__CALL_DUMP);
93 
94  return m_db.GetMembers(m_allyID);
95 
96  return nullptr;
97 }
98 
99 PyResult AllianceBound::Handle_DeclareExecutorSupport(PyCallArgs &call)
100 {
101  // self.GetMoniker().DeclareExecutorSupport(corpID)
102  _log(ALLY__CALL, "AllianceBound::Handle_DeclareExecutorSupport() size=%u", call.tuple->size());
103  call.Dump(ALLY__CALL_DUMP);
104 
105  Call_SingleIntegerArg args;
106  if (!args.Decode(&call.tuple))
107  {
108  _log(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
109  return nullptr;
110  }
111 
113 
114  return nullptr;
115 }
116 
117 PyResult AllianceBound::Handle_DeleteMember(PyCallArgs &call)
118 {
119  // self.GetMoniker().DeleteMember(corpID)
120  _log(ALLY__CALL, "AllianceBound::Handle_DeleteMember() size=%u", call.tuple->size());
121  call.Dump(ALLY__CALL_DUMP);
122 
123  Call_SingleIntegerArg args;
124  if (!args.Decode(&call.tuple))
125  {
126  _log(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
127  return nullptr;
128  }
129 
130  m_db.DeleteMember(m_allyID, args.arg);
131 
132  return nullptr;
133 }
134 
135 PyResult AllianceBound::Handle_GetApplications(PyCallArgs &call)
136 {
137  // self.applications = self.GetMoniker().GetApplications()
138  // Get all applications to our alliance
139  _log(ALLY__CALL, "AllianceBound::Handle_GetApplications() size=%u", call.tuple->size());
140  call.Dump(ALLY__CALL_DUMP);
141 
142  return m_db.GetApplications(m_allyID);
143 
144  return nullptr;
145 }
146 
147 PyResult AllianceBound::Handle_UpdateApplication(PyCallArgs &call)
148 {
149  // return self.GetMoniker().UpdateApplication(corpID, applicationText, state)
150  _log(ALLY__CALL, "AllianceBound::Handle_UpdateApplication() size=%u", call.tuple->size());
151  call.Dump(ALLY__CALL_DUMP);
152 
153  Call_UpdateAllianceApplication args;
154  if (!args.Decode(&call.tuple))
155  {
156  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
157  return nullptr;
158  }
159  args.Dump(ALLY__TRACE);
160 
161  //We don't delay joining an alliance so we will simply change AppAccepted to AppEffective
162  if (args.applicationStatus == EveAlliance::AppStatus::AppAccepted)
163  {
164  args.applicationStatus = EveAlliance::AppStatus::AppEffective;
165  }
166 
167  //Old application info
169 
170  if (!m_db.GetCurrentApplicationInfo(m_allyID, args.corporationID, oldInfo))
171  {
172  _log(SERVICE__ERROR, "%s: Failed to query application for corp %u alliance %u", call.client->GetName(), args.corporationID, m_allyID);
173  return nullptr;
174  }
175 
176  //New application info
177  Alliance::ApplicationInfo newInfo = oldInfo;
178  newInfo.valid = true;
179  newInfo.state = args.applicationStatus;
180  if (!m_db.UpdateApplication(newInfo))
181  {
182  _log(SERVICE__ERROR, "%s: Failed to update application for corp %u alliance %u", call.client->GetName(), args.corporationID, m_allyID);
183  return nullptr;
184  }
185 
186  OnAllianceApplicationChanged oaac;
187  oaac.allianceID = newInfo.allyID;
188  oaac.corpID = newInfo.corpID;
189  FillOAApplicationChange(oaac, oldInfo, newInfo);
190 
191  //Client list for notifications
192  std::vector<Client *> list;
193 
194  //If we are accepting an application
195  if (args.applicationStatus == EveAlliance::AppStatus::AppEffective)
196  {
197  // OnAllianceMemberChanged event
198  OnAllianceMemberChange oamc;
199  oamc.allyID = newInfo.allyID;
200  oamc.corpID = newInfo.corpID;
201  FillOAMemberChange(oamc, oldInfo, newInfo);
202 
203  //Send to everyone who needs to see it in the applying corp and in the alliance executor corp
204  uint32 executorID = AllianceDB::GetExecutorID(newInfo.allyID);
205 
206  list.clear();
207  sEntityList.GetCorpClients(list, oamc.corpID);
208  for (auto cur : list)
209  {
210  if (cur != nullptr)
211  {
212  cur->SendNotification("OnAllianceMemberChanged", "clientID", oamc.Encode(), false);
213  _log(ALLY__TRACE, "OnAllianceMemberChanged sent to %s (%u)", cur->GetName(), cur->GetCharID());
214  }
215  }
216 
217  list.clear();
218  sEntityList.GetCorpClients(list, executorID);
219  for (auto cur : list)
220  {
221  if (cur != nullptr)
222  {
223  cur->SendNotification("OnAllianceMemberChanged", "clientID", oamc.Encode(), false);
224  _log(ALLY__TRACE, "OnAllianceMemberChanged sent to %s (%u)", cur->GetName(), cur->GetCharID());
225  }
226  }
227 
228  // call to db.AddCorporation() will update eveStaticOwners with new corp
229  PyString *cache_name = new PyString("config.StaticOwners");
231  PySafeDecRef(cache_name);
232 
233  // join corporation to alliance
234  if (!m_db.UpdateCorpAlliance(m_allyID, args.corporationID))
235  {
236  codelog(SERVICE__ERROR, "Alliance join failed.");
237  return nullptr;
238  }
239 
240  // Add alliance membership record to corporation
241  if (!m_db.AddEmployment(m_allyID, args.corporationID))
242  {
243  codelog(SERVICE__ERROR, "Add corp employment failed.");
244  return nullptr;
245  }
246 
247  // Send an evemail to the corporation in question that the application has been accepted
248  std::string subject = "Application to alliance accepted";
249  std::string message = "Your alliance application has been accepted.";
250  subject += call.client->GetName();
251  std::vector<int32> recipients;
252  recipients.push_back(CorporationDB::GetCorporationCEO(args.corporationID));
254 
255  //Send OnAllianceChanged packet
256  OnAllianceChanged ac;
257  ac.allianceID = m_allyID;
259  {
260  codelog(SERVICE__ERROR, "Failed to create OnAllianceChanged notification stream.");
261  call.client->SendErrorMsg("Unable to notify about alliance change.");
262  return nullptr;
263  }
264 
265  //Send to everyone who needs to see it in the applying corp
266  list.clear();
267  sEntityList.GetCorpClients(list, args.corporationID);
268  for (auto cur : list)
269  {
270  if (cur != nullptr)
271  {
272  cur->SendNotification("OnAllianceChanged", "clientID", ac.Encode(), false);
273  _log(ALLY__TRACE, "OnAllianceChanged sent to %s (%u)", cur->GetName(), cur->GetCharID());
274  }
275  }
276  }
277 
278  else if (args.applicationStatus == EveAlliance::AppStatus::AppRejected)
279  {
280  _log(ALLY__TRACE, "Application of %u:%u has been rejected, sending notification...", m_allyID, args.corporationID);
281  }
282 
283  else
284  {
285  _log(SERVICE__ERROR, "%s: Sent unhandled status %u ", call.client->GetName(), args.applicationStatus);
286  }
287 
288  //Send to everyone who needs to see it in the applying corp and in the alliance executor corp
289  uint32 executorID = AllianceDB::GetExecutorID(oaac.allianceID);
290 
291  list.clear();
292  sEntityList.GetCorpClients(list, oaac.corpID);
293  for (auto cur : list)
294  {
295  if (cur != nullptr)
296  {
297  cur->SendNotification("OnAllianceApplicationChanged", "clientID", oaac.Encode(), false);
298  _log(ALLY__TRACE, "OnAllianceApplicationChanged sent to %s (%u)", cur->GetName(), cur->GetCharID());
299  }
300  }
301 
302  list.clear();
303  sEntityList.GetCorpClients(list, executorID);
304  for (auto cur : list)
305  {
306  if (cur != nullptr)
307  {
308  cur->SendNotification("OnAllianceApplicationChanged", "clientID", oaac.Encode(), false);
309  _log(ALLY__TRACE, "OnAllianceApplicationChanged sent to %s (%u)", cur->GetName(), cur->GetCharID());
310  }
311  }
312 
313  return nullptr;
314 }
315 
317 {
318  if (Old.valid)
319  {
320  OAAC.applicationIDOld = new PyInt(Old.appID);
321  OAAC.applicationTextOld = new PyString(Old.appText);
322  OAAC.corporationIDOld = new PyInt(Old.corpID);
323  OAAC.allianceIDOld = new PyInt(Old.allyID);
324  OAAC.stateOld = new PyInt(Old.state);
325  OAAC.applicationDateTimeOld = new PyLong(Old.appTime);
326  if (Old.deleted == true)
327  {
328  OAAC.deletedOld = new PyBool(true);
329  }
330  }
331  if (New.valid)
332  {
333  OAAC.applicationIDNew = new PyInt(New.appID);
334  OAAC.applicationTextNew = new PyString(New.appText);
335  OAAC.corporationIDNew = new PyInt(New.corpID);
336  OAAC.allianceIDNew = new PyInt(New.allyID);
337  OAAC.stateNew = new PyInt(New.state);
338  OAAC.applicationDateTimeNew = new PyLong(New.appTime);
339  if (New.deleted == true)
340  {
341  OAAC.deletedNew = new PyBool(true);
342  }
343  }
344 }
345 
347 {
348  if (Old.valid)
349  {
350  oamc.corporationIDOld = new PyInt(Old.corpID);
351  oamc.corporationNameOld = new PyString(CorporationDB::GetCorpName(Old.corpID));
352  oamc.chosenExecutorIDOld = new PyInt(AllianceDB::GetExecutorID(Old.allyID));
353  }
354  if (New.valid)
355  {
356  oamc.corporationIDNew = new PyInt(New.corpID);
357  oamc.corporationNameNew = new PyString(CorporationDB::GetCorpName(New.corpID));
358  oamc.chosenExecutorIDNew = new PyInt(AllianceDB::GetExecutorID(New.allyID));
359  }
360 }
361 
362 
363 PyResult AllianceBound::Handle_AddToVoiceChat(PyCallArgs &call)
364 {
365  // success = moniker.GetAlliance().AddToVoiceChat(vivoxChannelName)
366  _log(ALLY__CALL, "AllianceBound::Handle_AddToVoiceChat() size=%u", call.tuple->size());
367  call.Dump(ALLY__CALL_DUMP);
368  return nullptr;
369 }
370 
371 PyResult AllianceBound::Handle_PayBill(PyCallArgs &call)
372 {
373  // return self.GetMoniker().PayBill(billID, fromAccountKey)
374  _log(ALLY__CALL, "AllianceBound::Handle_PayBill() size=%u", call.tuple->size());
375  call.Dump(ALLY__CALL_DUMP);
376 
377  return nullptr;
378 }
379 
380 PyResult AllianceBound::Handle_GetBillBalance(PyCallArgs &call)
381 {
382  // return self.GetMoniker().GetBillBalance(billID)
383  _log(ALLY__CALL, "AllianceBound::Handle_GetBillBalance() size=%u", call.tuple->size());
384  call.Dump(ALLY__CALL_DUMP);
385 
386  return nullptr;
387 }
388 
389 PyResult AllianceBound::Handle_GetBills(PyCallArgs &call)
390 {
391  // return self.GetMoniker().GetBills()
392  _log(ALLY__CALL, "AllianceBound::Handle_GetBills() size=%u", call.tuple->size());
393  call.Dump(ALLY__CALL_DUMP);
394 
395  return nullptr;
396 }
397 
398 PyResult AllianceBound::Handle_GetBillsReceivable(PyCallArgs &call)
399 {
400  // return self.GetMoniker().GetBillsReceivable()
401  _log(ALLY__CALL, "AllianceBound::Handle_GetBillsReceivable() size=%u", call.tuple->size());
402  call.Dump(ALLY__CALL_DUMP);
403 
404  return nullptr;
405 }
406 
407 PyResult AllianceBound::Handle_AddBulletin(PyCallArgs &call)
408 {
409  // sm.GetService('alliance').GetMoniker().AddBulletin(title, body)
410  // sm.GetService('alliance').GetMoniker().AddBulletin(title, body, bulletinID=bulletinID, editDateTime=editDateTime) <-- this is to update bulletin
411  _log(ALLY__CALL, "AllianceBound::Handle_AddBulletin() size=%u", call.tuple->size());
412  call.Dump(ALLY__CALL_DUMP);
413 
414  Call_AddBulletin args;
415  if (!args.Decode(&call.tuple))
416  {
417  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
418  return nullptr;
419  }
420 
421  m_db.AddBulletin(m_allyID, call.client->GetCorporationID(), call.client->GetCharacterID(), args.title, args.body);
422 
423  return nullptr;
424 }
425 
426 PyResult AllianceBound::Handle_DeleteBulletin(PyCallArgs &call)
427 {
428  // sm.GetService('alliance').GetMoniker().DeleteBulletin(id)
429  _log(ALLY__CALL, "AllianceBound::Handle_DeleteBulletin() size=%u", call.tuple->size());
430  call.Dump(ALLY__CALL_DUMP);
431 
432  Call_SingleIntegerArg args;
433  if (!args.Decode(&call.tuple))
434  {
435  _log(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
436  return nullptr;
437  }
438 
439  m_db.DeleteBulletin(args.arg);
440  return nullptr;
441 }
442 
443 PyResult AllianceBound::Handle_GetBulletins(PyCallArgs &call)
444 {
445  // self.bulletins = self.GetMoniker().GetBulletins()
446  _log(ALLY__CALL, "AllianceBound::Handle_GetBulletins() size=%u", call.tuple->size());
447  call.Dump(ALLY__CALL_DUMP);
448  return m_db.GetBulletins(m_allyID);
449 }
450 
451 PyResult AllianceBound::Handle_GetAllianceContacts(PyCallArgs &call)
452 {
453  // return self.GetMoniker().GetAllianceContacts()
454  _log(ALLY__CALL, "AllianceBound::Handle_GetAllianceContacts() size=%u", call.tuple->size());
455  call.Dump(ALLY__CALL_DUMP);
456 
457  return m_db.GetContacts(m_allyID);
458 }
459 
460 PyResult AllianceBound::Handle_AddAllianceContact(PyCallArgs &call)
461 {
462  // self.GetMoniker().AddAllianceContact(contactID, relationshipID)
463  _log(ALLY__CALL, "AllianceBound::Handle_AddAllianceContact() size=%u", call.tuple->size());
464  call.Dump(ALLY__CALL_DUMP);
465 
466  Call_CorporateContactData args;
467  if (!args.Decode(&call.tuple))
468  {
469  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
470  return nullptr;
471  }
472 
473  m_db.AddContact(m_allyID, args);
474 
475  return nullptr;
476 }
477 
478 PyResult AllianceBound::Handle_EditAllianceContact(PyCallArgs &call)
479 {
480  // self.GetMoniker().EditAllianceContact(contactID, relationshipID)
481  _log(ALLY__CALL, "AllianceBound::Handle_EditAllianceContact() size=%u", call.tuple->size());
482  call.Dump(ALLY__CALL_DUMP);
483 
484  Call_CorporateContactData args;
485  if (!args.Decode(&call.tuple))
486  {
487  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
488  return nullptr;
489  }
490 
491  m_db.UpdateContact(args.relationshipID, args.contactID, m_allyID);
492 
493  return nullptr;
494 }
495 
496 PyResult AllianceBound::Handle_RemoveAllianceContacts(PyCallArgs &call)
497 {
498  // self.GetMoniker().RemoveAllianceContacts(contactIDs)
499  _log(ALLY__CALL, "AllianceBound::Handle_RemoveAllianceContacts() size=%u", call.tuple->size());
500  call.Dump(ALLY__CALL_DUMP);
501 
502  Call_RemoveCorporateContacts args;
503  if (!args.Decode(&call.tuple))
504  {
505  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
506  return nullptr;
507  }
508 
509  for (PyList::const_iterator itr = args.contactIDs->begin(); itr != args.contactIDs->end(); ++itr)
510  {
512  }
513 
514  return nullptr;
515 }
516 
517 PyResult AllianceBound::Handle_EditContactsRelationshipID(PyCallArgs &call)
518 {
519  // self.GetMoniker().EditContactsRelationshipID(contactIDs, relationshipID)
520  _log(ALLY__CALL, "AllianceBound::Handle_EditContactsRelationshipID() size=%u", call.tuple->size());
521  call.Dump(ALLY__CALL_DUMP);
522 
523  Call_EditCorporateContacts args;
524  if (!args.Decode(&call.tuple))
525  {
526  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
527  return nullptr;
528  }
529 
530  for (PyList::const_iterator itr = args.contactIDs->begin(); itr != args.contactIDs->end(); ++itr)
531  {
532  m_db.UpdateContact(args.relationshipID, PyRep::IntegerValueU32(*itr), m_allyID);
533  }
534 
535  return nullptr;
536 }
537 
538 PyResult AllianceBound::Handle_GetLabels(PyCallArgs &call)
539 {
540  // return self.GetMoniker().GetLabels()
541  _log(ALLY__CALL, "AllianceBound::Handle_GetLabels() size=%u", call.tuple->size());
542  call.Dump(ALLY__CALL_DUMP);
543  return nullptr;
544 }
545 
546 PyResult AllianceBound::Handle_CreateLabel(PyCallArgs &call)
547 {
548  // return self.GetMoniker().CreateLabel(name, color)
549  _log(ALLY__CALL, "AllianceBound::Handle_CreateLabel() size=%u", call.tuple->size());
550  call.Dump(ALLY__CALL_DUMP);
551  return nullptr;
552 }
553 
554 PyResult AllianceBound::Handle_DeleteLabel(PyCallArgs &call)
555 {
556  // self.GetMoniker().DeleteLabel(labelID)
557  _log(ALLY__CALL, "AllianceBound::Handle_DeleteLabel() size=%u", call.tuple->size());
558  call.Dump(ALLY__CALL_DUMP);
559  return nullptr;
560 }
561 
562 PyResult AllianceBound::Handle_EditLabel(PyCallArgs &call)
563 {
564  // self.GetMoniker().EditLabel(labelID, name, color)
565  _log(ALLY__CALL, "AllianceBound::Handle_EditLabel() size=%u", call.tuple->size());
566  call.Dump(ALLY__CALL_DUMP);
567  return nullptr;
568 }
569 
570 PyResult AllianceBound::Handle_AssignLabels(PyCallArgs &call)
571 {
572  // self.GetMoniker().AssignLabels(contactIDs, labelMask)
573  _log(ALLY__CALL, "AllianceBound::Handle_AssignLabels() size=%u", call.tuple->size());
574  call.Dump(ALLY__CALL_DUMP);
575  return nullptr;
576 }
577 
578 PyResult AllianceBound::Handle_RemoveLabels(PyCallArgs &call)
579 {
580  // self.GetMoniker().RemoveLabels(contactIDs, labelMask)
581  _log(ALLY__CALL, "AllianceBound::Handle_RemoveLabels() size=%u", call.tuple->size());
582  call.Dump(ALLY__CALL_DUMP);
583  return nullptr;
584 }
585 
586 PyResult AllianceBound::Handle_UpdateAlliance(PyCallArgs &call)
587 {
588  // return self.GetMoniker().UpdateAlliance(description, url)
589  _log(ALLY__CALL, "AllianceBound::Handle_UpdateAlliance() size=%u", call.tuple->size());
590  call.Dump(ALLY__CALL_DUMP);
591 
592  Call_UpdateAlliance args;
593  if (!args.Decode(&call.tuple))
594  {
595  codelog(SERVICE__ERROR, "%s: Failed to decode arguments.", GetName());
596  return nullptr;
597  }
598 
599  m_db.UpdateAlliance(m_allyID, args.description, args.url);
600 
601  //Send OnAllianceChanged packet
602  OnAllianceChanged ac;
603  ac.allianceID = m_allyID;
605  {
606  codelog(SERVICE__ERROR, "Failed to create OnAllianceChanged notification stream.");
607  call.client->SendErrorMsg("Unable to notify about alliance change.");
608  return nullptr;
609  }
610 
611  //Send notification to the client about the alliance change which just occurred
612  call.client->SendNotification("OnAllianceChanged", "clientID", ac.Encode(), false);
613  _log(SOV__DEBUG, "OnAllianceChanged sent to client %u", call.client->GetClientID());
614 
615  return nullptr;
616 }
Dispatcher *const m_dispatch
static void FillOAMemberChange(OnAllianceMemberChange &OAMC, const Alliance::ApplicationInfo &Old, const Alliance::ApplicationInfo &New)
void UpdateAlliance(uint32 allyID, std::string description, std::string url)
Definition: AllianceDB.cpp:412
void SendNotification(const PyAddress &dest, EVENotificationStream &noti, bool seq=true)
Definition: Client.cpp:2245
void SendErrorMsg(const char *fmt,...)
Definition: Client.cpp:2719
#define _log(type, fmt,...)
Definition: logsys.h:124
bool CreateAllianceChangePacket(OnAllianceChanged &ac, uint32 oldAllyID, uint32 newAllyID)
Definition: AllianceDB.cpp:518
Python string.
Definition: PyRep.h:430
size_t size() const
Definition: PyRep.h:591
void DeleteMember(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:374
PyRep * GetMembers(uint32 allyID)
Definition: AllianceDB.cpp:461
void SendMail(uint32 sender, uint32 recipient, const std::string &subject, const std::string &content)
Definition: LSCService.h:64
int32 GetCharacterID() const
Definition: Client.h:113
int32 GetCorporationID() const
Definition: Client.h:123
#define sEntityList
Definition: EntityList.h:208
storage_type::const_iterator const_iterator
Definition: PyRep.h:644
bool AddEmployment(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:299
static uint32 IntegerValueU32(PyRep *pRep)
Definition: PyRep.cpp:134
int64 GetClientID() const
Definition: Client.h:119
static uint32 GetCorporationCEO(uint32 corpID)
void DeclareExecutorSupport(uint32 corpID, uint32 chosenExecutor)
Definition: AllianceDB.cpp:392
* args
static uint32 GetExecutorID(uint32 allyID)
Definition: AllianceDB.cpp:334
Python boolean.
Definition: PyRep.h:323
bool UpdateCorpAlliance(uint32 allyID, uint32 corpID)
Definition: AllianceDB.cpp:355
#define codelog(type, fmt,...)
Definition: logsys.h:128
Python integer.
Definition: PyRep.h:231
PyRep * GetBulletins(uint32 allyID)
Definition: AllianceDB.cpp:43
PyRep * GetAlliance(uint32 allyID)
Definition: AllianceDB.cpp:58
AllianceDB & m_db
Definition: AllianceBound.h:71
void UpdateContact(int32 relationshipID, uint32 contactID, uint32 ownerID)
Definition: AllianceDB.cpp:252
static void DeleteBulletin(uint32 bulletinID)
Definition: AllianceDB.cpp:34
const char * GetName() const
Definition: Client.h:94
Client *const client
Definition: PyCallable.h:49
#define PyCallable_REG_CALL(c, m)
Definition: PyServiceCD.h:78
LSCService * lsc_service
Definition: PyServiceMgr.h:77
PyRep * GetApplications(uint32 allyID)
Definition: AllianceDB.cpp:108
unsigned __int32 uint32
Definition: eve-compat.h:50
void InvalidateCache(const PyRep *objectID)
PyServiceMgr *const m_manager
Definition: PyBoundObject.h:53
ObjCacheService * cache_service
Definition: PyServiceMgr.h:78
void AddBulletin(uint32 allyID, uint32 ownerID, uint32 cCharID, std::string &title, std::string &body)
Definition: AllianceDB.cpp:16
void Dump(LogType type) const
Definition: PyCallable.cpp:81
void RemoveContact(uint32 contactID, uint32 ownerID)
Definition: AllianceDB.cpp:261
PyRep * GetContacts(uint32 allyID)
Definition: AllianceDB.cpp:223
static void FillOAApplicationChange(OnAllianceApplicationChanged &OAAC, const Alliance::ApplicationInfo &Old, const Alliance::ApplicationInfo &New)
#define PySafeDecRef(op)
Definition: PyRep.h:61
void AddContact(uint32 ownerID, Call_CorporateContactData contactData)
Definition: AllianceDB.cpp:242
bool UpdateApplication(const Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:186
static std::string GetCorpName(uint32 corpID)
const char * GetName() const
Definition: PyBoundObject.h:44
Python long integer.
Definition: PyRep.h:261
PyTuple * tuple
Definition: PyCallable.h:50
bool GetCurrentApplicationInfo(uint32 allyID, uint32 corpID, Alliance::ApplicationInfo &aInfo)
Definition: AllianceDB.cpp:128