Core/Phases: removed phaseMask from corpse queries
This commit is contained in:
1 parent
9b8b644569
commit
9f33e02a85
3 files changed
+8
-10
No files matched your search
@@ -119,7 +119,6 @@ void Corpse::SaveToDB()
|
||||
stmt->setUInt32(index++, uint32(m_time)); // time
|
||||
stmt->setUInt8 (index++, GetType()); // corpseType
|
||||
stmt->setUInt32(index++, GetInstanceId()); // instanceId
|
||||
stmt->setUInt32(index++, GetPhaseMask()); // phaseMask
|
||||
trans->Append(stmt);
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
@@ -159,10 +158,10 @@ void Corpse::DeleteFromDB(SQLTransaction& trans)
|
||||
|
||||
bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, corpseGuid, guid FROM corpse WHERE corpseType <> 0
|
||||
|
||||
uint32 ownerGuid = fields[16].GetUInt32();
|
||||
uint32 ownerGuid = fields[15].GetUInt32();
|
||||
float posX = fields[0].GetFloat();
|
||||
float posY = fields[1].GetFloat();
|
||||
float posZ = fields[2].GetFloat();
|
||||
@@ -182,7 +181,6 @@ bool Corpse::LoadCorpseFromDB(uint32 guid, Field* fields)
|
||||
m_time = time_t(fields[11].GetUInt32());
|
||||
|
||||
uint32 instanceId = fields[13].GetUInt32();
|
||||
//uint32 phaseMask = fields[14].GetUInt32();
|
||||
|
||||
// place
|
||||
SetLocationInstanceId(instanceId);
|
||||
|
||||
@@ -6924,8 +6924,8 @@ uint64 ObjectMgr::GenerateVoidStorageItemId()
|
||||
|
||||
void ObjectMgr::LoadCorpses()
|
||||
{
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
||||
// SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, corpseGuid, guid FROM corpse WHERE corpseType <> 0
|
||||
|
||||
uint32 oldMSTime = getMSTime();
|
||||
|
||||
@@ -6940,7 +6940,7 @@ void ObjectMgr::LoadCorpses()
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 guid = fields[15].GetUInt32();
|
||||
uint32 guid = fields[14].GetUInt32();
|
||||
CorpseType type = CorpseType(fields[12].GetUInt8());
|
||||
if (type >= MAX_CORPSE_TYPE)
|
||||
{
|
||||
|
||||
@@ -332,8 +332,8 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PrepareStatement(CHAR_DEL_PLAYER_HOMEBIND, "DELETE FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC);
|
||||
|
||||
// Corpse
|
||||
PrepareStatement(CHAR_SEL_CORPSES, "SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, phaseMask, corpseGuid, guid FROM corpse WHERE corpseType <> 0", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_INS_CORPSE, "INSERT INTO corpse (corpseGuid, guid, posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, phaseMask) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_SEL_CORPSES, "SELECT posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId, corpseGuid, guid FROM corpse WHERE corpseType <> 0", CONNECTION_SYNCH);
|
||||
PrepareStatement(CHAR_INS_CORPSE, "INSERT INTO corpse (corpseGuid, guid, posX, posY, posZ, orientation, mapId, displayId, itemCache, bytes1, bytes2, flags, dynFlags, time, corpseType, instanceId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_DEL_CORPSE, "DELETE FROM corpse WHERE corpseGuid = ?", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_DEL_PLAYER_CORPSES, "DELETE FROM corpse WHERE guid = ? AND corpseType <> 0", CONNECTION_ASYNC);
|
||||
PrepareStatement(CHAR_DEL_OLD_CORPSES, "DELETE FROM corpse WHERE corpseType = 0 OR time < (UNIX_TIMESTAMP(NOW()) - ?)", CONNECTION_ASYNC);
|
||||
|
||||
Reference in new issue
Block a user