mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
commit
e6381476e1
@ -3,8 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "SpellIdValue.h"
|
#include "SpellIdValue.h"
|
||||||
|
|
||||||
#include <ranges>
|
|
||||||
#include "ChatHelper.h"
|
#include "ChatHelper.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
@ -104,8 +102,9 @@ uint32 SpellIdValue::Calculate()
|
|||||||
uint32 lowestSpellId = 0;
|
uint32 lowestSpellId = 0;
|
||||||
if (saveMana <= 1)
|
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);
|
const SpellInfo *pSpellInfo = sSpellMgr->GetSpellInfo(spellId);
|
||||||
if (!pSpellInfo)
|
if (!pSpellInfo)
|
||||||
continue;
|
continue;
|
||||||
@ -144,8 +143,9 @@ uint32 SpellIdValue::Calculate()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (uint32 spellId : std::ranges::reverse_view(spellIds))
|
for (auto it = spellIds.rbegin(); it != spellIds.rend(); ++it)
|
||||||
{
|
{
|
||||||
|
auto spellId = *it;
|
||||||
if (!highestSpellId)
|
if (!highestSpellId)
|
||||||
highestSpellId = spellId;
|
highestSpellId = spellId;
|
||||||
if (saveMana == rank)
|
if (saveMana == rank)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user