45 assert (
m_AI !=
nullptr);
97 _log(DRONE__TRACE,
"Created Drone object for %s (%u)", drone.
get()->
name(), drone.
get()->
itemID());
128 if (
sConfig.debug.UseProfiling)
157 if (pShipSE ==
nullptr)
172 if (pShipSE ==
nullptr)
207 OnDroneStateChange du;
384 if (pClient ==
nullptr) {
385 sLog.Error(
"DroneSE::Killed()",
"killer == IsDrone and pPlayer == nullptr");
390 killerID = killer->
GetID();
393 if (pClient !=
nullptr) {
401 if (wreckPosition.
isNaN()) {
402 sLog.Error(
"DroneSE::Killed()",
"Wreck Position is NaN");
406 uint32 wreckTypeID = 26972;
409 wreck_name +=
" Wreck";
412 if (wreckItemRef.get() ==
nullptr) {
413 sLog.Error(
"DroneSE::Killed()",
"Creating Wreck Item Failed for %s of type %u", wreck_name.c_str(), wreckTypeID);
418 _log(PHYSICS__TRACE,
"DroneSE::Killed() - Drone %s(%u) Position: %.2f,%.2f,%.2f. Wreck %s(%u) Position: %.2f,%.2f,%.2f.", \
419 GetName(),
GetID(),
x(),
y(),
z(), wreckItemRef->name(), wreckItemRef->itemID(), wreckPosition.
x, wreckPosition.
y, wreckPosition.
z);
427 wreckEntity.
itemID = wreckItemRef->itemID();
429 wreckEntity.
ownerID = killerID;
430 wreckEntity.
typeID = wreckTypeID;
431 wreckEntity.
position = wreckPosition;
434 sLog.Error(
"DroneSE::Killed()",
"Spawning Wreck Failed for typeID %u", wreckTypeID);
435 wreckItemRef->Delete();
DroneSE(InventoryItemRef drone, PyServiceMgr &services, SystemManager *pSystem, const FactionData &data)
void Append(const T &value)
Appends a single value to buffer.
void AssignShip(ShipSE *pSE)
#define sConfig
A macro for easier access to the singleton.
uint32 m_controllerOwnerID
virtual void TargetedAdd(SystemEntity *who)
void AddEntity(SystemEntity *pSE, bool addSignal=true)
double GetFollowDistance()
void Online(ShipSE *pShipSE=nullptr)
#define _log(type, fmt,...)
DestinyManager * m_destiny
bool HasAttribute(const uint16 attrID) const
void SendJettisonPacket() const
GaExpInl bool isNaN() const
virtual Client * GetPilot()
Python floating point number.
const GVector & GetVelocity() const
int32 GetCharacterID() const
int32 GetWarFactionID() const
void SetMaxVelocity(float maxVelocity)
int32 GetCorporationID() const
virtual void TargetedLost(SystemEntity *who)
const float GetSystemSecurityRating()
CharacterRef GetChar() const
float GetSecurityRating() const
void SetOwner(Client *pClient)
bool BuildDynamicEntity(const DBSystemDynamicEntity &entity, uint32 launcherID=0)
int32 GetAllianceID() const
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
const ItemType & type() const
#define is_log_enabled(type)
#define sLog
Evaluates to a NewLog instance.
Generic class for buffers.
InventoryItemRef GetSelf()
PyTuple * MakeDamageState()
void SetItem(size_t index, PyRep *object)
Stores Python object.
virtual void TargetLost(SystemEntity *who)
void Targeted(SystemEntity *by_who)
void SetSpeedFraction(float fraction=1.0f, bool startMovement=false)
void SetAttribute(uint16 attrID, int num, bool notify=true)
void AddItemInt(int32 intval)
void ChangeOwner(uint32 new_owner, bool notify=false)
const char * GetName() const
virtual void EncodeDestiny(Buffer &into)
virtual void Killed(Damage &fatal_blow)
void Launch(ShipSE *pShipSE)
void TargetLost(SystemEntity *by_who)
void AwardBounty(Client *pClient)
uint32 GetCorporationID()
const std::string & itemName() const
void UpdateShipVariables()
int main(int argc, char *argv[])
void Orbit(SystemEntity *pSE, uint32 distance=0)
EvilNumber GetAttribute(const uint16 attrID) const
#define IsFaction(itemID)
virtual PyDict * MakeSlimItem()
void AwardSecurityStatus(InventoryItemRef iRef, Character *pChar)
const GPoint & GetPosition() const
void BubblecastDestinyUpdate(std::vector< PyTuple * > &updates, const char *desc) const
#define IsAlliance(itemID)
virtual void TargetAdded(SystemEntity *who)
const char * itoa(int64 num)
Convers num to string.
void IdleOrbit(ShipSE *pShipSE=nullptr)