Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Corpse Class Reference

#include <Corpse.h>

Inheritance diagram for Corpse:
Collaboration diagram for Corpse:

Public Member Functions

void AddToWorld ()
 Corpse (CorpseType type=CorpseType::CORPSE_BONES)
bool Create (uint32 guidlow, Map *map)
bool Create (uint32 guidlow, Player *owner)
void DeleteBonesFromWorld ()
void DeleteFromDB (SQLTransaction &trans)
time_t const & GetGhostTime () const
GridCoord const & GetGridCoord () const
uint64 GetOwnerGUID () const
CorpseType GetType () const
bool IsExpired (time_t t) const
bool LoadCorpseFromDB (uint32 guid, Field *fields)
void RemoveFromWorld ()
void ResetGhostTime ()
void SaveToDB ()
void SetGridCoord (GridCoord const &gridCoord)
 ~Corpse ()
Public Member Functions inherited from WorldObject
void _Create (uint32 guidlow, HighGuid guidhigh, uint32 phaseMask)
void AddObjectToRemoveList ()
void AddToNotify (uint16 f)
void BuildUpdate (UpdateDataMapType &)
bool CanSeeOrDetect (WorldObject const *obj, bool ignoreStealth=false, bool distanceCheck=false) const
virtual void CleanupsBeforeDelete (bool finalCleanup=true)
void ClearPhases (bool update=false)
void DestroyForNearbyPlayers ()
MapFindMap () const
CreatureFindNearestCreature (uint32 entry, float range, bool alive=true) const
GameObjectFindNearestGameObject (uint32 entry, float range) const
GameObjectFindNearestGameObjectOfType (GameobjectTypes type, float range) const
uint32 GetAreaId () const
Map const * GetBaseMap () const
void GetClosePoint (float &x, float &y, float &z, float size, float distance2d=0, float angle=0) const
void GetContactPoint (WorldObject const *obj, float &x, float &y, float &z, float distance2d=CONTACT_DISTANCE) const
void GetCreatureListWithEntryInGrid (std::list< Creature * > &lList, uint32 uiEntry, float fMaxSearchRange) const
float GetDistance (float x, float y, float z) const
float GetDistance (Position const &pos) const
float GetDistance (WorldObject const *obj) const
float GetDistance2d (float x, float y) const
float GetDistance2d (WorldObject const *obj) const
bool GetDistanceOrder (WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
float GetDistanceZ (WorldObject const *obj) const
void GetFirstCollisionPosition (Position &pos, float dist, float angle)
void GetGameObjectListWithEntryInGrid (std::list< GameObject * > &lList, uint32 uiEntry, float fMaxSearchRange) const
float GetGridActivationRange () const
uint32 GetInstanceId () const
InstanceScriptGetInstanceScript ()
virtual uint8 getLevelForTarget (WorldObject const *) const
MapGetMap () const
std::string const & GetName () const
virtual std::string const & GetNameForLocaleIdx (LocaleConstant) const
void GetNearPoint (WorldObject const *searcher, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle) const
void GetNearPoint2D (float &x, float &y, float distance, float absAngle) const
void GetNearPosition (Position &pos, float dist, float angle)
uint16 GetNotifyFlags () const
float GetObjectSize () const
uint32 GetPhaseMask () const
std::set< uint32 > const & GetPhases () const
void GetPlayerListInGrid (std::list< Player * > &lList, float fMaxSearchRange) const
void GetRandomNearPosition (Position &pos, float radius)
void GetRandomPoint (Position const &srcPos, float distance, float &rand_x, float &rand_y, float &rand_z) const
void GetRandomPoint (Position const &srcPos, float distance, Position &pos) const
float GetSightRange (WorldObject const *target=NULL) const
virtual float GetStationaryO () const
virtual float GetStationaryX () const
virtual float GetStationaryY () const
virtual float GetStationaryZ () const
std::set< uint32 > const & GetTerrainSwaps () const
virtual uint64 GetTransGUID () const
float GetTransOffsetO () const
float GetTransOffsetX () const
float GetTransOffsetY () const
float GetTransOffsetZ () const
TransportGetTransport () const
int8 GetTransSeat () const
uint32 GetTransTime () const
float GetVisibilityRange () const
std::set< uint32 > const & GetWorldMapSwaps () const
void GetZoneAndAreaId (uint32 &zoneid, uint32 &areaid) const
uint32 GetZoneId () const
ZoneScriptGetZoneScript () const
bool HasPhaseList (uint32 phase)
bool InSamePhase (uint32 phasemask) const
bool InSamePhase (WorldObject const *obj) const
bool isActiveObject () const
bool isInBack (WorldObject const *target, float arc=M_PI) const
bool IsInBetween (WorldObject const *obj1, WorldObject const *obj2, float size=0) const
bool isInFront (WorldObject const *target, float arc=M_PI) const
bool IsInMap (WorldObject const *obj) const
bool IsInRange (WorldObject const *obj, float minRange, float maxRange, bool is3D=true) const
bool IsInRange2d (float x, float y, float minRange, float maxRange) const
bool IsInRange3d (float x, float y, float z, float minRange, float maxRange) const
bool isNeedNotify (uint16 f) const
bool IsPermanentWorldObject () const
bool IsPhased (uint32 phase) const
bool IsPhased (WorldObject const *obj) const
bool IsSelfOrInSameMap (WorldObject const *obj) const
bool IsTerrainSwaped (uint32 terrainSwap) const
bool IsWithinDist (WorldObject const *obj, float dist2compare, bool is3D=true) const
bool IsWithinDist2d (float x, float y, float dist) const
bool IsWithinDist2d (Position const *pos, float dist) const
bool IsWithinDist3d (float x, float y, float z, float dist) const
bool IsWithinDist3d (Position const *pos, float dist) const
bool IsWithinDistInMap (WorldObject const *obj, float dist2compare, bool is3D=true) const
bool IsWithinLOS (float x, float y, float z) const
bool IsWithinLOSInMap (WorldObject const *obj) const
bool IsWorldObject () const
void MonsterSay (const char *text, Language language, WorldObject const *target)
void MonsterSay (int32 textId, Language language, WorldObject const *target)
void MonsterTextEmote (const char *text, WorldObject const *target, bool IsBossEmote=false)
void MonsterTextEmote (int32 textId, WorldObject const *target, bool IsBossEmote=false)
void MonsterWhisper (const char *text, Player const *target, bool IsBossWhisper=false)
void MonsterWhisper (int32 textId, Player const *target, bool IsBossWhisper=false)
void MonsterYell (const char *text, Language language, WorldObject const *target)
void MonsterYell (int32 textId, Language language, WorldObject const *target)
void MovePosition (Position &pos, float dist, float angle)
void MovePositionToFirstCollision (Position &pos, float dist, float angle)
bool NotifyExecuted (uint16 f) const
void PlayDirectSound (uint32 sound_id, Player *target=NULL)
void PlayDistanceSound (uint32 sound_id, Player *target)
void RebuildTerrainSwaps ()
void RebuildWorldMapAreaSwaps ()
void ResetAllNotifies ()
virtual void ResetMap ()
virtual void SaveRespawnTime ()
virtual void SendMessageToSet (WorldPacket *data, bool self)
virtual void SendMessageToSet (WorldPacket *data, Player const *skipped_rcvr)
virtual void SendMessageToSetInRange (WorldPacket *data, float dist, bool self)
void SendObjectDeSpawnAnim (uint64 guid)
void SendPlaySound (uint32 SoundSound, bool OnlySelf)
void setActive (bool isActiveObject)
virtual void SetMap (Map *map)
void SetName (std::string const &newname)
void SetNotified (uint16 f)
virtual bool SetPhased (uint32 id, bool update, bool apply)
virtual void SetPhaseMask (uint32 newPhaseMask, bool update)
void SetTransport (Transport *t)
void SetWorldObject (bool apply)
void SetZoneScript ()
TempSummonSummonCreature (uint32 id, float x, float y, float z, float ang=0, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0) const
TempSummonSummonCreature (uint32 id, Position const &pos, TempSummonType spwtype=TempSummonType::TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
void SummonCreatureGroup (uint8 group, std::list< TempSummon * > *list=NULL)
GameObjectSummonGameObject (uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime)
CreatureSummonTrigger (float x, float y, float z, float ang, uint32 dur, CreatureAI *(*GetAI)(Creature *)=NULL)
virtual void Update (uint32)
void UpdateAllowedPositionZ (float x, float y, float &z) const
void UpdateAreaPhase ()
void UpdateGroundPositionZ (float x, float y, float &z) const
virtual void UpdateObjectVisibility (bool forced=true)
template<class NOTIFIER>
void VisitNearbyGridObject (float const &radius, NOTIFIER &notifier) const
template<class NOTIFIER>
void VisitNearbyObject (float const &radius, NOTIFIER &notifier) const
template<class NOTIFIER>
void VisitNearbyWorldObject (float const &radius, NOTIFIER &notifier) const
virtual ~WorldObject ()
Public Member Functions inherited from Object
bool AddUInt64Value (uint16 index, uint64 value)
void ApplyModFlag (uint16 index, uint32 flag, bool apply)
void ApplyModFlag64 (uint16 index, uint64 flag, bool apply)
void ApplyModInt32Value (uint16 index, int32 val, bool apply)
void ApplyModPositiveFloatValue (uint16 index, float val, bool apply)
void ApplyModSignedFloatValue (uint16 index, float val, bool apply)
void ApplyModUInt32Value (uint16 index, int32 val, bool apply)
void ApplyPercentModFloatValue (uint16 index, float val, bool apply)
virtual void BuildCreateUpdateBlockForPlayer (UpdateData *data, Player *target) const
void BuildFieldsUpdate (Player *, UpdateDataMapType &) const
void BuildOutOfRangeUpdateBlock (UpdateData *data) const
void BuildValuesUpdateBlockForPlayer (UpdateData *data, Player *target) const
void ClearUpdateMask (bool remove)
virtual void DestroyForPlayer (Player *target, bool onDeath=false) const
void ForceValuesUpdateAtIndex (uint32)
uint8 GetByteValue (uint16 index, uint8 offset) const
uint32 GetDynamicUInt32Value (uint32 tab, uint16 index) const
uint32 GetEntry () const
float GetFloatValue (uint16 index) const
uint64 GetGUID () const
uint32 GetGUIDHigh () const
uint32 GetGUIDLow () const
uint32 GetGUIDMid () const
int32 GetInt32Value (uint16 index) const
ObjectGuid GetObjectGUID () const
float GetObjectScale () const
const ByteBufferGetPackGUID () const
TypeID GetTypeId () const
uint16 GetUInt16Value (uint16 index, uint8 offset) const
uint32 GetUInt32Value (uint16 index) const
uint64 GetUInt64Value (uint16 index) const
uint16 GetValuesCount () const
bool HasByteFlag (uint16 index, uint8 offset, uint8 flag) const
bool HasFlag (uint16 index, uint32 flag) const
bool HasFlag64 (uint16 index, uint64 flag) const
virtual bool hasInvolvedQuest (uint32) const
virtual bool hasQuest (uint32) const
bool IsInWorld () const
bool isType (uint16 mask) const
void RemoveByteFlag (uint16 index, uint8 offset, uint8 newFlag)
void RemoveFieldNotifyFlag (uint16 flag)
void RemoveFlag (uint16 index, uint32 oldFlag)
void RemoveFlag64 (uint16 index, uint64 oldFlag)
bool RemoveUInt64Value (uint16 index, uint64 value)
void SendDestroyObject (Player *target, ObjectGuid Guid, bool onDeath=false) const
void SendUpdateToPlayer (Player *player)
void SetByteFlag (uint16 index, uint8 offset, uint8 newFlag)
void SetByteValue (uint16 index, uint8 offset, uint8 value)
void SetDynamicUInt32Value (uint32 tab, uint16 index, uint32 value)
void SetEntry (uint32 entry)
void SetFieldNotifyFlag (uint16 flag)
void SetFlag (uint16 index, uint32 newFlag)
void SetFlag64 (uint16 index, uint64 newFlag)
void SetFloatValue (uint16 index, float value)
void SetInt16Value (uint16 index, uint8 offset, int16 value)
void SetInt32Value (uint16 index, int32 value)
virtual void SetObjectScale (float scale)
void SetStatFloatValue (uint16 index, float value)
void SetStatInt32Value (uint16 index, int32 value)
void SetUInt16Value (uint16 index, uint8 offset, uint16 value)
void SetUInt32Value (uint16 index, uint32 value)
void SetUInt64Value (uint16 index, uint64 value)
AreaTriggerToAreaTrigger ()
AreaTrigger const * ToAreaTrigger () const
CorpseToCorpse ()
Corpse const * ToCorpse () const
CreatureToCreature ()
Creature const * ToCreature () const
DynamicObjectToDynObject ()
DynamicObject const * ToDynObject () const
GameObjectToGameObject ()
GameObject const * ToGameObject () const
void ToggleByteFlag (uint16 index, uint8 offset, uint8 flag)
void ToggleFlag (uint16 index, uint32 flag)
void ToggleFlag64 (uint16 index, uint64 flag)
PlayerToPlayer ()
Player const * ToPlayer () const
UnitToUnit ()
Unit const * ToUnit () const
void UpdateUInt32Value (uint16 index, uint32 value)
virtual ~Object ()
Public Member Functions inherited from WorldLocation
uint32 GetMapId () const
 WorldLocation (const WorldLocation &loc)
 WorldLocation (uint32 _mapid=MAPID_INVALID, float _x=0, float _y=0, float _z=0, float _o=0)
void WorldRelocate (const WorldLocation &loc)
Public Member Functions inherited from Position
float GetAngle (float x, float y) const
float GetAngle (Position const *pos) const
float GetExactDist (float x, float y, float z) const
float GetExactDist (Position const *pos) const
float GetExactDist2d (const float x, const float y) const
float GetExactDist2d (Position const *pos) const
float GetExactDist2dSq (float x, float y) const
float GetExactDist2dSq (Position const *pos) const
float GetExactDistSq (float x, float y, float z) const
float GetExactDistSq (Position const *pos) const
float GetOrientation () const
void GetPosition (float &x, float &y) const
void GetPosition (float &x, float &y, float &z) const
void GetPosition (float &x, float &y, float &z, float &o) const
void GetPosition (Position *pos) const
void GetPositionOffsetTo (Position const &endPos, Position &retOffset) const
float GetPositionX () const
float GetPositionY () const
float GetPositionZ () const
float GetRelativeAngle (float x, float y) const
float GetRelativeAngle (Position const *pos) const
void GetSinCos (float x, float y, float &vsin, float &vcos) const
bool HasInArc (float arcangle, Position const *pos, float border=2.0f) const
bool HasInLine (WorldObject const *target, float width) const
bool IsInDist (float x, float y, float z, float dist) const
bool IsInDist (Position const *pos, float dist) const
bool IsInDist2d (float x, float y, float dist) const
bool IsInDist2d (Position const *pos, float dist) const
bool IsPositionValid () const
bool operator!= (Position const &a)
bool operator== (Position const &a)
Position::PositionXYZOStreamer PositionXYZOStream ()
Position::PositionXYZStreamer PositionXYZStream ()
void Relocate (float x, float y)
void Relocate (float x, float y, float z)
void Relocate (float x, float y, float z, float orientation)
void Relocate (Position const &pos)
void Relocate (Position const *pos)
void RelocateOffset (Position const &offset)
void SetOrientation (float orientation)
std::string ToString () const
Public Member Functions inherited from GridObject< Corpse >
void AddToGrid (GridRefManager< Corpse > &m)
bool IsInGrid () const
void RemoveFromGrid ()
virtual ~GridObject ()

Public Attributes

Loot loot
bool lootForBody
PlayerlootRecipient
Public Attributes inherited from WorldObject
uint32 LastUsedScriptID
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibility
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPESm_invisibilityDetect
MovementInfo m_movementInfo
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibility
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPESm_serverSideVisibilityDetect
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealth
FlaggedValuesArray32< int32, uint32, StealthType, TOTAL_STEALTH_TYPESm_stealthDetect
Public Attributes inherited from WorldLocation
uint32 m_mapId
Public Attributes inherited from Position
float m_orientation
float m_positionX
float m_positionY
float m_positionZ

Private Attributes

GridCoord _gridCoord
time_t m_time
CorpseType m_type

Additional Inherited Members

Static Public Member Functions inherited from Position
static float NormalizeOrientation (float o)
Protected Member Functions inherited from WorldObject
virtual bool IsAlwaysDetectableFor (WorldObject const *) const
virtual bool IsAlwaysVisibleFor (WorldObject const *) const
virtual bool IsInvisibleDueToDespawn () const
virtual bool IsNeverVisible () const
void SetLocationInstanceId (uint32 _instanceId)
void SetLocationMapId (uint32 _mapId)
 WorldObject (bool isWorldObject)
Protected Member Functions inherited from Object
std::string _ConcatFields (uint16 startIndex, uint16 size) const
void _Create (uint32 guidlow, uint32 entry, HighGuid guidhigh)
void _InitValues ()
void _LoadIntoDataField (std::string const &data, uint32 startOffset, uint32 count)
void BuildDynamicValuesUpdate (uint8 updateType, ByteBuffer *data, Player *target) const
void BuildMovementUpdate (ByteBuffer *data, uint16 flags) const
virtual void BuildValuesUpdate (uint8 updatetype, ByteBuffer *data, Player *target) const
uint32 GetUpdateFieldData (Player const *target, uint32 *&flags) const
 Object ()
Protected Attributes inherited from WorldObject
bool m_isActive
const bool m_isWorldObject
std::string m_name
Transportm_transport
ZoneScriptm_zoneScript
Protected Attributes inherited from Object
union { 
   float *   m_floatValues 
   int32 *   m_int32Values 
   uint32 *   m_uint32Values 
}; 
UpdateMask _changesMask
std::vector< bool * > m_dynamicChange
std::vector< uint32 * > m_dynamicTab
uint16 m_fieldNotifyFlags
uint16 m_objectType
TypeID m_objectTypeId
bool m_objectUpdated
uint16 m_updateFlag
uint16 m_valuesCount

Detailed Description

Definition at line 36 of file Corpse.h.

Constructor & Destructor Documentation

◆ Corpse()

◆ ~Corpse()

Corpse::~Corpse ( )
inline

Definition at line 40 of file Corpse.h.

Member Function Documentation

◆ AddToWorld()

void Corpse::AddToWorld ( )
virtual
  • Register the corpse for guid lookup

Reimplemented from Object.

Definition at line 26 of file Corpse.cpp.

References Object::AddToWorld(), Object::IsInWorld(), and sObjectAccessor.

Referenced by LoadHelper().

◆ Create() [1/2]

bool Corpse::Create ( uint32 guidlow,
Map * map )

◆ Create() [2/2]

◆ DeleteBonesFromWorld()

◆ DeleteFromDB()

◆ GetGhostTime()

time_t const & Corpse::GetGhostTime ( ) const
inline

◆ GetGridCoord()

GridCoord const & Corpse::GetGridCoord ( ) const
inline

Definition at line 60 of file Corpse.h.

References _gridCoord.

Referenced by ObjectAccessor::ConvertCorpseForPlayer().

◆ GetOwnerGUID()

◆ GetType()

◆ IsExpired()

bool Corpse::IsExpired ( time_t t) const

Definition at line 184 of file Corpse.cpp.

References CORPSE_BONES, DAY, m_time, m_type, and MINUTE.

◆ LoadCorpseFromDB()

◆ RemoveFromWorld()

void Corpse::RemoveFromWorld ( )
virtual
  • Remove the corpse from the accessor

Reimplemented from WorldObject.

Definition at line 35 of file Corpse.cpp.

References Object::IsInWorld(), Object::RemoveFromWorld(), and sObjectAccessor.

Referenced by ObjectAccessor::RemoveCorpse().

◆ ResetGhostTime()

void Corpse::ResetGhostTime ( )
inline

Definition at line 57 of file Corpse.h.

References m_time.

Referenced by Player::BuildPlayerRepop(), and LuaCorpse::ResetGhostTime().

◆ SaveToDB()

◆ SetGridCoord()

void Corpse::SetGridCoord ( GridCoord const & gridCoord)
inline

Definition at line 61 of file Corpse.h.

References _gridCoord.

Referenced by ObjectAccessor::ConvertCorpseForPlayer().

Member Data Documentation

◆ _gridCoord

GridCoord Corpse::_gridCoord
private

Definition at line 71 of file Corpse.h.

Referenced by Create(), GetGridCoord(), LoadCorpseFromDB(), and SetGridCoord().

◆ loot

◆ lootForBody

bool Corpse::lootForBody

Definition at line 65 of file Corpse.h.

Referenced by Corpse(), and Player::SendLoot().

◆ lootRecipient

Player* Corpse::lootRecipient

Definition at line 64 of file Corpse.h.

Referenced by Corpse(), Player::RemovedInsignia(), and Player::SendLoot().

◆ m_time

time_t Corpse::m_time
private

Definition at line 70 of file Corpse.h.

Referenced by Corpse(), GetGhostTime(), IsExpired(), LoadCorpseFromDB(), ResetGhostTime(), and SaveToDB().

◆ m_type

CorpseType Corpse::m_type
private

Definition at line 69 of file Corpse.h.

Referenced by Corpse(), GetType(), and IsExpired().


The documentation for this class was generated from the following files: