aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp16
-rw-r--r--src/server/game/DataStores/DB2Stores.h1
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp2
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp16
-rw-r--r--src/server/game/Globals/ObjectMgr.h2
5 files changed, 18 insertions, 19 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index 489e676b01d..dc46d77eb54 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -1885,6 +1885,22 @@ bool DB2Manager::IsInArea(uint32 objectAreaId, uint32 areaId)
return false;
}
+ContentTuningEntry const* DB2Manager::GetContentTuningForArea(AreaTableEntry const* areaEntry)
+{
+ if (!areaEntry)
+ return nullptr;
+
+ // Get ContentTuning for the area
+ if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(areaEntry->ContentTuningID))
+ return contentTuning;
+
+ // If there is no data for the current area and it has a parent area, get data from the last (recursive)
+ if (AreaTableEntry const* parentAreaEntry = sAreaTableStore.LookupEntry(areaEntry->ParentAreaID))
+ return GetContentTuningForArea(parentAreaEntry);
+
+ return nullptr;
+}
+
std::vector<ArtifactPowerEntry const*> DB2Manager::GetArtifactPowers(uint8 artifactId) const
{
auto itr = _artifactPowers.find(artifactId);
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index c7ddcfebafc..25e8226192a 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -389,6 +389,7 @@ public:
uint32 GetEmptyAnimStateID() const;
std::vector<uint32> GetAreasForGroup(uint32 areaGroupId) const;
static bool IsInArea(uint32 objectAreaId, uint32 areaId);
+ static ContentTuningEntry const* GetContentTuningForArea(AreaTableEntry const* areaEntry);
std::vector<ArtifactPowerEntry const*> GetArtifactPowers(uint8 artifactId) const;
std::vector<uint32> const* GetArtifactPowerLinks(uint32 artifactPowerId) const;
ArtifactPowerRankEntry const* GetArtifactPowerRank(uint32 artifactPowerId, uint8 rank) const;
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 3d182cf6604..f8b7e7d5cdb 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -2534,7 +2534,7 @@ void GameObject::Use(Unit* user)
}
// Update the correct fishing skill according to the area's ContentTuning
- ContentTuningEntry const* areaContentTuning = sObjectMgr->GetContentTuningForArea(areaEntry);
+ ContentTuningEntry const* areaContentTuning = DB2Manager::GetContentTuningForArea(areaEntry);
if (!areaContentTuning)
break;
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 91f81825f14..465d00c5a6a 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -8109,22 +8109,6 @@ int32 ObjectMgr::GetFishingBaseSkillLevel(AreaTableEntry const* areaEntry) const
return 0;
}
-ContentTuningEntry const* ObjectMgr::GetContentTuningForArea(AreaTableEntry const* areaEntry) const
-{
- if (!areaEntry)
- return nullptr;
-
- // Get ContentTuning for the area
- if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(areaEntry->ContentTuningID))
- return contentTuning;
-
- // If there is no data for the current area and it has a parent area, get data from the last (recursive)
- if (AreaTableEntry const* parentAreaEntry = sAreaTableStore.LookupEntry(areaEntry->ParentAreaID))
- return GetContentTuningForArea(parentAreaEntry);
-
- return nullptr;
-}
-
void ObjectMgr::LoadPetNames()
{
uint32 oldMSTime = getMSTime();
diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h
index fee3d6e3e5c..e397b035994 100644
--- a/src/server/game/Globals/ObjectMgr.h
+++ b/src/server/game/Globals/ObjectMgr.h
@@ -1431,8 +1431,6 @@ class TC_GAME_API ObjectMgr
int32 GetFishingBaseSkillLevel(AreaTableEntry const* areaEntry) const;
- ContentTuningEntry const* GetContentTuningForArea(AreaTableEntry const* areaEntry) const;
-
SkillTiersEntry const* GetSkillTier(uint32 skillTierId) const
{
auto itr = _skillTiers.find(skillTierId);