From aae316c171c9504eaa7c5866caef1609f3cddf3d Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 18 Nov 2018 16:03:38 -0500 Subject: [PATCH] Fix formating in ZoneDatabase::GetDecayTimes() --- zone/zone.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index 9a3446061..370e18723 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1860,23 +1860,22 @@ bool Zone::RemoveSpawnGroup(uint32 in_id) { return false; } - -// Added By Hogie -bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct* npcCorpseDecayTimes) { - - const std::string query = "SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname"; +bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes) +{ + const std::string query = + "SELECT varname, value FROM variables WHERE varname LIKE 'decaytime%%' ORDER BY varname"; auto results = QueryDatabase(query); if (!results.Success()) - return false; + return false; int index = 0; - for (auto row = results.begin(); row != results.end(); ++row, ++index) { - Seperator sep(row[0]); - npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); - npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); + for (auto row = results.begin(); row != results.end(); ++row, ++index) { + Seperator sep(row[0]); + npcCorpseDecayTimes[index].minlvl = atoi(sep.arg[1]); + npcCorpseDecayTimes[index].maxlvl = atoi(sep.arg[2]); npcCorpseDecayTimes[index].seconds = std::min(7200, atoi(row[1])); - } + } return true; }