152 if (pClient ==
nullptr) {
153 sLog.Error(
"Sentry::Killed()",
"killer == IsDrone and pPlayer == nullptr");
158 killerID = killer->
GetID();
165 if (pClient !=
nullptr) {
173 if (wreckPosition.
isNaN()) {
174 sLog.Error(
"Sentry::Killed()",
"Wreck Position is NaN");
185 wreck_name +=
" Wreck";
188 if (wreckItemRef.get() ==
nullptr) {
189 sLog.Error(
"Sentry::Killed()",
"Creating Wreck Item Failed for %s of type %u", wreck_name.c_str(), wreckTypeID);
194 _log(PHYSICS__TRACE,
"Sentry::Killed() - Sentry %s(%u) Position: %.2f,%.2f,%.2f. Wreck %s(%u) Position: %.2f,%.2f,%.2f.", \
195 GetName(),
GetID(),
x(),
y(),
z(), wreckItemRef->name(), wreckItemRef->itemID(), wreckPosition.
x, wreckPosition.
y, wreckPosition.
z);
203 wreckEntity.
itemID = wreckItemRef->itemID();
205 wreckEntity.
ownerID = killerID;
206 wreckEntity.
typeID = wreckTypeID;
207 wreckEntity.
position = wreckPosition;
210 sLog.Error(
"Sentry::Killed()",
"Spawning Wreck Failed: typeID or typeName not supported: '%u'", wreckTypeID);
211 wreckItemRef->Delete();
void Append(const T &value)
Appends a single value to buffer.
#define sConfig
A macro for easier access to the singleton.
#define _log(type, fmt,...)
void TargetLost(SystemEntity *by_who)
#define IsWreckTypeID(typeID)
DestinyManager * m_destiny
bool HasAttribute(const uint16 attrID) const
virtual void Killed(Damage &fatal_blow)
void SendJettisonPacket() const
virtual void EncodeDestiny(Buffer &into)
double MakeRandomFloat(double low, double high)
Generates random real from interval [low; high].
GaExpInl bool isNaN() const
static void AddKill(uint32 sysID)
virtual Client * GetPilot()
int32 GetCharacterID() const
static void AddFactionKill(uint32 sysID)
const float GetSystemSecurityRating()
CharacterRef GetChar() const
bool BuildDynamicEntity(const DBSystemDynamicEntity &entity, uint32 launcherID=0)
virtual void TargetLost(SystemEntity *who)
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()
void SetAttribute(uint16 attrID, int num, bool notify=true)
const char * GetName() const
Sentry(InventoryItemRef self, PyServiceMgr &services, SystemManager *system, const FactionData &data)
uint32 GetCorporationID()
const std::string & itemName() const
int main(int argc, char *argv[])
void DropLoot(WreckContainerRef wreckRef, uint32 groupID, uint32 owner)
EvilNumber GetAttribute(const uint16 attrID) const
void AwardSecurityStatus(InventoryItemRef iRef, Character *pChar)
const GPoint & GetPosition() const
#define IsAlliance(itemID)
virtual void TargetedAdd(SystemEntity *who)
void Targeted(SystemEntity *by_who)
const char * itoa(int64 num)
Convers num to string.