122 InvBroker_BindArgs
args;
125 if (!args.Decode(&tmp)) {
126 codelog(SERVICE__ERROR,
"%s: Failed to decode bind args.",
GetName());
130 _log(INV__BIND,
"InvBrokerService bind request:");
131 args.Dump(INV__BIND,
" ");
139 Call_TwoIntegerArgs
args;
143 if (!args.Decode(&call.
tuple)) {
144 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
149 if (item.
get() ==
nullptr) {
150 _log(INV__ERROR,
"GetContainerContents() - Unable to load inventory for itemID %u in locationID %u", args.arg1, args.arg2);
155 _log(INV__MESSAGE,
"Handle_GetContainerContents() - %s(%u) is owned by calling character %s(%u) ", \
158 _log(INV__WARNING,
"Handle_GetContainerContents() - %s(%u) is in space and not owned by calling character %s(%u) ", \
161 _log(INV__WARNING,
"Handle_GetContainerContents() - %s(%u) is not owned by calling character %s(%u) ", \
163 throw UserError (
"CantDoThatWithSomeoneElsesStuff");
176 _log(INV__DUMP,
"InvBrokerBound::Handle_GetInventoryFromId()",
"size=%u", call.
tuple->
size());
177 call.
Dump(INV__DUMP);
179 Call_TwoIntegerArgs
args;
180 if (!args.Decode(&call.
tuple)) {
181 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
185 bool passive = (args.arg2 != 0);
193 iRef =
sItemFactory.GetInventoryItemFromID( args.arg1 );
196 if (iRef.get() ==
nullptr) {
197 _log(INV__ERROR,
"GetInventoryFromId() - Unable to get inventoryItem for itemID %u", args.arg1);
205 uint32 ownerID = iRef->ownerID();
216 switch (iRef->categoryID()) {
218 switch (iRef->groupID()) {
247 switch(iRef->groupID()) {
257 switch(iRef->groupID()) {
277 _log(INV__WARNING,
"GetInventoryFromID called for Trading locationID %u using itemID %u",
m_locationID, args.arg1);
281 switch (iRef->groupID ()) {
285 if (
sDataMgr.IsSolarSystem(iRef->locationID())) {
287 float maxDistance = 2500.0f;
292 if (direction.length () > maxDistance)
311 _log(INV__DUMP,
"InvBrokerBound::Handle_GetInventory() size=%u", call.
tuple->
size());
312 call.
Dump(INV__DUMP);
313 Inventory_GetInventory
args;
314 if (!args.Decode(&call.
tuple)) {
315 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
319 uint32 ownerID = args.ownerID;
327 _log(INV__WARNING,
"GetInventory called for solar system %u",
m_locationID);
335 if (item.
get() ==
nullptr) {
341 switch(args.container) {
395 _log(INV__ERROR,
"Unhandled container type %u for locationID %u", args.container,
m_locationID);
410 if (!args.Decode(&call.
tuple)) {
411 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
417 if (iRef.
get() ==
nullptr) {
432 _log(INV__ERROR,
"%u(%u) tried to rename CorpItem %s(%u) owned by %u.", \
434 iRef->itemID(), iRef->
ownerID());
439 _log(INV__ERROR,
"%u(%u) tried to rename PlayerItem %s(%u) owned by %u.", \
441 iRef->itemID(), iRef->
ownerID());
467 Call_TrashItems
args;
468 if (!args.Decode(&call.
tuple)) {
469 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
473 std::vector<int32>::const_iterator cur = args.items.begin(), end = args.items.end();
474 for(; cur != end; ++cur) {
476 if (item.
get() ==
nullptr) {
477 _log(INV__ERROR,
"%s: Unable to load item %u to delete it. Skipping.", call.
client->
GetName(), *cur);
479 _log(INV__ERROR,
"%s: Tried to trash item %u which is not yours. Skipping.", call.
client->
GetName(), *cur);
480 }
else if (item->
locationID() != args.locationID) {
481 _log(INV__ERROR,
"%s: Item %u is not in location %u. Skipping.", call.
client->
GetName(), *cur, args.locationID);
515 sLog.Warning(
"InvBrokerBound::Handle_AssembleCargoContainer()",
"size= %u", call.
tuple->
size() );
516 call.
Dump(INV__DUMP);
523 sLog.Warning(
"InvBrokerBound::Handle_BreakPlasticWrap()",
"size= %u", call.
tuple->
size() );
524 call.
Dump(INV__DUMP);
531 sLog.Warning(
"InvBrokerBound::Handle_TakeOutTrash()",
"size= %u", call.
tuple->
size() );
532 call.
Dump(INV__DUMP);
549 sLog.Warning(
"InvBrokerBound::Handle_SplitStack()",
"size= %u", call.
tuple->
size() );
550 call.
Dump(INV__DUMP);
570 sLog.Warning(
"InvBrokerBound::Handle_DeliverToCorpHangar()",
"size= %u", call.
tuple->
size() );
571 call.
Dump(INV__DUMP);
589 sLog.Warning(
"InvBrokerBound::Handle_DeliverToCorpMember()",
"size= %u", call.
tuple->
size() );
590 call.
Dump(INV__DUMP);
Dispatcher *const m_dispatch
static std::string StringContent(PyRep *pRep)
void SendErrorMsg(const char *fmt,...)
#define _log(type, fmt,...)
#define IsOfficeFolder(itemID)
virtual PyRep * Clone() const =0
Clones object.
const GPoint & position() const
PyCallable_DECL_CALL(GetContainerContents)
int32 GetCharacterID() const
int32 GetWarFactionID() const
virtual ~InvBrokerService()
int32 GetCorporationID() const
std::string m_strBoundObjectName
const char * GetName() const
itemID[count] Create count or of the specified item(from Insider)" ) COMMAND( goto
int32 GetAllianceID() const
void _SetCallDispatcher(CallDispatcher *d)
#define sLog
Evaluates to a NewLog instance.
virtual PyBoundObject * CreateBoundObject(Client *pClient, const PyRep *bind_args)
PyCallable_Make_Dispatcher(InvBrokerBound) InvBrokerBound(PyServiceMgr *mgr
UserError & AddAmount(const char *name, int quantity)
Shorthand method for adding a quantity value.
Dispatcher *const m_dispatch
Dispatcher *const m_dispatch
virtual ~InvBrokerBound()
#define codelog(type, fmt,...)
uint32 locationID() const
PyServiceMgr *const m_manager
ShipItemRef GetShip() const
const char * GetName() const
#define IsPlayerCorp(itemID)
#define IsCharacterID(itemID)
Python object "ccp_exceptions.UserError".
#define PyCallable_REG_CALL(c, m)
PyServiceMgr *const m_manager
PySubStruct * BindObject(Client *pClient, PyBoundObject *pObj, PyDict *dict=nullptr, PyDict *oid=nullptr)
void Dump(LogType type) const
virtual void Rename(std::string name)
PyCallable_Make_InnerDispatcher(InvBrokerService) InvBrokerService
Inventory * GetMyInventory()
CRowSet * List(EVEItemFlags flag, uint32 ownerID=0) const
const char * GetName() const