5003 {
5004 std::vector<uint32> availableElixirs =
5005 {
5006
5007 33720,
5008 54452,
5009 33726,
5010 28490,
5011 28491,
5012 28493,
5013 54494,
5014 28501,
5015 28503,
5016 38954,
5017
5018 39625,
5019 39626,
5020 39627,
5021 39628,
5022 28502,
5023 28514,
5024
5025 28489,
5026 28496
5027 };
5028
5030
5032 availableElixirs.push_back(28509);
5033
5035
5036 bool useElixir = true;
5037
5043
5045 {
5047 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
5048 {
5049 uint32 spellId = itr->second->GetBase()->GetId();
5050 if (
sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
5051 {
5052 useElixir = false;
5053 break;
5054 }
5055 }
5056 }
5057
5058 if (useElixir)
5060 }
std::uint32_t uint32
Definition Define.h:107
@ POWER_MANA
Definition SharedDefines.h:257
SpellGroup
Definition SpellMgr.h:331
@ SPELL_GROUP_NONE
Definition SpellMgr.h:332
@ SPELL_GROUP_ELIXIR_BATTLE
Definition SpellMgr.h:333
@ SPELL_GROUP_ELIXIR_GUARDIAN
Definition SpellMgr.h:334
#define sSpellMgr
Definition SpellMgr.h:847
Item * GetCastItem()
Definition SpellScript.cpp:620
Unit * GetCaster()
Definition SpellScript.cpp:401
boost::container::flat_multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:674
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1361
Powers getPowerType() const
Definition Unit.h:1132
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1384
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:133