mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9274] Implement SPELL_EFFECT_SUMMON_ALL_TOTEMS
This implement work spells 66842, 66843, 66844. Patch originall writed by Arthorius, with additional fixes from darkstalker and hack removes from me.
This commit is contained in:
parent
9aedd3a864
commit
904995c024
7 changed files with 36 additions and 5 deletions
|
|
@ -154,7 +154,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
|||
&Spell::EffectSelfResurrect, // 94 SPELL_EFFECT_SELF_RESURRECT
|
||||
&Spell::EffectSkinning, // 95 SPELL_EFFECT_SKINNING
|
||||
&Spell::EffectCharge, // 96 SPELL_EFFECT_CHARGE
|
||||
&Spell::EffectUnused, // 97 SPELL_EFFECT_97
|
||||
&Spell::EffectSummonAllTotems, // 97 SPELL_EFFECT_SUMMON_ALL_TOTEMS
|
||||
&Spell::EffectKnockBack, // 98 SPELL_EFFECT_KNOCK_BACK
|
||||
&Spell::EffectDisEnchant, // 99 SPELL_EFFECT_DISENCHANT
|
||||
&Spell::EffectInebriate, //100 SPELL_EFFECT_INEBRIATE
|
||||
|
|
@ -6526,6 +6526,21 @@ void Spell::EffectSummonDeadPet(uint32 /*i*/)
|
|||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
}
|
||||
|
||||
void Spell::EffectSummonAllTotems(uint32 i)
|
||||
{
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
int32 start_button = ACTION_BUTTON_SHAMAN_TOTEMS_BAR + m_spellInfo->EffectMiscValue[i];
|
||||
int32 amount_buttons = m_spellInfo->EffectMiscValueB[i];
|
||||
|
||||
for(int32 slot = 0; slot < amount_buttons; ++slot)
|
||||
if (ActionButton const* actionButton = ((Player*)m_caster)->GetActionButton(start_button+slot))
|
||||
if (actionButton->GetType()==ACTION_BUTTON_SPELL)
|
||||
if (uint32 spell_id = actionButton->GetAction())
|
||||
m_caster->CastSpell(unitTarget,spell_id,true);
|
||||
}
|
||||
|
||||
void Spell::EffectDestroyAllTotems(uint32 /*i*/)
|
||||
{
|
||||
int32 mana = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue