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