EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
debug_commands.cpp
Go to the documentation of this file.
1 
2 
3 #include <stdio.h>
4 #include "eve-server.h"
5 
6 #include "PyBoundObject.h"
7 #include "Client.h"
8 #include "ConsoleCommands.h"
9 #include "npc/NPC.h"
10 #include "npc/NPCAI.h"
11 #include "admin/AllCommands.h"
12 #include "admin/CommandDB.h"
13 #include "fleet/FleetService.h"
15 #include "inventory/InventoryDB.h"
18 #include "npc/Drone.h"
19 #include "planet/Moon.h"
20 #include "station/Station.h"
21 #include "system/Damage.h"
22 #include "system/DestinyManager.h"
23 #include "system/SystemManager.h"
24 #include "system/SystemBubble.h"
28 #include "testing/test.h"
29 
30 
32  /* this command is used to test anomaly system -allan 21Feb15
33  * will list all anomalies, by systemID.
34  */
35 
36  AnomalyMgr* pAM = pClient->SystemMgr()->GetAnomMgr();
37  std::vector<CosmicSignature> sig;
38  pAM->GetAnomalyList(sig);
39  pAM->GetSignatureList(sig);
40 
41  int count = sig.size();
42  std::ostringstream str;
43  str.clear();
44  str << "There are currently %u active signals in %s(%u)<br>"; //80
45  str << "aID iID bubbleID type 'Name'<br>"; //30
46 
47  for (auto sigs : sig) {
48  // sysSignatures (sigID,sigItemID,dungeonType,sigName,systemID,sigTypeID,sigGroupID,scanGroupID,scanAttributeID,x,y,z)
49  str << sigs.sigID.c_str() << " " << sigs.sigItemID << " " << sigs.bubbleID << " " << pAM->GetScanGroupName(sigs.scanGroupID) << " '" << sigs.sigName.c_str() << "'<br>"; //120
50  }
51 
52  int size(120);
53  size += count * 120;
54  char reply[size];
55  snprintf(reply, size, str.str().c_str(), count, pClient->SystemMgr()->GetName(), pClient->SystemMgr()->GetID());
56 
57  pClient->SendInfoModalMsg(reply);
58  return new PyString(reply);
59 }
60 
62 {
63  if (args.argCount()== 1) {
64  pClient->GetShip()->Heal();
65  } else if (args.argCount() == 2) {
66  if (!args.isNumber(1))
67  throw CustomError ("Argument 1 should be a character ID");
68 
69  uint32 entity = atoi(args.arg(1).c_str());
70 
71  Client *target = sEntityList.FindClientByCharID(entity);
72  if (target == NULL)
73  throw CustomError ("Cannot find Character by the entityID %d", entity);
74 
75  target->GetShip()->Heal();
76  }
77 
78  return(new PyString("Heal successful!"));
79 }
80 
82 {
83  if (args.argCount()== 1) {
84  pClient->GetShip()->Heal();
85  } else if (args.argCount() == 2) {
86  if (!args.isNumber(1))
87  throw CustomError ("Argument 1 should be a character ID");
88 
89  uint32 entity = atoi(args.arg(1).c_str());
90 
91  Client *target = sEntityList.FindClientByCharID(entity);
92  if (target == NULL)
93  throw CustomError ("Cannot find Character by the entityID %d", entity);
94 
95  target->GetShip()->Heal();
96  }
97 
98  return(new PyString("Heal successful!"));
99 }
100 
102 {
103  //if (!pClient->IsInSpace())
104  // throw CustomError ("You're not in space.");
105  if (!pClient->GetShipSE()->SysBubble())
106  pClient->EnterSystem(pClient->GetSystemID());
107  if (!pClient->GetShipSE()->DestinyMgr())
108  pClient->SetDestiny(NULL_ORIGIN);
109 
110  ShipItem* pShip = pClient->GetShip().get();
111 
112  char reply[150];
113  snprintf(reply, 150,
114  "PG: %.2f(%.3f)<br>" //25
115  "Cap: %.2f(%.3f)<br>" //28
116  "CPU: %.2f(%.3f)<br>" //28
117  "Hull: %.2f(%.3f)<br>" //32
118  "Armor: %.2f(%.3f)<br>" //27
119  "Shield: %.2f(%.3f)", //28
120  pShip->GetShipPGLevel(), pShip->GetShipPGPercent().get_float(),
122  pShip->GetShipCPULevel(), pShip->GetShipCPUPercent().get_float(),
123  pShip->GetShipHullHP(), pShip->GetShipHullPercent().get_float(),
124  pShip->GetShipArmorHP(), pShip->GetShipArmorPercent().get_float(),
125  pShip->GetShipShieldHP(), pShip->GetShipShieldPercent().get_float()
126  );
127 
128  pClient->SendInfoModalMsg(reply);
129 
130  return new PyString(reply);
131 }
132 
134  /* this command is used to debug system entities
135  * wip. -allan 25Apr15 -UD 15July19
136  */
137 
138  if (!pClient->IsInSpace())
139  throw CustomError ("You must be in space to list system inventory.");
140 
141  if (!pClient->GetShipSE()->SysBubble())
142  if (pClient->IsInSpace())
143  pClient->EnterSystem(pClient->GetSystemID());
144  else
145  throw CustomError ("You must be in space to list system inventory.");
146 
147  SystemManager* pSys = pClient->GetShipSE()->SystemMgr();
148  uint16 beltCount = pSys->BeltCount();
149  uint32 roidSpawns = pSys->GetRoidSpawnCount();
150  uint32 ratSpawns = pSys->GetRatSpawnCount();
151  uint32 npcs = pSys->GetSysNPCCount();
152  uint32 players = pSys->PlayerCount();
153  uint32 bubbles = sBubbleMgr.GetBubbleCount(pSys->GetID());
154 
155  std::map<uint32, SystemEntity*> into = pSys->GetEntities();
156 
157  std::ostringstream str;
158  str.clear();
159  str << "System: %s(%u)<br>"; //42
160  str << "Belts: %u<br>"; //20
161  str << "Bubbles: %u<br>"; //25
162  str << "RoidSpawns: %u<br>"; //25
163  str << "RatSpawns: %u<br>"; //18
164  str << "Players: %u<br>"; //23
165  str << "<br>"; //5
166 
167  for (auto cur : into) {
168  if (cur.second == nullptr)
169  continue;
170  str << cur.first << ": ";
171  std::string global = "(non-global)";
172  if (cur.second->isGlobal())
173  global = "(global)";
174  str << global.c_str();
175  if (cur.second->SysBubble() != nullptr)
176  str << " bubbleID: " << cur.second->SysBubble()->GetID() << " "; // 13 + 27 + 40 for name (80)
177  else
178  str << " (no bubble) "; // 13 + 27 + 40 for name (80)
179  if (cur.second->DestinyMgr() != nullptr) {
180  std::string modeStr = "Rigid";
181  if (!cur.second->IsStaticEntity()) {
182  switch (cur.second->DestinyMgr()->GetState()) {
183  case 0: modeStr = "Goto"; break;
184  case 1: modeStr = "Follow"; break;
185  case 2: modeStr = "Stop"; break;
186  case 3: modeStr = "Warp"; break;
187  case 4: modeStr = "Orbit"; break;
188  case 5: modeStr = "Missile"; break;
189  case 6: modeStr = "Mushroom"; break;
190  case 7: modeStr = "Boid"; break;
191  case 8: modeStr = "Troll"; break;
192  case 9: modeStr = "Miniball"; break;
193  case 10: modeStr = "Field"; break;
194  case 11: modeStr = "Rigid"; break;
195  case 12: modeStr = "Formation"; break;
196  }
197  }
198 
199  str << modeStr.c_str() << " (csf: " << cur.second->DestinyMgr()->GetSpeedFraction() << ") speed: ";
200  str << cur.second->DestinyMgr()->GetSpeed() << " [" << cur.second->GetName() << "]<br>"; // 13 + 27 + 40 for name (80)
201  } else
202  str << " [" << cur.second->GetName() << "]<br>"; // 13 + 27 + 40 for name (80)
203  }
204 
205  int count = into.size();
206  int size = count * 90;
207  size += 130; // header
208  char reply[size];
209  snprintf(reply, size, str.str().c_str(), pSys->GetName(), pSys->GetID(), beltCount, bubbles, roidSpawns, ratSpawns, npcs, players);
210 
211  pClient->SendInfoModalMsg(reply);
212  return new PyString(reply);
213 }
214 
216  /* this command is used to debug bubble entities
217  * wip. -allan 2June16
218  */
219 
220  if (pClient->IsDocked())
221  throw CustomError ("You must be in space to list bubble inventory.");
222 
223  SystemBubble *b = pClient->GetShipSE()->SysBubble();
224  uint32 bubble = b->GetID();
225  uint32 dynamics = b->CountDynamics();
226  uint32 npcs = b->CountNPCs();
227  uint32 players = b->CountPlayers();
228 
229  std::map<uint32, SystemEntity*> into;
230  b->GetEntities(into);
231 
232  std::ostringstream str;
233  str.clear();
234  str << "Bubble: %u<br>"; //22
235  str << "Dynamics: %u<br>"; //19
236  str << "NPCs: %u<br>"; //18
237  str << "Players: %u<br>"; //23
238  str << "<br>"; //5
239 
240  for (auto cur : into) {
241  if (cur.second == nullptr)
242  continue;
243  if (cur.second->DestinyMgr() != nullptr) {
244  std::string modeStr = "Rigid";
245  if (!cur.second->IsStaticEntity()) {
246  switch (cur.second->DestinyMgr()->GetState()) {
247  case 0: modeStr = "Goto"; break;
248  case 1: modeStr = "Follow"; break;
249  case 2: modeStr = "Stop"; break;
250  case 3: modeStr = "Warp"; break;
251  case 4: modeStr = "Orbit"; break;
252  case 5: modeStr = "Missile"; break;
253  case 6: modeStr = "Mushroom"; break;
254  case 7: modeStr = "Boid"; break;
255  case 8: modeStr = "Troll"; break;
256  case 9: modeStr = "Miniball"; break;
257  case 10: modeStr = "Field"; break;
258  case 11: modeStr = "Rigid"; break;
259  case 12: modeStr = "Formation"; break;
260  }
261  }
262  str << cur.first;
263  if (cur.second->isGlobal())
264  str << ": (global) ";
265  else
266  str << ": ";
267  str << modeStr.c_str() << " (csf: " << cur.second->DestinyMgr()->GetSpeedFraction() << ") speed: ";
268  str << cur.second->DestinyMgr()->GetSpeed() << " [" << cur.second->GetName() << "]<br>"; // 13 + 27 + 40 for name (80)
269  } else {
270  str << cur.first << ": None (csf: 0) speed: 0 [" << cur.second->GetName() << "]<br>"; // 13 + 27 + 40 for name (80)
271  }
272  }
273 
274  int count = into.size();
275  int size = count * 80;
276  size += 90;
277  char reply[size];
278  snprintf(reply, size, str.str().c_str(), bubble, dynamics, npcs, players);
279 
280  pClient->SendInfoModalMsg(reply);
281  return new PyString(reply);
282 }
283 
285  /*
286  * this command will send the client a list of loaded game commands, role required, and description. -allan 23May15
287  */
288 
289  char reply[65];
290  snprintf(reply, 65,
291  "Working on making this list...check back later.<br>" //53
292  " -Allan"); //9
293 
294  pClient->SendInfoModalMsg(reply);
295 
296  return new PyString(reply);
297 }
298 
299 
301  /*
302  * this command will send the client the security status of the current Character. -allan 5July15
303  */
304 
305  char reply[65];
306  snprintf(reply, 65,
307  "SecStatus: %f.", pClient->GetSecurityRating()); //53
308 
309  pClient->SendInfoModalMsg(reply);
310 
311  return new PyString(reply);
312 }
313 
315 {
316  if (!pClient->IsInSpace())
317  throw CustomError ("You're not in space. This call needs DestinyMgr.");
318  if (!pClient->GetShipSE()->SysBubble())
319  pClient->EnterSystem(pClient->GetSystemID());
320  if (!pClient->GetShipSE()->DestinyMgr())
321  pClient->SetDestiny(NULL_ORIGIN);
322 
323  DestinyManager* dm = pClient->GetShipSE()->DestinyMgr();
324 
325  char reply[250];
326  snprintf(reply, 250,
327  "ShipID: %u<br>"
328  "IsCloaked: %u<br>" //28
329  "IsWarping: %u<br>" //27
330  "InPod: %u<br>" //27
331  "IsInSpace: %u<br>" //27
332  "IsDocked: %u<br>" //27
333  "IsJump: %u<br>" //27
334  "IsInvul: %u<br>" //27
335  "IsLogin: %u<br>" //27
336  "IsUndock: %u<br>" //27
337  "HasBeyonce: %u<br>" //27
338  "IsBubbleWait: %u<br>" //27
339  "IsSetStateSent: %u<br>", //27
340  pClient->GetShipID(), dm->IsCloaked(), dm->IsWarping(), pClient->InPod(), pClient->IsInSpace(), pClient->IsDocked(), pClient->IsJump(),
341  pClient->IsInvul(), pClient->IsLogin(), pClient->IsUndock(), pClient->HasBeyonce(), pClient->IsBubbleWait(), pClient->IsSetStateSent()
342  );
343 
344  pClient->SendInfoModalMsg(reply);
345 
346  return new PyString(reply);
347 }
348 
350 {
351  if (!pClient->IsInSpace())
352  throw CustomError ("You're not in space.");
353  if (!pClient->GetShipSE()->SysBubble())
354  pClient->EnterSystem(pClient->GetSystemID());
355  if (!pClient->GetShipSE()->DestinyMgr())
356  pClient->SetDestiny(NULL_ORIGIN);
357 
358  DestinyManager* dm = pClient->GetShipSE()->DestinyMgr();
359  GPoint heading(dm->GetHeading());
360 
361  char reply[300];
362  snprintf(reply, 300,
363  "Destiny Variable List for %s<br><br>" //60
364  "ShipID: %u<br>"
365  "Mass: %.2f<br>" //28
366  "AlignTime: %.2f<br>" //27
367  "AccelTime: %.2f<br>"
368  "MaxSpeed: %.2f<br>" //27
369  "WarpSpeed: %.2f<br>" //27
370  "WarpTime: %.2f<br>" //27
371  "WarpDropSpeed: %.2f<br>" //27
372  "Radius: %.2f<br>" //27
373  "CapNeed: %.2f<br>" //27
374  "Agility: %.3f<br>" //27
375  "Inertia: %.3f<br>" //27
376  "Heading: %.3f,%.3f,%.3f<br>", //21
377  pClient->GetShipSE()->GetName(), pClient->GetShipID(), dm->GetMass(), dm->GetAlignTime(),
378  dm->GetAccelTime(), dm->GetMaxVelocity(), (float)(dm->GetWarpSpeed() /10), dm->GetWarpTime(),
379  dm->GetWarpDropSpeed(), dm->GetRadius(), dm->GetCapNeed(), dm->GetAgility(), dm->GetInertia(),
380  heading.x, heading.y, heading.z
381  );
382 
383  pClient->SendInfoModalMsg(reply);
384 
385  return new PyString(reply);
386 }
387 
389 {
390  if (!pClient->IsInSpace())
391  throw CustomError ("You're not in space.");
392  if (!pClient->GetShipSE()->SysBubble())
393  pClient->EnterSystem(pClient->GetSystemID());
394  if (!pClient->GetShipSE()->DestinyMgr())
395  pClient->SetDestiny(NULL_ORIGIN);
396 
397  pClient->GetShipSE()->DestinyMgr()->Halt();
398 
399  char reply[25];
400  snprintf(reply, 25,
401  "Ship Halted.");
402 
403  pClient->SendInfoModalMsg(reply);
404  return new PyString(reply);
405 }
406 
408  /* ingame command to immediatly save loaded items and halt server.
409  */
410  sConsole.HaltServer();
411  return nullptr;
412 }
413 
415  /* this command is used to debug asteroid creation/management
416  * wip. -allan 15April16
417  */
418 
419  std::vector<AsteroidSE*> invMap;
420  invMap.clear();
421  uint32 beltID = sBubbleMgr.GetBeltID(pClient->GetShipSE()->SysBubble()->GetID());
422  BeltMgr* belt = pClient->GetShipSE()->SystemMgr()->GetBeltMgr();
423  belt->GetList(beltID, invMap);
424 
425  std::ostringstream str;
426  str.clear();
427  str << "BeltID %u has %u roids in it.<br><br>"; //40
428 
429  for (auto cur : invMap)
430  str << cur->GetName() << ": " << cur->GetID() << "<br>"; // 20 + 40 for name (60)
431 
432  int count = invMap.size();
433  int size = count * 60;
434  size += 50;
435  char reply[size];
436  snprintf(reply, size, str.str().c_str(), beltID, count);
437 
438  pClient->SendInfoModalMsg(reply);
439  return new PyString(reply);
440 }
441 
443  /* this command is used to debug inventory
444  * wip. -allan 15Mar16
445  */
446 
447  std::map<uint32, InventoryItemRef> invMap;
448  invMap.clear();
449 
450  InventoryItem* item(nullptr);
451  Inventory* inv(nullptr);
452  uint32 inventoryID = 0;
453  if (pClient->IsDocked()) {
454  inventoryID = pClient->GetStationID();
455  StationItemRef station = sEntityList.GetStationByID(inventoryID);
456  if (station.get() == nullptr)
457  throw CustomError ("Cannot find Station Reference for stationID %u", inventoryID);
458  inv = station->GetMyInventory();
459  if (inv == nullptr)
460  throw CustomError ("Cannot find inventory for locationID %u", inventoryID);
461  inv->GetInventoryMap(invMap);
462  item = station.get();
463  } else {
464  //Command_list(pClient,db,services,args);
465  inventoryID = pClient->GetSystemID();
466  SolarSystemRef system = sItemFactory.GetSolarSystem(inventoryID);
467  if (system.get() == nullptr)
468  throw CustomError ("Cannot find System Reference for systemID %u", inventoryID);
469  inv = system->GetMyInventory();
470  if (inv == nullptr)
471  throw CustomError ("Cannot find inventory for locationID %u", inventoryID);
472  inv->GetInventoryMap(invMap);
473  item = system.get();
474  }
475 
476  std::ostringstream str;
477  str.clear();
478  str << "%s<br>";
479  str << "InventoryID %u(%p) (Item %p) has %u items.<br><br>"; //70
480 
481  for (auto cur : invMap)
482  str << cur.first << "(" << sDataMgr.GetFlagName(cur.second->flag()) << "): " << cur.second->itemName() << "<br>"; // 20 + 70 for name (90)
483 
484  int count = invMap.size();
485  int size = count * 90;
486  size += 70;
487  char reply[size];
488  snprintf(reply, size, str.str().c_str(), item->name(), inventoryID, inv, item, count);
489 
490  pClient->SendInfoModalMsg(reply);
491  return new PyString(reply);
492 }
493 
495  /* this command is used to debug inventory
496  * wip. -allan 15Mar16
497  */
498 
499  std::map<uint32, InventoryItemRef> invMap;
500  invMap.clear();
501  uint32 inventoryID = pClient->GetShipID();
502  ShipItemRef ship = sItemFactory.GetShip(inventoryID);
503  Inventory* inv = ship->GetMyInventory();
504  inv->GetInventoryMap(invMap);
505 
506  std::ostringstream str;
507  str.clear();
508  str << "%s<br>"; //40
509  str << "InventoryID %u(%p) (Ship %p) has %u items.<br><br>"; //50
510 
511  // update to sort by slot...pilot, lo, mid, hi, rig, subsystem, cargo, {other cargo}
512  for (auto cur : invMap)
513  str << cur.first << "(" << sDataMgr.GetFlagName(cur.second->flag()) << "): " << cur.second->itemName() << "<br>"; // 20 + 40 for name (60)
514 
515  int count = invMap.size();
516  int size = count * 60;
517  size += 90;
518  char reply[size];
519  snprintf(reply, size, str.str().c_str(), ship->name(), inventoryID, inv, ship.get(), count);
520 
521  pClient->SendInfoModalMsg(reply);
522  return new PyString(reply);
523 }
524 
526  /* this command is used to debug char skills
527  * wip. -allan 15Mar16
528  */
529 
530  std::map<uint32, InventoryItemRef> invMap;
531  invMap.clear();
532  uint32 inventoryID = pClient->GetCharacterID();
533  Inventory* inv = pClient->GetChar()->GetMyInventory();
534  inv->GetInventoryMap(invMap);
535 
536  std::ostringstream str;
537  str.clear();
538  str << "InventoryID %u(%p) of %s has %u skills.<br><br>"; //80
539 
540  for (auto cur : invMap) {
541  if (cur.second->flag() == flagSkillInTraining)
542  str << "<color=aqua>";
543  str << cur.first << " - " << cur.second->itemName(); //45
544  str << " (" << cur.second->GetAttribute(AttrSkillLevel).get_uint32() << ") "; //3
545  if (cur.second->GetAttribute(AttrSkillPoints).get_type() == evil_number_int) //15
546  str << "[i-" << cur.second->GetAttribute(AttrSkillPoints).get_int();
547  else
548  str << "[f-" << cur.second->GetAttribute(AttrSkillPoints).get_float();
549  if (cur.second->flag() == flagSkillInTraining)
550  str << "]</color><br>";
551  else
552  str << "]<br>"; // 45 + 3 + 15 + 5 (70)
553  }
554 
555  int count = invMap.size();
556  int size = count * 80;
557  size += 80;
558  char reply[size];
559  snprintf(reply, size, str.str().c_str(), inventoryID, inv, pClient->GetChar()->name(), count);
560 
561  pClient->SendInfoModalMsg(reply);
562  return new PyString(reply);
563 }
564 
566  /* this command is used to debug attributes
567  * wip. -allan 15Mar17
568  */
569 
570  if (!args.isNumber(1))
571  throw CustomError ("Argument 1 must be a valid itemID.");
572  uint32 itemID(atol(args.arg(1).c_str()));
573 
574  InventoryItemRef iRef(sItemFactory.GetItem(itemID));
575  if (iRef.get() == nullptr) {
576  // make error msg here
577  return nullptr;
578  }
579 
580  std::map<uint16, EvilNumber> attrMap;
581  iRef->GetAttributeMap()->CopyAttributes(attrMap);
582 
583  std::ostringstream str;
584  str.clear();
585  str << "%s (%u) has %u attributes.<br><br>"; //70
586 
587  for (auto cur : attrMap) {
588  str << cur.first << " "; //15
589  if (cur.second.get_type() == evil_number_int) //15
590  str << "i- " << cur.second.get_int();
591  else
592  str << "f- " << cur.second.get_float();
593  str << "<br>"; // 3 + 15 + 15 (40)
594  }
595 
596  int count = attrMap.size();
597  int size = count * 40;
598  size += 70;
599  char reply[size];
600  snprintf(reply, size, str.str().c_str(), iRef->name(), itemID, count);
601 
602  pClient->SendInfoModalMsg(reply);
603  return new PyString(reply);
604 }
605 
607 
608  std::ostringstream str;
609  str.clear();
610  str << "Current Session Values.<br><br>"; //32
611 
612  str << "charid: %i <br>"; //14+10
613  str << "charname: %s <br>"; //16+20
614  str << "shipid: %u <br>"; //14+10
615  str << "cloneStationID: %u <br>"; //21+10
616 
617  str << "clientid: %li <br>"; //16+10
618  str << "userid: %u <br>"; //14+10
619  str << "sessionID: %li <br>"; //18+20
620 
621  str << "locationid: %u <br>"; //18+10
622  str << "stationid: %i <br>"; //17+10
623  str << "stationid2: %i <br>"; //17+10
624  str << "solarsystemid2: %u <br>"; //22+10
625  str << "constellationid: %u <br>"; //23+10
626  str << "regionid: %u <br>";
627 
628  str << "corpid: %u <br>"; //14+10
629  str << "hqID: %u <br>"; //12+10
630  str << "corpAccountKey: %i <br>"; //22+10
631  str << "corpRole: %li <br>"; //17+20
632  str << "rolesAtAll: %li <br>"; //19+20
633  str << "rolesAtBase: %li <br>"; //20+20
634  str << "rolesAtHQ: %li <br>"; //18+20
635  str << "rolesAtOther: %li <br>"; //21+20
636 
637  str << "fleetID: %i <br>"; //14+10
638  str << "wingID: %i <br>"; //13+10
639  str << "squadID: %i <br>"; //14+10
640  str << "job: %s <br>"; //10+10
641  str << "role: %s <br>"; //11+10
642  str << "booster: %s <br>"; //14+10
643  str << "joinTime: %li <br>"; //16+20
644 
645  int size = 32; // header
646  size += 445; // text
647  size += 170; // %i
648  size += 140; // %l*
649  size += 50; // %s
650  char reply[size];
651  snprintf(reply, size, str.str().c_str(),
652  pClient->GetCharacterID(), pClient->GetName(), pClient->GetShipID(), pClient->GetCloneStationID(), pClient->GetClientID(), pClient->GetUserID(),
653  pClient->GetSession()->GetSessionID(), pClient->GetLocationID(), pClient->GetStationID(), pClient->GetStationID2(), pClient->GetSystemID(), pClient->GetConstellationID(),
654  pClient->GetRegionID(), pClient->GetCorporationID(), pClient->GetCorpHQ(), pClient->GetCorpAccountKey(), pClient->GetCorpRole(), pClient->GetRolesAtAll(),
655  pClient->GetRolesAtBase(), pClient->GetRolesAtHQ(), pClient->GetRolesAtOther(), pClient->GetChar()->fleetID(), pClient->GetChar()->wingID(),
656  pClient->GetChar()->squadID(), sFltSvc.GetJobName(pClient->GetChar()->fleetJob()).c_str(), sFltSvc.GetRoleName(pClient->GetChar()->fleetRole()).c_str(),
657  sFltSvc.GetBoosterName(pClient->GetChar()->fleetBooster()).c_str(),pClient->GetChar()->fleetJoinTime());
658 
659  pClient->SendInfoModalMsg(reply);
660  return new PyString(reply);
661 }
662 
664 {
665  char reply[200];
666  snprintf(reply, 200, "%s", pClient->GetShip()->GetShipDNA().c_str());
667 
668  pClient->SendInfoModalMsg(reply);
669  return new PyString(reply);
670 }
671 
673 {
674  if (!pClient->IsInSpace()) {
675  pClient->SendInfoModalMsg("You are not in Space.");
676  return nullptr;
677  }
678 
679  uint16 length = 1, count = 0;
680  std::string into = pClient->GetShipSE()->TargetMgr()->TargetList(length, count);
681 
682  std::ostringstream str;
683  str.clear();
684  str << "Target List for %s in shipID %u<br>"; //30+30
685  str << " %u entries in list<br>"; //30
686  str << "%s"; //length
687 
688  int size = 60; // header
689  size += 30; // text
690  size += length;
691 
692  char reply[size];
693  snprintf(reply, size, str.str().c_str(), pClient->GetName(), pClient->GetShipID(), count, into.c_str());
694 
695  pClient->SendInfoModalMsg(reply);
696  return new PyString(reply);
697 }
698 
700 {
701  bool tracking = sEntityList.GetTracking();
702  std::string track = "enabled";
703  if (tracking) {
704  sEntityList.SetTracking(false);
705  track = "disabled";
706  } else
707  sEntityList.SetTracking(true);
708 
709  char reply[30];
710  snprintf(reply, 30, "Ship Tracking is %s.", track.c_str());
711 
712  pClient->SendNotifyMsg(reply);
713  return new PyString(reply);
714 }
715 
717 {
718  std::string track = "enabled";
719  std::string type = "bubble";
720 
721  if (sConfig.debug.BubbleTrack) {
722  sConfig.debug.BubbleTrack = false;
723  track = "disabled";
724  } else {
725  sConfig.debug.BubbleTrack = true;
726  }
727 
728  // begin argument processing
729  int locationID = 0;
730  if (args.argCount() < 2) {
731  if (sConfig.debug.BubbleTrack) {
732  pClient->GetShipSE()->SysBubble()->MarkCenter();
733  } else {
734  pClient->GetShipSE()->SysBubble()->RemoveMarkers();
735  }
736  } else if (args.argCount() == 2) { // single arg - help, bubble, system, universe, {invalid}
737  if (strcmp(args.arg(1).c_str(), "help") == 0) {
738  // {.bubbletrack help} will display the following list of options in notification window
739  std::ostringstream str; // for 'help' printing
740  str << ".bubbletrack [arg]<br>"; //22
741  str << "no args = mark current bubble.<br>"; //35
742  str << "arg = help|bubble|system|universe<br>"; //40
743  str << "arg = help - display this information.<br>"; //45
744  str << "arg = bubble - mark current bubble.<br>"; //42
745  str << "arg = system - mark all bubbles in current system. center markers are global.<br>"; //80
746  str << "arg = universe - mark all bubbles in all systems. center markers are global.<br>"; //80
747  str << "typical use is .bubbletrack with no args to mark current bubble.<br>"; //70
748  str << "'system' and 'universe' are used to show bubbles using solarsystem map from scan window (using '.showall').<br>"; //110
749  int size = 520;
750  char reply[size];
751  snprintf(reply, size, str.str().c_str());
752  pClient->SendInfoModalMsg(reply);
753  return nullptr;
754  } else if (strcmp(args.arg(1).c_str(), "bubble") == 0) {
755  if (sConfig.debug.BubbleTrack) {
756  pClient->GetShipSE()->SysBubble()->MarkCenter();
757  } else {
758  pClient->GetShipSE()->SysBubble()->RemoveMarkers();
759  }
760  } else if (strcmp(args.arg(1).c_str(), "system") == 0) {
761  type = "system";
762  if (sConfig.debug.BubbleTrack) {
763  sBubbleMgr.MarkCenters(pClient->GetSystemID());
764  } else {
765  sBubbleMgr.RemoveMarkers(pClient->GetSystemID());
766  }
767  } else if (strcmp(args.arg(1).c_str(), "universe") == 0) {
768  type = "universe";
769  if (sConfig.debug.BubbleTrack) {
770  sBubbleMgr.MarkCenters();
771  } else {
772  sBubbleMgr.RemoveMarkers();
773  }
774  } else {
775  throw CustomError ("BubbleTrack: Unrecognized Argument.");
776  }
777  } else {
778  throw CustomError ("BubbleTrack: Too Many Arguments.");
779  }
780 
781  char reply[45];
782  snprintf(reply, 45, "Bubble Tracking for %s is %s.", type.c_str(), track.c_str());
783 
784  pClient->SendNotifyMsg(reply);
785  return new PyString(reply);
786 }
787 
789 {
790  if (!pClient->IsInSpace())
791  throw CustomError ("You're not in space.");
792  if (!pClient->GetShipSE()->SysBubble())
793  pClient->EnterSystem(pClient->GetSystemID());
794  if (!pClient->GetShipSE()->DestinyMgr())
795  pClient->SetDestiny(NULL_ORIGIN);
796 
798  pClient->GetShipSE()->DestinyMgr()->Halt();
799 
800  char reply[55];
801  snprintf(reply, 55, "Command Unavailible.\nShip Halted.");
802 
803  pClient->SendInfoModalMsg(reply);
804  return new PyString(reply);
805 }
806 
807 
809 {
810  if (!pClient->IsInSpace())
811  throw CustomError ("You're not in space.");
812  if (!pClient->GetShipSE()->SysBubble())
813  pClient->EnterSystem(pClient->GetSystemID());
814  if (!pClient->GetShipSE()->DestinyMgr())
815  pClient->SetDestiny(NULL_ORIGIN);
816 
817 //sm.RemoteSvc('slash').SlashCmd('/entityspawn {0} {1} {2} 0 {3}'.format(recipeID, typeID, x, y))
819  pClient->GetShipSE()->DestinyMgr()->Halt();
820 
821  char reply[55];
822  snprintf(reply, 55, "Command Unfinished.\nShip Halted.");
823 
824  pClient->SendInfoModalMsg(reply);
825  return new PyString(reply);
826 }
827 
829 {
830  uint32 fleetID = pClient->GetChar()->fleetID();
831 
832  if (fleetID == 0) {
833  pClient->SendInfoModalMsg("You are not in a fleet");
834  return nullptr;
835  }
836 
837  uint16 length = 1;
838  std::string into = sFltSvc.GetBoosterData(fleetID, length);
839 
840  std::ostringstream str;
841  str.clear();
842  str << "<color=aqua>FleetID %u Command and Boost Data Window.</color><br><br>"; //77
843  str << "%s"; //length
844 
845  int size = 77; // header
846  size += length;
847 
848  char reply[size];
849  snprintf(reply, size, str.str().c_str(), fleetID, into.c_str());
850 
851  pClient->SendInfoModalMsg(reply);
852  return new PyString(reply);
853 }
854 
856 {
857  if (!pClient->InFleet())
858  throw CustomError ("You're not in a fleet.");
859  if (!pClient->IsFleetBoss())
860  throw CustomError ("You're not fleet boss.");
861 
862  if (args.isNumber(1))
863  throw PyException(CustomError("Argument 1 should be one of 'None', 'Corp', 'Alliance', 'Faction', or 'All'"));
864 
865  char reply[55];
866  snprintf(reply, 55, "Command Unfinished.");
867 
868  pClient->SendInfoModalMsg(reply);
869  return new PyString(reply);
870 }
871 
873 {
874  if (!pClient->IsInSpace())
875  throw CustomError ("You're not in space.");
876  if (!pClient->GetShipSE()->SysBubble())
877  throw CustomError ("You're not in a bubble.");
878  if (!pClient->GetShipSE()->DestinyMgr())
879  throw CustomError ("You have no destiny manager.");
880 
881  GPoint sPos(pClient->GetShipSE()->GetPosition());
882  GPoint mPos(pClient->SystemMgr()->GetClosestMoonSE(sPos)->GetPosition());
883  GVector vec(sPos, mPos);
884 
885  float normProd = sPos.normalize() * mPos.normalize();
886  float dotProd = sPos.dotProduct(mPos);
887  float angle = std::acos( dotProd / normProd);
888 
889  float azimuth = std::atan2(vec.z, vec.x);
890  float elevation = std::atan2(vec.y, std::sqrt(std::pow(vec.x,2) + std::pow(vec.z,2)));
891 
892  std::ostringstream str;
893  str.clear();
894  str << "Angle for current position is " << angle << "<br>";
895  str << "Az: " << azimuth << " Ele: " << elevation;
896  int size = 70;
897  char reply[size];
898  snprintf(reply, size, str.str().c_str());
899 
900  pClient->SendInfoModalMsg(reply);
901  return new PyString(reply);
902 }
903 
905 {
906  std::vector<Client*> cVec;
907  sEntityList.GetClients(cVec);
908  std::ostringstream str;
909  str.clear();
910  str << "Active Player List:<br>" << cVec.size() << " Online Players.<br>";
911 
912  for (auto cur : cVec) {
913  str << cur->GetName();
914  if (cur->IsDocked())
915  str << " is docked in ";
916  else
917  str << " is flying around ";
918  str << cur->GetSystemName().c_str() << "<br>";
919  }
920 
921  int size = cVec.size() * 100;
922  size += 80;
923  char reply[size];
924  snprintf(reply, size, str.str().c_str());
925 
926  pClient->SendInfoModalMsg(reply);
927  return new PyString(reply);
928 }
929 
931 {
932  std::string showall = "Enabled";
933  if (pClient->IsShowall()) {
934  pClient->SetShowAll(false);
935  showall = "Disabled";
936  } else
937  pClient->SetShowAll(true);
938 
939  char reply[35];
940  snprintf(reply, 35, "Show All on Scanner is %s.", showall.c_str());
941 
942  pClient->SendNotifyMsg(reply);
943  return new PyString(reply);
944 }
945 
947 {
948  std::string stop = "Enabled";
949  if (pClient->AutoStop()) {
950  pClient->SetAutoStop(false);
951  stop = "Disabled";
952  } else
953  pClient->SetAutoStop(true);
954 
955  char reply[35];
956  snprintf(reply, 35, "Module Auto-Stop is %s.", stop.c_str());
957 
958  pClient->SendNotifyMsg(reply);
959  return new PyString(reply);
960 }
961 
963  /* this command is used to debug inventory
964  * -allan 2Jul20
965  */
966 
967  // check for pod...no cargo
968  if (pClient->GetShip()->typeID() == itemTypeCapsule) {
969  char reply[21];
970  snprintf(reply, 21, "Your Pod's current cargo is you.<br>There is no room for anything else.");
971  pClient->SendInfoModalMsg(reply);
972  return nullptr;
973  }
974 
975  // build attr-to-flag map
976  std::map<uint16, EVEItemFlags> cargoAttrToFlag;
977  cargoAttrToFlag[AttrDroneCapacity] = flagDroneBay;
978  cargoAttrToFlag[AttrHasShipMaintenanceBay] = flagShipHangar;
979  cargoAttrToFlag[AttrFuelBayCapacity] = flagFuelBay;
980  cargoAttrToFlag[AttrOreHoldCapacity] = flagOreHold;
981  cargoAttrToFlag[AttrGasHoldCapacity] = flagGasHold;
982  cargoAttrToFlag[AttrAmmoHoldCapacity] = flagAmmoHold;
983  cargoAttrToFlag[AttrShipHoldCapacity] = flagShipHold;
984  cargoAttrToFlag[AttrMineralHoldCapacity] = flagMineralHold;
985  cargoAttrToFlag[AttrSalvageHoldCapacity] = flagSalvageHold;
986  cargoAttrToFlag[AttrSmallShipHoldCapacity] = flagSmallShipHold;
988  cargoAttrToFlag[AttrLargeShipHoldCapacity] = flagLargeShipHold;
992  cargoAttrToFlag[AttrQuafeHoldCapacity] = flagQuafeBay;
993 
994  uint32 qty = 0, count = 0, corp = 0;
995  std::multimap<uint8, InventoryItemRef> cargoMap;
996  ShipItemRef shipRef = pClient->GetShip();
997  Inventory* inv = shipRef->GetMyInventory();
998  inv->GetCargoList(cargoMap);
999 
1000  std::ostringstream str;
1001  str.clear();
1002  str << "Reported Cargo in %s (%u) [LineCount:%u]<br>"; //60
1003  str << "Hold Name Volume in m3. Stored/Total<br>"; //40
1004  str << " Qty ItemName (volume each) stack volume<br>"; //50
1005 
1006  // get available cargo holds in ship and list contents for each
1007 
1008  // all ships have flagCargoHold (except pod)
1009  ++count;
1010  str << "<br>" << sDataMgr.GetFlagName(flagCargoHold);
1011  str << " " << inv->GetStoredVolume(flagCargoHold);
1012  str << "/" << inv->GetCapacity(flagCargoHold) << "<br>";
1013  if (cargoMap.find(flagCargoHold) == cargoMap.end()) {
1014  ++count;
1015  str << " Empty<br>";
1016  } else {
1017  qty = 0;
1018  auto range = cargoMap.equal_range(flagCargoHold);
1019  for ( auto itr = range.first; itr != range.second; ++itr ) {
1020  ++count;
1021  qty = itr->second->quantity();
1022  str << " " << qty << " " << itr->second->itemName();
1023  str << " (" << itr->second->type().volume() << ") " << itr->second->type().volume() *qty << "<br>";
1024  }
1025  }
1026 
1027  // loop thru cargo list in all possible holds
1028  for (auto cur : cargoAttrToFlag) {
1029  if ( shipRef->HasAttribute(cur.first) and ( shipRef->GetAttribute(cur.first) > EvilZero)) {
1030  ++count;
1031  str << "<br>" << sDataMgr.GetFlagName(cur.second);
1032  str << " " << inv->GetStoredVolume(cur.second);
1033  str << "/" << inv->GetCapacity(cur.second) << "<br>";
1034  if (cargoMap.find(cur.second) == cargoMap.end()) {
1035  ++count;
1036  str << " Empty<br>";
1037  } else {
1038  qty = 0;
1039  auto range = cargoMap.equal_range(cur.second);
1040  for ( auto itr = range.first; itr != range.second; ++itr ) {
1041  ++count;
1042  qty = itr->second->quantity();
1043  str << " " << qty << " " << itr->second->itemName();
1044  str << " (" << itr->second->type().volume() << ") " << itr->second->type().volume() *qty << "<br>";
1045  }
1046  }
1047  }
1048  }
1049 
1050  // check for corp hangars
1051  if ( shipRef->HasAttribute(AttrHasCorporateHangars)) {
1052  ++count;
1053  corp = 190;
1054  // get corp's hangar names instead of default flag names
1055  std::map<uint8, std::string> hangarNames;
1056  ServiceDB::GetCorpHangarNames(pClient->GetCorporationID(), hangarNames);
1057  str << "<br><br>Corp Hangars share capacity. (currently incomplete)<br>"; // 20
1058  str << "Currently using " << inv->GetCorpHangerCapyUsed() << " of " << inv->GetCapacity(flagHangar) << "m3<br>"; //40
1059  str << "Hold Name Volume Stored in m3.<br>"; //40
1060  str << " Qty ItemName (volume each) stack volume<br>"; //50
1061  str << "<br>" << hangarNames[flagHangar] << " " << inv->GetStoredVolume(flagHangar, false) << "<br>";
1062  if (cargoMap.find(flagHangar) == cargoMap.end()) {
1063  ++count;
1064  str << " Empty<br>";
1065  } else {
1066  qty = 0;
1067  auto range = cargoMap.equal_range(flagHangar);
1068  for ( auto itr = range.first; itr != range.second; ++itr ) {
1069  ++count;
1070  qty = itr->second->quantity();
1071  str << " " << qty << " " << itr->second->itemName();
1072  str << " (" << itr->second->type().volume() << ") " << itr->second->type().volume() *qty << "<br>";
1073  }
1074  }
1075  for (uint8 i = flagCorpHangar2; i < flagSecondaryStorage; ++i) {
1076  ++count;
1077  str << "<br>" << hangarNames[i]; //sDataMgr.GetFlagName(i);
1078  str << " " << inv->GetStoredVolume((EVEItemFlags)i, false) << "<br>";
1079  if (cargoMap.find(i) == cargoMap.end()) {
1080  ++count;
1081  str << " Empty<br>";
1082  } else {
1083  qty = 0;
1084  auto range = cargoMap.equal_range(i);
1085  for ( auto itr = range.first; itr != range.second; ++itr ) {
1086  ++count;
1087  qty = itr->second->quantity();
1088  str << " " << qty << " " << itr->second->itemName();
1089  str << " (" << itr->second->type().volume() << ") " << itr->second->type().volume() *qty << "<br>";
1090  }
1091  }
1092  }
1093  }
1094 
1095  int size = count * 100;
1096  size += 150;
1097  size += corp;
1098  char reply[size];
1099  snprintf(reply, size, str.str().c_str(), shipRef->name(), shipRef->itemID(), count);
1100 
1101  pClient->SendInfoModalMsg(reply);
1102  return new PyString(reply);
1103 }
1104 
1106 {
1107  if (!pClient->IsInSpace())
1108  throw CustomError ("You're not in space.");
1109  if (!pClient->GetShipSE()->SysBubble())
1110  throw CustomError ("You're not in a bubble.");
1111  if (!pClient->GetShipSE()->DestinyMgr())
1112  throw CustomError ("You have no destiny manager.");
1113 
1114  if (!args.isNumber(1))
1115  throw CustomError ("Argument 1 must be a valid bubbleID.");
1116  uint16 bubbleID = atoi(args.arg(1).c_str());
1117  SystemBubble* pBubble = sBubbleMgr.FindBubbleByID(bubbleID);
1118  if (pBubble == nullptr)
1119  throw CustomError ("Bubble %u not found.", bubbleID);
1120 
1121  if (pBubble->GetSystemID() != pClient->GetSystemID())
1122  throw CustomError ("Cannot warp to bubble %u because it is in %s and you are in %s", \
1123  bubbleID, pBubble->GetSystem()->GetName(), pClient->GetSystemName().c_str());
1124 
1125  pClient->GetShipSE()->DestinyMgr()->WarpTo(pBubble->GetCenter());
1126 
1127  int size(50);
1128  char reply[size];
1129  snprintf(reply, size, "Ship Initalized warp to bubbleID %u", bubbleID);
1130 
1131  pClient->SendInfoModalMsg(reply);
1132  return new PyString(reply);
1133 }
1134 
1136 {
1137  if (!pClient->IsInSpace())
1138  throw CustomError ("You're not in space.");
1139 
1140  int size(30);
1141  char reply[size];
1142  snprintf(reply, size, "Running posTest()");
1143 
1144  testing::posTest(pClient);
1145  return nullptr;
1146 }
1147 
1149 {
1150  std::ostringstream str;
1151  str.clear();
1152  str << "Current Bound Object Listing (%u)<br><br>"; //45
1153 
1154  std::vector<PyServiceMgr::BoundObj> vec;
1155  pClient->services().BoundObjectVec(vec);
1156  for (auto cur : vec) {
1157  str << cur.client->GetName() << ": " << cur.object->bindID() << " "; //40
1158  str << cur.object->GetName() << "<br>"; //60
1159  }
1160 
1161  int count = vec.size();
1162  int size = count * 100;
1163  size += 45;
1164  char reply[size];
1165  snprintf(reply, size, str.str().c_str(), count);
1166 
1167  pClient->SendInfoModalMsg(reply);
1168 
1169  return nullptr;
1170 }
1171 
1173 {
1174  if (!pClient->IsInSpace())
1175  throw CustomError ("You're not in space.");
1176  if (!pClient->GetShipSE()->SysBubble())
1177  throw CustomError ("You're not in a bubble.");
1178  if (!pClient->GetShipSE()->DestinyMgr())
1179  throw CustomError ("You have no destiny manager.");
1180 
1181  uint16 bubbleID = atoi(args.arg(1).c_str());
1182  SystemBubble* pBubble = sBubbleMgr.FindBubbleByID(bubbleID);
1183  if (pBubble == nullptr)
1184  throw CustomError ("Bubble %u not found.", bubbleID);
1185 
1186  if (pBubble->GetSystemID() != pClient->GetSystemID())
1187  throw CustomError ("bubble %u is in %s and you are in %s", \
1188  bubbleID, pBubble->GetSystem()->GetName(), pClient->GetSystemName().c_str());
1189 
1190  pBubble->CmdDropLoot();
1191 
1192  return nullptr;
1193 }
1194 
1195 /* groove's new command.....
1196  * /fit [me|itemID] [typeID] [flag=slot]
1197  * then sends ScatterEvent OnRefreshModuleBanks after successful call.
1198  */
1199 
1200 /*defaultMacros = {'GMH: Unload All': '/unload me all',
1201  ' WM: Remove All Drones': '/unspawn range=500000* only=categoryDrone',
1202  'WM: Remove All Wrecks': '/unspawn range=500000 only=groupWreck',
1203  'WM: Remove CargoContainers': '/unspawn range=500000 only=groupCargoContainer',
1204  'WM: Remove SecureContainers': '/unspawn range=500000 only=groupSecureCargoContainer',
1205  'HEALSELF: Repair My Ship': '/heal',
1206  'HEALSELF: Repair My Modules': '/repairmodules',
1207  'GMH: Online My Modules': '/online me',
1208  'GML: Session Change 5sec': '/sessionchange 5'}
1209  */
1210 
1211 /*@Allan new command to implement. I may try but I don't know fuckall for destiny stuff
1212  * /reportdesync
1213  *
1214  * It wants a tuple of (dict, timestamp)
1215  * dict is:
1216  * key = ballID
1217  * val = pos (vector probably best to use util.KeyVal)(uses val.x, val.y, val.z)
1218  *
1219  * It compares the balls trying to find position and velocity inconsistencies showing them in a model window
1220  */
bool IsLogin()
Definition: Client.h:235
uint32 GetShipID() const
Definition: Client.h:150
PyResult Command_heal(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
#define sConfig
A macro for easier access to the singleton.
GVector GetHeading()
unsigned __int8 uint8
Definition: eve-compat.h:46
float GetCapacity(EVEItemFlags flag) const
Definition: Inventory.cpp:642
int64 fleetJoinTime()
Definition: Character.h:317
EvilNumber GetShipArmorPercent()
Definition: Ship.h:206
uint32 GetLocationID() const
Definition: Client.h:151
void GetSignatureList(std::vector< CosmicSignature > &sig)
Definition: AnomalyMgr.cpp:192
int64 GetRolesAtBase() const
Definition: Client.h:133
PyResult Command_bindList(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
uint32 GetSystemID() const
Definition: Client.h:152
PyResult Command_showall(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int8 fleetRole() const
Definition: Character.h:321
const std::string & arg(size_t index) const
Definition: Seperator.h:43
#define sConsole
Python string.
Definition: PyRep.h:430
PyServiceMgr & services() const
Definition: Client.h:90
PyResult Command_siglist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_bubblewarp(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
float GetSecurityRating() const
Definition: Client.h:172
int64 GetCorpRole() const
Definition: Client.h:129
std::map< uint32, SystemEntity * > GetEntities()
int32 GetCorpHQ() const
Definition: Client.h:124
float GetAccelTime()
bool HasAttribute(const uint16 attrID) const
float GetWarpDropSpeed()
double GetAgility()
uint32 GetRegionID() const
Definition: Client.h:154
SystemBubble * SysBubble()
Definition: SystemEntity.h:195
void GetEntities(std::map< uint32, SystemEntity * > &into) const
PyResult Command_warpto(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_runtest(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
EVEItemFlags
Definition: EVE_Flags.h:13
uint8 GetRatSpawnCount()
uint32 CountDynamics()
Definition: SystemBubble.h:81
ClientSession * GetSession()
Definition: Client.h:104
PyResult Command_halt(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_bubblelist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
const char * GetScanGroupName(uint8 groupID=0)
Definition: AnomalyMgr.cpp:539
float GetCorpHangerCapyUsed() const
Definition: Inventory.cpp:337
void SendInfoModalMsg(const char *fmt,...)
Definition: Client.cpp:2756
uint32 GetSysNPCCount()
int32 GetCharacterID() const
Definition: Client.h:113
void GetList(uint32 beltID, std::vector< AsteroidSE * > &list)
Definition: BeltMgr.cpp:221
bool IsInvul()
Definition: Client.h:234
void SetShowAll(bool set=false)
Definition: Client.h:270
int32 GetCorporationID() const
Definition: Client.h:123
bool IsUndock()
Definition: Client.h:236
#define sEntityList
Definition: EntityList.h:208
uint32 GetID() const
Definition: SystemManager.h:80
int64 GetClientID() const
Definition: Client.h:119
float GetAlignTime()
double GetRadius()
const char * name()
bool IsInSpace()
Definition: Client.h:228
Separates string to arguments.
Definition: Seperator.h:36
void SendNotifyMsg(const char *fmt,...)
Definition: Client.cpp:2776
TargetManager * TargetMgr()
Definition: SystemEntity.h:197
CharacterRef GetChar() const
Definition: Client.h:164
PyResult Command_destinyvars(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
itemID[count] Create count or of the specified item(from Insider)" ) COMMAND( goto
PyResult Command_showsession(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int64 GetRolesAtHQ() const
Definition: Client.h:135
static void GetCorpHangarNames(uint32 corpID, std::map< uint8, std::string > &hangarNames)
Definition: ServiceDB.cpp:567
const GPoint & GetPosition() const
Definition: SystemEntity.h:211
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in bubble
PyResult Command_track(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
float GetShipArmorHP()
Definition: Ship.h:198
AttributeMap * GetAttributeMap()
EvilNumber EvilZero
Definition: EvilNumber.cpp:32
PyResult Command_shutdown(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_dropLoot(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
bool IsSetStateSent()
Definition: Client.h:240
* args
std::string GetShipDNA()
Definition: Ship.cpp:1902
PyResult Command_secstatus(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
#define sFltSvc
Definition: FleetService.h:147
size_t argCount() const
Definition: Seperator.h:44
bool InPod()
Definition: Client.h:227
int64 GetSessionID()
Definition: ClientSession.h:76
Definition: gpoint.h:33
Base class for exceptions that can be converted to python objects.
Definition: PyExceptions.h:39
uint32 CountPlayers()
Definition: SystemBubble.h:80
void Heal()
Definition: Ship.cpp:458
DestinyManager * DestinyMgr()
Definition: SystemEntity.h:198
SystemManager * SystemMgr()
Definition: SystemEntity.h:196
bool IsBubbleWait()
Definition: Client.h:239
bool InFleet()
Definition: Client.h:142
EvilNumber GetShipShieldPercent()
Definition: Ship.h:207
int32 GetWarpSpeed()
PyResult Command_list(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
void BoundObjectVec(std::vector< BoundObj > &vec)
AnomalyMgr * GetAnomMgr()
PyResult Command_commandlist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
float GetShipPGLevel()
Definition: Ship.h:199
bool IsDocked()
Definition: Client.h:229
SystemManager * SystemMgr() const
Definition: Client.h:92
uint16 GetID()
Definition: SystemBubble.h:91
static const GPoint NULL_ORIGIN(0, 0, 0)
#define snprintf
Definition: eve-compat.h:184
PyResult Command_entityspawn(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int32 wingID() const
Definition: Character.h:319
uint32 PlayerCount()
double GetMaxVelocity()
void SetAutoStop(bool set=false)
Definition: Client.h:273
BeltMgr * GetBeltMgr()
PyResult Command_fleetboost(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
bool IsShowall()
Definition: Client.h:271
double GetInertia()
int8 fleetBooster() const
Definition: Character.h:322
bool HasBeyonce()
Definition: Client.h:238
void GetCargoList(std::multimap< uint8, InventoryItemRef > &cargoMap)
Definition: Inventory.cpp:332
PyResult Command_autostop(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
uint32 GetConstellationID() const
Definition: Client.h:153
X * get() const
Definition: RefPtr.h:213
int32 GetStationID2() const
Definition: Client.h:115
int32 squadID() const
Definition: Character.h:320
ShipItemRef GetShip() const
Definition: Client.h:167
const char * GetName() const
Definition: Client.h:94
PyResult Command_inventory(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
const char * GetName() const
Definition: SystemEntity.h:210
float GetShipCPULevel()
Definition: Ship.h:200
bool IsFleetBoss()
Definition: Client.h:143
Definition: Client.h:66
SystemEntity * GetClosestMoonSE(const GPoint &myPos)
int64 GetRolesAtAll() const
Definition: Client.h:131
itemID[count] Create count or of the specified() x() entityID Translocate to the specified entity Immediately stops ship
unsigned __int32 uint32
Definition: eve-compat.h:50
uint32 CountNPCs()
EvilNumber GetShipPGPercent()
Definition: Ship.h:205
PyResult Command_attrlist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int32 GetCloneStationID() const
Definition: Client.h:116
void GetAnomalyList(std::vector< CosmicSignature > &sig)
Definition: AnomalyMgr.cpp:200
void GetInventoryMap(std::map< uint32, InventoryItemRef > &invMap)
Definition: Inventory.cpp:453
std::string TargetList(uint16 &length, uint16 &count)
PyResult Command_bubbletrack(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_cargo(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
Definition: Ship.h:46
static void posTest(Client *pClient)
Definition: test.cpp:17
void WarpTo(const GPoint &where, int32 distance=0, bool autoPilot=false, SystemEntity *pSE=nullptr)
const char * GetName() const
Definition: SystemManager.h:84
float GetShipCapacitorLevel()
Definition: Ship.h:202
ShipSE * GetShipSE()
Definition: Client.h:168
double GetCapNeed()
PyResult Command_targlist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
void SetDestiny(const GPoint &pt, bool update=false)
Definition: Client.cpp:847
bool IsJump()
Definition: Client.h:232
PyResult Command_status(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
bool isNumber(size_t index) const
Definition: Seperator.h:46
PyResult Command_shipinventory(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int32 GetCorpAccountKey() const
Definition: Client.h:127
EvilNumber GetAttribute(const uint16 attrID) const
EvilNumber GetShipCPUPercent()
Definition: Ship.h:204
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
PyResult Command_fleetinvite(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
EvilNumber GetShipCapacitorPercent()
Definition: Ship.h:208
PyResult Command_skilllist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int8 fleetJob() const
Definition: Character.h:323
int64 GetRolesAtOther() const
Definition: Client.h:137
float GetShipShieldHP()
Definition: Ship.h:201
PyResult Command_shipvars(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
#define sItemFactory
Definition: ItemFactory.h:165
PyResult Command_shipdna(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
int32 GetStationID() const
Definition: Client.h:114
void EnterSystem(uint32 systemID)
Definition: Client.cpp:679
PyResult Command_getposition(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
float get_float()
Definition: EvilNumber.cpp:184
int32 fleetID() const
Definition: Character.h:318
Definition: gpoint.h:70
uint8 BeltCount()
std::string GetSystemName() const
Definition: Client.h:155
#define sBubbleMgr
EvilNumber GetShipHullPercent()
Definition: Ship.h:203
Inventory * GetMyInventory()
Definition: InventoryItem.h:91
unsigned __int16 uint16
Definition: eve-compat.h:48
void CopyAttributes(std::map< uint16, EvilNumber > &attrMap)
bool AutoStop()
Definition: Client.h:274
PyResult Command_beltlist(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
uint16 typeID() const
PyResult Command_players(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
PyResult Command_healtarget(Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
float GetShipHullHP()
Definition: Ship.h:197
uint16 GetRoidSpawnCount()
uint32 itemID() const
Definition: InventoryItem.h:98
float GetStoredVolume(EVEItemFlags flag, bool combined=true) const
Definition: Inventory.cpp:609
void RemoveMarkers()
#define sDataMgr
int32 GetUserID() const
Definition: Client.h:109