Definition at line 410 of file InventoryBound.cpp.
References _log, InventoryItem::AddItem(), ShipItem::AddItemByFlag(), EVEDB::invGroups::Assembly_Array, EVEDB::invTypes::Bookmark, InventoryItem::categoryID(), EVEDB::invCategories::Celestial, EVEDB::invCategories::Charge, codelog, EVEDB::invGroups::Control_Tower, EVEDB::invGroups::Corporate_Hangar_Array, EVEDB::invGroups::Cynosural_Generator_Array, InventoryItem::Donate(), EVEDB::invGroups::Electronic_Warfare_Battery, EVEDB::invGroups::Energy_Neutralizing_Battery, ShipItem::FindAvailableModuleSlot(), InventoryItem::flag(), flagCargoHold, flagCorpMarket, flagDroneBay, flagIllegal, flagImpounded, flagLocked, flagNone, RefPtr< X >::get(), ShipItem::GetModule(), Client::GetShip(), InventoryItem::GetShipItem(), InventoryItem::groupID(), IsCargoHoldFlag, IsHangarFlag, IsModuleSlot, IsPlayerCorp, IsRigSlot, InventoryItem::itemID(), InventoryItem::locationID(), EVEDB::invGroups::Logistics_Array, m_flag, m_itemID, m_ownerID, m_self, EVEDB::invGroups::Mobile_Hybrid_Sentry, EVEDB::invGroups::Mobile_Laser_Sentry, EVEDB::invGroups::Mobile_Missile_Sentry, EVEDB::invGroups::Mobile_Projectile_Sentry, EVEDB::invCategories::Module, ShipItem::MoveModuleSlot(), InventoryItem::name(), EVEDB::invTypes::Office, EVEDB::invGroups::Orbital_Construction_Platform, EVEDB::invGroups::Orbital_Infrastructure, EVEDB::invCategories::Orbitals, pInventory, InventoryItem::quantity(), EVEDB::invGroups::Refining_Array, ShipItem::RemoveItem(), EVEDB::invGroups::Scanner_Array, sDataMgr, Client::SendNotifyMsg(), EVEDB::invGroups::Sensor_Dampening_Battery, EVEDB::invGroups::Shield_Hardening_Array, EVEDB::invCategories::Ship, ship, EVEDB::invGroups::Ship_Maintenance_Array, sItemFactory, InventoryItem::Split(), EVEDB::invGroups::Stasis_Webification_Battery, RefPtr< X >::StaticCast(), EVEDB::invCategories::Station, EVEDB::invGroups::Station, EVEDB::invGroups::Station_Services, EVEDB::invGroups::Stealth_Emitter_Array, EVEDB::invCategories::Structure, EVEDB::invGroups::Structure_Repair_Array, EVEDB::invGroups::Target_Painting_Battery, EvE::traceStack(), EVEDB::invCategories::Trading, ShipItem::TryModuleLimitChecks(), InventoryItem::typeID(), ShipItem::UnloadModule(), Inventory::ValidateAddItem(), ShipItem::VerifyHoldType(), and EVEDB::invGroups::Warp_Scrambling_Battery.
413 bool donating =
false,
ship =
false, customs =
false;
414 int32 origQty = quantity;
421 codelog(INV__ERROR,
"IB::MoveItems() - Trading Category called.");
511 std::vector<int32>::const_iterator itr = items.begin();
512 for (; itr != items.end(); ++itr) {
518 if (iRef.get() ==
nullptr) {
519 _log(INV__ERROR,
"IB::MoveItems() - item %i not found. continuing.", (*itr));
529 fromFlag = iRef->flag();
532 quantity = iRef->quantity();
537 quantity = iRef->quantity();
538 }
else if (quantity < 1) {
539 _log(INV__ERROR,
"IB::MoveItems() - Quantity < 1. Setting quantity = 1.");
545 throw UserError (
"CannotRemoveUpgradeManually");
548 if (pShip ==
nullptr)
549 throw CustomError (
"Ship not found. The %s wasnt moved. Ref: ServerError 63290", iRef->name());
557 throw CustomError (
"That module was not found. Chances are this is a server error, and either docking or reloging will correct it.");
558 if (pMod->IsActive())
559 throw CustomError (
"Your %s is currently active. You must wait for the cycle to complete before it can be removed.", pMod->GetSelf()->name());
563 throw CustomError (
"You cannot exchange module slots in space.");
568 Call_SingleIntegerArg result;
569 result.arg = iRef->itemID();
570 return result.Encode();
581 if (!moveStack and (quantity < iRef->quantity())) {
583 if (newItem.
get() ==
nullptr) {
584 _log(INV__ERROR,
"IB::MoveItems() - Error splitting item %u. Skipping.", iRef->itemID());
588 if (iRef.get() ==
nullptr) {
589 _log(INV__ERROR,
"IB::MoveItems() - Error getting split item. Skipping.");
592 if (iRef->quantity() > quantity) {
593 _log(INV__ERROR,
"IB::MoveItems() - Split item %u qty(%u) > requested qty of %u. Continuing.", \
594 iRef->itemID(), iRef->quantity(), quantity);
611 pClient->
SendNotifyMsg(
"Your ship has no available slots to fit this module. Putting the %s in your CargoHold.", iRef->name());
634 if (contRef.
get() !=
nullptr) {
637 _log(INV__ERROR,
"IB::MoveItems() - previous container for item %i not found. continuing.", (*itr));
641 }
else if (customs) {
653 if (iRef.get() ==
nullptr)
656 if (items.size() == 1) {
658 Call_SingleIntegerArg result;
659 result.arg = iRef->itemID();
660 return result.Encode();
virtual InventoryItemRef Split(int32 qty=0, bool notify=true, bool silent=false)
void UnloadModule(uint32 itemID)
#define _log(type, fmt,...)
virtual void AddItem(InventoryItemRef iRef)
void VerifyHoldType(EVEItemFlags flag, InventoryItemRef iRef, Client *pClient=nullptr)
void SendNotifyMsg(const char *fmt,...)
Advanced version of UserError that allows to send a full custom message.
#define codelog(type, fmt,...)
uint32 locationID() const
ShipItemRef GetShip() const
virtual ShipItem * GetShipItem()
#define IsPlayerCorp(itemID)
Python object "ccp_exceptions.UserError".
itemID[count] Create count or of the specified() x() entityID Translocate to the specified entity Immediately stops ship
static RefPtr StaticCast(const RefPtr< Y > &oth)
Acts as static_cast from one RefPtr to another.
void TryModuleLimitChecks(EVEItemFlags flag, InventoryItemRef iRef)
#define IsModuleSlot(flag)
GenericModule * GetModule(EVEItemFlags flag)
#define IsCargoHoldFlag(flag)
virtual void RemoveItem(InventoryItemRef iRef)
#define IsHangarFlag(flag)
uint32 AddItemByFlag(EVEItemFlags flag, InventoryItemRef iRef, Client *pClient=nullptr)
EVEItemFlags FindAvailableModuleSlot(InventoryItemRef iRef)
bool ValidateAddItem(EVEItemFlags flag, InventoryItemRef iRef) const
void MoveModuleSlot(EVEItemFlags slot1, EVEItemFlags slot2)