EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DungeonCommands.cpp File Reference
Include dependency graph for DungeonCommands.cpp:

Go to the source code of this file.

Functions

DungeonCommands.cpp

Dungeon Command system for EVEmu

: Allan

Date
: 20 August 2019
PyResult Command_savedungeon (Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
 
PyResult Command_printdungeon (Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
 
PyResult Command_spawndungeon (Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
 
PyResult Command_removedungeon (Client *pClient, CommandDB *db, PyServiceMgr *services, const Seperator &args)
 

Function Documentation

PyResult Command_printdungeon ( Client pClient,
CommandDB db,
PyServiceMgr services,
const Seperator args 
)

Definition at line 66 of file DungeonCommands.cpp.

67 {
68  /* this will print all items in current dungeon, along with it's templateID and roomID
69  *
70  */
71 
72  throw CustomError ("PrintDungeon: - This command is currently incomplete.");
73 }
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
PyResult Command_removedungeon ( Client pClient,
CommandDB db,
PyServiceMgr services,
const Seperator args 
)

Definition at line 93 of file DungeonCommands.cpp.

93  {
94  /* this command is used to test dungeon spawn system - wip. -allan 21Feb15
95  *
96  * upon execution, this command will spawn a random dungeon from db in callers solarSystem,
97  * then create a bookmark in their PnP/BM window
98  */
99  throw CustomError ("RemoveDungeon: - This command is currently incomplete.");
100  return nullptr;
101 }
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
PyResult Command_savedungeon ( Client pClient,
CommandDB db,
PyServiceMgr services,
const Seperator args 
)

the idea here is to save a dungeon room template while ingame. the client calling this is used as "warp-in point" which is the origin all items in bubble will be queried and their positions calculated, then saved. we should expect a roomID here, and check for existing roomIDs to avoid overwrite.

  • maybe later when system matures, we can allow overwrite. u/k at this time.

Definition at line 28 of file DungeonCommands.cpp.

References Seperator::arg(), Seperator::argCount(), Seperator::isNumber(), Client::SendInfoModalMsg(), and snprintf.

29 {
37  if (pClient == nullptr) // should never hit,
38  throw CustomError ("SaveDungeon: Invalid Caller - Client sent NULL.");
39 
40  if (args.argCount() < 2)
41  throw CustomError ("SaveDungeon: Missing Arguments (use '.savedungeon help' for usage)");
42 
43 
44  if (args.argCount() == 2) { //
45  if (args.isNumber(1)) {
46  // not used yet
47  }
48  }
49 
50  if (strcmp(args.arg(1).c_str(), "help") == 0) {
51  // {.savedungeon help} will display the following information in notification window
52  std::ostringstream str; // for 'help' printing
53  str << ".savedungeon [groupID] [group name/description]<br>"; //55
54  int size = 55;
55  char reply[size];
56  snprintf(reply, size, str.str().c_str());
57  pClient->SendInfoModalMsg(reply);
58  return nullptr;
59  } else if (args.isNumber(1)) {
60  // not used yet
61  }
62 
63  throw CustomError ("SaveDungeon: - This command is currently incomplete.");
64 }
const std::string & arg(size_t index) const
Definition: Seperator.h:43
void SendInfoModalMsg(const char *fmt,...)
Definition: Client.cpp:2756
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
size_t argCount() const
Definition: Seperator.h:44
#define snprintf
Definition: eve-compat.h:184
bool isNumber(size_t index) const
Definition: Seperator.h:46

Here is the call graph for this function:

PyResult Command_spawndungeon ( Client pClient,
CommandDB db,
PyServiceMgr services,
const Seperator args 
)

Definition at line 76 of file DungeonCommands.cpp.

References Seperator::argCount(), and Seperator::isNumber().

76  {
77  /* this command is used to test dungeon spawn system - wip. -allan 21Feb15
78  */
79 
80  if (args.argCount() != 2)
81  throw CustomError ("Correct Usage: .spawndungeon <dungeonTemplateID>");
82 
83  if (!args.isNumber(1))
84  throw CustomError ("Argument must be a template ID.");
85 
86  // pClient->SystemMgr()->GetDungMgr()->Create(args.arg(1)); // this is missing sig data.
87 
88  throw CustomError ("SpawnDungeon: - This command is currently incomplete.");
89  return nullptr;
90 }
Advanced version of UserError that allows to send a full custom message.
Definition: PyExceptions.h:453
size_t argCount() const
Definition: Seperator.h:44
bool isNumber(size_t index) const
Definition: Seperator.h:46

Here is the call graph for this function: