aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2021-04-05 23:47:05 +0200
committerShauren <shauren.trinity@gmail.com>2021-04-05 23:47:05 +0200
commitd29dd1eeb5c52dc76bd741fe1ee0e875c416b8e7 (patch)
tree19b4dda1de5bee6f3d45a3472f131380443365d4 /src/server/game/Maps/Map.cpp
parentc648ac58e0a0724a6eff0242afaf665443f675ef (diff)
Core/Misc: Change all unix time columns in character database to bigint (signed)
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 25c57136eef..7545aa100ad 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -4504,7 +4504,7 @@ void Map::SaveRespawnTimeDB(SpawnObjectType type, ObjectGuid::LowType spawnId, t
// Just here for support of compatibility mode
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement((type == SPAWN_TYPE_GAMEOBJECT) ? CHAR_REP_GO_RESPAWN : CHAR_REP_CREATURE_RESPAWN);
stmt->setUInt64(0, spawnId);
- stmt->setUInt64(1, uint64(respawnTime));
+ stmt->setInt64(1, respawnTime);
stmt->setUInt16(2, GetId());
stmt->setUInt32(3, GetInstanceId());
CharacterDatabase.ExecuteOrAppend(dbTrans, stmt);
@@ -4521,10 +4521,10 @@ void Map::LoadRespawnTimes()
{
Field* fields = result->Fetch();
ObjectGuid::LowType loguid = fields[0].GetUInt64();
- uint64 respawnTime = fields[1].GetUInt64();
+ time_t respawnTime = fields[1].GetInt64();
if (CreatureData const* cdata = sObjectMgr->GetCreatureData(loguid))
- SaveRespawnTime(SPAWN_TYPE_CREATURE, loguid, cdata->id, time_t(respawnTime), GetZoneId(PhasingHandler::GetEmptyPhaseShift(), cdata->spawnPoint), Trinity::ComputeGridCoord(cdata->spawnPoint.GetPositionX(), cdata->spawnPoint.GetPositionY()).GetId(), false);
+ SaveRespawnTime(SPAWN_TYPE_CREATURE, loguid, cdata->id, respawnTime, GetZoneId(PhasingHandler::GetEmptyPhaseShift(), cdata->spawnPoint), Trinity::ComputeGridCoord(cdata->spawnPoint.GetPositionX(), cdata->spawnPoint.GetPositionY()).GetId(), false);
} while (result->NextRow());
}
@@ -4538,10 +4538,10 @@ void Map::LoadRespawnTimes()
{
Field* fields = result->Fetch();
ObjectGuid::LowType loguid = fields[0].GetUInt64();
- uint64 respawnTime = fields[1].GetUInt64();
+ time_t respawnTime = fields[1].GetInt64();
if (GameObjectData const* godata = sObjectMgr->GetGameObjectData(loguid))
- SaveRespawnTime(SPAWN_TYPE_GAMEOBJECT, loguid, godata->id, time_t(respawnTime), GetZoneId(PhasingHandler::GetEmptyPhaseShift(), godata->spawnPoint), Trinity::ComputeGridCoord(godata->spawnPoint.GetPositionX(), godata->spawnPoint.GetPositionY()).GetId(), false);
+ SaveRespawnTime(SPAWN_TYPE_GAMEOBJECT, loguid, godata->id, respawnTime, GetZoneId(PhasingHandler::GetEmptyPhaseShift(), godata->spawnPoint), Trinity::ComputeGridCoord(godata->spawnPoint.GetPositionX(), godata->spawnPoint.GetPositionY()).GetId(), false);
} while (result->NextRow());
}