From 1bb8678abe4d7c826a451598ec3f248dd1972161 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:41:21 -0500 Subject: [PATCH] [Cleanup] Remove GroupCount() and RaidGroupCount() (#3943) # Notes - These are unused. --- zone/zonedb.cpp | 34 ---------------------------------- zone/zonedb.h | 4 ---- 2 files changed, 38 deletions(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index e6dbcab44..f521760fe 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -2636,40 +2636,6 @@ void ZoneDatabase::RefreshGroupFromDB(Client *client){ group->SendMarkedNPCsToMember(client); } -uint8 ZoneDatabase::GroupCount(uint32 groupid) { - - std::string query = StringFormat("SELECT count(charid) FROM group_id WHERE groupid = %d", groupid); - auto results = QueryDatabase(query); - if (!results.Success()) { - return 0; - } - - if (results.RowCount() == 0) - return 0; - - auto& row = results.begin(); - - return Strings::ToInt(row[0]); -} - -uint8 ZoneDatabase::RaidGroupCount(uint32 raidid, uint32 groupid) { - - std::string query = StringFormat("SELECT count(charid) FROM raid_members " - "WHERE raidid = %d AND groupid = %d;", raidid, groupid); - auto results = QueryDatabase(query); - - if (!results.Success()) { - return 0; - } - - if (results.RowCount() == 0) - return 0; - - auto& row = results.begin(); - - return Strings::ToInt(row[0]); - } - int64 ZoneDatabase::GetBlockedSpellsCount(uint32 zone_id) { return BlockedSpellsRepository::Count( diff --git a/zone/zonedb.h b/zone/zonedb.h index f0f990696..07ed6547e 100644 --- a/zone/zonedb.h +++ b/zone/zonedb.h @@ -629,10 +629,6 @@ public: /* Group */ void RefreshGroupFromDB(Client *c); - uint8 GroupCount(uint32 groupid); - - /* Raid */ - uint8 RaidGroupCount(uint32 raidid, uint32 groupid); /* Instancing */ void ListAllInstances(Client* c, uint32 character_id);