From 662c4012db8fb9ada2e7d7ef3ad5a74d882acce1 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:12:00 -0400 Subject: [PATCH] [Cleanup] Remove GetGroupByBot(), GetRaidByMob(), and GetRaidByLeaderName() from zone/entity.cpp and zone/entity.h (#3387) # Notes - These are unused. --- zone/entity.cpp | 35 ----------------------------------- zone/entity.h | 3 --- 2 files changed, 38 deletions(-) diff --git a/zone/entity.cpp b/zone/entity.cpp index 3734a0927..9114d8420 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2165,21 +2165,6 @@ Group *EntityList::GetGroupByClient(Client *client) return nullptr; } -Raid *EntityList::GetRaidByLeaderName(const char *leader) -{ - std::list::iterator iterator; - - iterator = raid_list.begin(); - - while (iterator != raid_list.end()) { - if ((*iterator)->GetLeader() && strcmp((*iterator)->GetLeader()->GetName(), leader) == 0) { - return *iterator; - } - ++iterator; - } - return nullptr; -} - Raid *EntityList::GetRaidByID(uint32 id) { std::list::iterator iterator; @@ -2259,26 +2244,6 @@ Raid* EntityList::GetRaidByBot(const Bot* bot) return nullptr; } - -Raid *EntityList::GetRaidByMob(Mob *mob) -{ - std::list::iterator iterator; - - iterator = raid_list.begin(); - - while (iterator != raid_list.end()) { - for(int x = 0; x < MAX_RAID_MEMBERS; x++) { - // TODO: Implement support for Mob objects in Raid class - /*if((*iterator)->members[x].member){ - if((*iterator)->members[x].member == mob) - return *iterator; - }*/ - } - ++iterator; - } - return nullptr; -} - Client *EntityList::GetClientByAccID(uint32 accid) { auto it = client_list.begin(); diff --git a/zone/entity.h b/zone/entity.h index 9b10ed3e0..52ba2b6fa 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -193,15 +193,12 @@ public: Mob* GetRandomMob(const glm::vec3& location = glm::vec3(0.f), float distance = 0, Mob* exclude_mob = nullptr); Group* GetGroupByMob(Mob* mob); Group* GetGroupByMobName(const char* name); - Group* GetGroupByBot(Bot* bot); bool IsInSameGroupOrRaidGroup(Client *client1, Client *client2); Group *GetGroupByClient(Client* client); Group *GetGroupByID(uint32 id); Group *GetGroupByLeaderName(const char* leader); - Raid *GetRaidByMob(Mob* mob); Raid *GetRaidByClient(Client* client); Raid *GetRaidByID(uint32 id); - Raid *GetRaidByLeaderName(const char *leader); Raid* GetRaidByBotName(const char* name); Raid* GetRaidByBot(const Bot* bot);