Merge pull request #170 from AlvinZhu/PR6

fix build for clang
This commit is contained in:
ZhengPeiRu21
2023-03-22 10:19:50 -06:00
committed by GitHub

View File

@@ -3,8 +3,6 @@
*/
#include "SpellIdValue.h"
#include <ranges>
#include "ChatHelper.h"
#include "Playerbots.h"
#include "Vehicle.h"
@@ -104,8 +102,9 @@ uint32 SpellIdValue::Calculate()
uint32 lowestSpellId = 0;
if (saveMana <= 1)
{
for (uint32 spellId : std::ranges::reverse_view(spellIds))
for (auto it = spellIds.rbegin(); it != spellIds.rend(); ++it)
{
auto spellId = *it;
const SpellInfo *pSpellInfo = sSpellMgr->GetSpellInfo(spellId);
if (!pSpellInfo)
continue;
@@ -144,8 +143,9 @@ uint32 SpellIdValue::Calculate()
}
else
{
for (uint32 spellId : std::ranges::reverse_view(spellIds))
for (auto it = spellIds.rbegin(); it != spellIds.rend(); ++it)
{
auto spellId = *it;
if (!highestSpellId)
highestSpellId = spellId;
if (saveMana == rank)