5011 {
5012 std::vector<uint32> availableElixirs =
5013 {
5014
5015 33720,
5016 54452,
5017 33726,
5018 28490,
5019 28491,
5020 28493,
5021 54494,
5022 28501,
5023 28503,
5024 38954,
5025
5026 39625,
5027 39626,
5028 39627,
5029 39628,
5030 28502,
5031 28514,
5032
5033 28489,
5034 28496
5035 };
5036
5038
5040 availableElixirs.push_back(28509);
5041
5043
5044 bool useElixir = true;
5045
5051
5053 {
5055 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
5056 {
5057 uint32 spellId = itr->second->GetBase()->GetId();
5058 if (
sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
5059 {
5060 useElixir = false;
5061 break;
5062 }
5063 }
5064 }
5065
5066 if (useElixir)
5068 }
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:836
Item * GetCastItem()
Definition SpellScript.cpp:620
Unit * GetCaster()
Definition SpellScript.cpp:401
std::multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:673
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:1375
Powers getPowerType() const
Definition Unit.h:1131
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1383
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:133