90 throw UserError (
"DeniedActivateTargetModuleDisallowed");
105 _log(MODULE__ERROR,
"Prospector::DoCycle() hit end of conditional.");
157 _log(MODULE__DEBUG,
"Prospector::CheckSuccess - chance: %i, roll: %u, success: %s", chance, roll, (
m_success ?
"true" :
"false"));
165 std::vector<uint32> list;
172 case 30: drop = 1;
break;
173 case 20: drop = 2;
break;
174 case 10: drop = 3;
break;
175 case 0: drop = 4;
break;
176 case -10: drop = 5;
break;
177 case -20: drop = 6;
break;
182 uint32 quantity = 0, minDrop = drop, maxDrop = (drop *
sConfig.rates.DropSalvage);
183 for (
auto cur : list) {
190 if (iRef.get() ==
nullptr)
192 if (sInv->HasAvailableSpace(
m_holdFlag, iRef)) {
195 _log(MODULE__DEBUG,
"Prospector::DropSalvage - dropped %u %s of %u/%u", quantity, iRef->name(), minDrop, maxDrop);
211 std::map<uint32, InventoryItemRef> shipLoot;
220 "Jettisoned Loot Container",
224 if (jetCanRef.get() !=
nullptr) {
225 for (
auto cur : shipLoot)
226 cur.second->Move(jetCanRef->itemID(),
flagNone);
233 jetCanRef->SetMySE(cSE);
#define sConfig
A macro for easier access to the singleton.
void AddEntity(SystemEntity *pSE, bool addSignal=true)
#define _log(type, fmt,...)
bool HasAttribute(const uint16 attrID) const
void SendJettisonPacket() const
const std::string & customInfo() const
void QueueDestinyEvent(PyTuple **multiEvent)
void SendNotifyMsg(const char *fmt,...)
CharacterRef GetChar() const
Prospector(ModuleItemRef mRef, ShipItemRef sRef)
void SetAttribute(uint32 attrID, EvilNumber val, bool update=true)
virtual WreckSE * GetWreckSE()
const GPoint & GetPosition() const
virtual bool CanActivate()
SystemEntity * m_targetSE
DestinyManager * DestinyMgr()
bool IsEven(int64 number)
InventoryItemRef GetSelf()
void SetItem(size_t index, PyRep *object)
Stores Python object.
virtual bool IsContainerSE()
virtual void AbortCycle()
Python object "ccp_exceptions.UserError".
virtual bool CanActivate()
void GetInventoryMap(std::map< uint32, InventoryItemRef > &invMap)
virtual void Activate(uint16 effectID, uint32 targetID=0, int16 repeat=0)
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
PyServiceMgr & GetServices()
uint32 GetCorporationID()
virtual Client * GetPilot()
EvilNumber GetAttribute(const uint16 attrID) const
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
virtual void Deactivate(std::string effect="")
Inventory * GetMyInventory()
EvilNumber GetAttribute(uint32 attrID)
virtual void Activate(uint16 effectID, uint32 targetID=0, int16 repeat=0)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.