5038 {
5039 std::vector<uint32> availableElixirs =
5040 {
5041
5042 33720,
5043 54452,
5044 33726,
5045 28490,
5046 28491,
5047 28493,
5048 54494,
5049 28501,
5050 28503,
5051 38954,
5052
5053 39625,
5054 39626,
5055 39627,
5056 39628,
5057 28502,
5058 28514,
5059
5060 28489,
5061 28496
5062 };
5063
5065
5067 availableElixirs.push_back(28509);
5068
5070
5071 bool useElixir = true;
5072
5078
5080 {
5082 for (auto itr = auraMap.begin(); itr != auraMap.end(); ++itr)
5083 {
5084 uint32 spellId = itr->second->GetBase()->GetId();
5085 if (
sSpellMgr->IsSpellMemberOfSpellGroup(spellId, chosenSpellGroup) && spellId != chosenElixir)
5086 {
5087 useElixir = false;
5088 break;
5089 }
5090 }
5091 }
5092
5093 if (useElixir)
5095 }
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
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:1389
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