mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
i.e. world update start
This commit is contained in:
committed by
Francesco Borzì
parent
1b7522ff0e
commit
51b8773528
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "Corpse.h"
|
||||
#include "GameTime.h"
|
||||
#include "Player.h"
|
||||
#include "UpdateMask.h"
|
||||
#include "ObjectAccessor.h"
|
||||
@@ -23,7 +24,7 @@ Corpse::Corpse(CorpseType type) : WorldObject(type != CORPSE_BONES), m_type(type
|
||||
|
||||
m_valuesCount = CORPSE_END;
|
||||
|
||||
m_time = time(NULL);
|
||||
m_time = GameTime::GetGameTime();
|
||||
|
||||
lootRecipient = NULL;
|
||||
}
|
||||
@@ -132,6 +133,11 @@ void Corpse::DeleteFromDB(SQLTransaction& trans)
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
void Corpse::ResetGhostTime()
|
||||
{
|
||||
m_time = GameTime::GetGameTime();
|
||||
}
|
||||
|
||||
bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
|
||||
{
|
||||
uint32 ownerGuid = fields[17].GetUInt32();
|
||||
|
||||
@@ -54,7 +54,7 @@ class Corpse : public WorldObject, public GridObject<Corpse>
|
||||
uint64 GetOwnerGUID() const { return GetUInt64Value(CORPSE_FIELD_OWNER); }
|
||||
|
||||
time_t const& GetGhostTime() const { return m_time; }
|
||||
void ResetGhostTime() { m_time = time(NULL); }
|
||||
void ResetGhostTime();
|
||||
CorpseType GetType() const { return m_type; }
|
||||
|
||||
GridCoord const& GetGridCoord() const { return _gridCoord; }
|
||||
|
||||
Reference in New Issue
Block a user