This commit is contained in:
@@ -144,6 +144,10 @@ enum HunterSpells
|
|||||||
SPELL_HUNTER_DIRE_COMMAND = 378743,
|
SPELL_HUNTER_DIRE_COMMAND = 378743,
|
||||||
SPELL_HUNTER_DIRE_BEAST = 120679,
|
SPELL_HUNTER_DIRE_BEAST = 120679,
|
||||||
SPELL_HUNTER_DIRE_CLEAVE = 1217524,
|
SPELL_HUNTER_DIRE_CLEAVE = 1217524,
|
||||||
|
SPELL_HUNTER_HUNTMASTERS_CALL = 459730,
|
||||||
|
SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER = 459731,
|
||||||
|
SPELL_HUNTER_HUNTMASTERS_CALL_HATI = 459738,
|
||||||
|
SPELL_HUNTER_HUNTMASTERS_CALL_FENRYR = 459735,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MiscSpells
|
enum MiscSpells
|
||||||
@@ -1106,6 +1110,34 @@ class spell_hun_dire_beast : public SpellScript
|
|||||||
|
|
||||||
controlled->CastSpell(controlled, SPELL_HUNTER_BEAST_CLEAVE_BUFF, args);
|
controlled->CastSpell(controlled, SPELL_HUNTER_BEAST_CLEAVE_BUFF, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 459730 - Huntmaster's Call: summoning a Dire Beast N times summons Hati or Fenryr
|
||||||
|
if (player->HasAura(SPELL_HUNTER_HUNTMASTERS_CALL))
|
||||||
|
{
|
||||||
|
SpellInfo const* counterInfo = sSpellMgr->GetSpellInfo(SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER, GetCastDifficulty());
|
||||||
|
int32 needed = counterInfo ? int32(counterInfo->StackAmount) : 8;
|
||||||
|
if (needed < 1)
|
||||||
|
needed = 8;
|
||||||
|
|
||||||
|
Aura* counter = player->GetAura(SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER);
|
||||||
|
int32 current = counter ? counter->GetStackAmount() : 0;
|
||||||
|
|
||||||
|
if (current + 1 >= needed)
|
||||||
|
{
|
||||||
|
player->RemoveAurasDueToSpell(SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER);
|
||||||
|
|
||||||
|
// Hati or Fenryr
|
||||||
|
uint32 summonId = urand(0, 1) ? SPELL_HUNTER_HUNTMASTERS_CALL_HATI : SPELL_HUNTER_HUNTMASTERS_CALL_FENRYR;
|
||||||
|
player->CastSpell(player, summonId, TRIGGERED_FULL_MASK);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (counter)
|
||||||
|
counter->ModStackAmount(1);
|
||||||
|
else
|
||||||
|
player->CastSpell(player, SPELL_HUNTER_HUNTMASTERS_CALL_COUNTER, TRIGGERED_FULL_MASK);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
|
|||||||
Reference in New Issue
Block a user