5029 {
5030 std::vector<uint32> availableElixirs =
5031 {
5032
5033 33720,
5034 54452,
5035 33726,
5036 28490,
5037 28491,
5038 28493,
5039 54494,
5040 28501,
5041 28503,
5042 38954,
5043
5044 39625,
5045 39626,
5046 39627,
5047 39628,
5048 28502,
5049 28514,
5050
5051 28489,
5052 28496
5053 };
5054
5056
5058 availableElixirs.push_back(28509);
5059
5061
5062 bool useElixir = true;
5063
5069
5071 {
5073 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
5074 {
5075 uint32 spellId = itr->second->GetBase()->GetId();
5076 if (
sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
5077 {
5078 useElixir = false;
5079 break;
5080 }
5081 }
5082 }
5083
5084 if (useElixir)
5086 }
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:851
Item * GetCastItem()
Definition SpellScript.cpp:625
Unit * GetCaster()
Definition SpellScript.cpp:401
boost::container::flat_multimap< uint32, AuraApplication * > AuraApplicationMap
Definition Unit.h:679
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:1378
Powers getPowerType() const
Definition Unit.h:1145
AuraApplicationMap & GetAppliedAuras()
Definition Unit.h:1400
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition Containers.h:133