Fix: Updated to work with newer commits of AzerothCore

This commit is contained in:
Revision
2024-07-22 00:39:06 +02:00
parent fedb6084e2
commit 838bfe333d
48 changed files with 241 additions and 239 deletions

View File

@@ -1696,11 +1696,11 @@ uint32 RandomItemMgr::GetUpgrade(Player* player, std::string spec, uint8 slot, u
continue;
// skip higher lvl
if (info.minLevel > player->getLevel())
if (info.minLevel > player->GetLevel())
continue;
// skip too low level
if (info.minLevel < (player->getLevel() - 10))
if (info.minLevel < (player->GetLevel() - 10))
continue;
// skip wrong team
@@ -1720,7 +1720,7 @@ uint32 RandomItemMgr::GetUpgrade(Player* player, std::string spec, uint8 slot, u
continue;
// skip items that only fit in slot, but not stats
if (!itemId && info.weights[specId] == 1 && player->getLevel() > 40)
if (!itemId && info.weights[specId] == 1 && player->GetLevel() > 40)
continue;
// skip quest items
@@ -1751,7 +1751,7 @@ uint32 RandomItemMgr::GetUpgrade(Player* player, std::string spec, uint8 slot, u
}
}
if (bestSpecId && bestSpecId != specId && player->getLevel() > 40)
if (bestSpecId && bestSpecId != specId && player->GetLevel() > 40)
return 0;
if (!closestUpgrade)
@@ -1820,11 +1820,11 @@ std::vector<uint32> RandomItemMgr::GetUpgradeList(Player* player, std::string sp
continue;
// skip higher lvl
if (info.minLevel > player->getLevel())
if (info.minLevel > player->GetLevel())
continue;
// skip too low level
if ((int32)info.minLevel < (int32)(player->getLevel() - 20))
if ((int32)info.minLevel < (int32)(player->GetLevel() - 20))
continue;
// skip wrong team
@@ -1844,7 +1844,7 @@ std::vector<uint32> RandomItemMgr::GetUpgradeList(Player* player, std::string sp
continue;
// skip items that only fit in slot, but not stats
if (!itemId && info.weights[specId] == 1 && player->getLevel() > 40)
if (!itemId && info.weights[specId] == 1 && player->GetLevel() > 40)
continue;
// skip quest items
@@ -1863,7 +1863,7 @@ std::vector<uint32> RandomItemMgr::GetUpgradeList(Player* player, std::string sp
info.slot == EQUIPMENT_SLOT_FINGER2))
continue;
//if (player->getLevel() >= 40)
//if (player->GetLevel() >= 40)
//{
// // check if item stat score is the best among class specs
// uint32 bestSpecId = 0;
@@ -1990,11 +1990,11 @@ uint32 RandomItemMgr::GetLiveStatWeight(Player* player, uint32 itemId)
statWeight = itr->second.weights[specId];
// skip higher lvl
if (itr->second.minLevel > player->getLevel())
if (itr->second.minLevel > player->GetLevel())
return 0;
// skip too low level
//if ((int32)info->minLevel < (int32)(player->getLevel() - 20))
//if ((int32)info->minLevel < (int32)(player->GetLevel() - 20))
// return 0;
// skip wrong team
@@ -2025,7 +2025,7 @@ uint32 RandomItemMgr::GetLiveStatWeight(Player* player, uint32 itemId)
return 0;
// skip items that only fit in slot, but not stats
if (!itemId && itr->second.weights[specId] == 1 && player->getLevel() > 20)
if (!itemId && itr->second.weights[specId] == 1 && player->GetLevel() > 20)
return 0;
// check if item stat score is the best among class specs
@@ -2040,7 +2040,7 @@ uint32 RandomItemMgr::GetLiveStatWeight(Player* player, uint32 itemId)
}
}
if (bestSpecId && bestSpecId != specId && player->getLevel() >= 60)
if (bestSpecId && bestSpecId != specId && player->GetLevel() >= 60)
return 0;*/
return statWeight;