mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 01:23:47 +00:00
fix(Core/Spells): Hunter snake trap damage (#16326)
This commit is contained in:
@@ -1124,11 +1124,11 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
SetModifierValue(UNIT_MOD_MANA, BASE_VALUE, GetCreateMana());
|
||||
|
||||
// xinef: added some multipliers so debuffs can affect pets in any way...
|
||||
SetCreateStat(STAT_STRENGTH, 22 + 2 * petlevel);
|
||||
SetCreateStat(STAT_AGILITY, 22 + 1.5f * petlevel);
|
||||
SetCreateStat(STAT_STAMINA, 25 + 2 * petlevel);
|
||||
SetCreateStat(STAT_INTELLECT, 28 + 2 * petlevel);
|
||||
SetCreateStat(STAT_SPIRIT, 27 + 1.5f * petlevel);
|
||||
SetCreateStat(STAT_STRENGTH, 22);
|
||||
SetCreateStat(STAT_AGILITY, 22);
|
||||
SetCreateStat(STAT_STAMINA, 25);
|
||||
SetCreateStat(STAT_INTELLECT, 28);
|
||||
SetCreateStat(STAT_SPIRIT, 27);
|
||||
}
|
||||
|
||||
switch (petType)
|
||||
@@ -1348,6 +1348,14 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
|
||||
break;
|
||||
}
|
||||
case NPC_VENOMOUS_SNAKE:
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 0.7 - 38));
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 0.8 - 40));
|
||||
break;
|
||||
case NPC_VIPER:
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(1.3 * petlevel - 64));
|
||||
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(1.5 * petlevel - 68));
|
||||
break;
|
||||
case NPC_GENERIC_IMP:
|
||||
case NPC_GENERIC_VOIDWALKER:
|
||||
{
|
||||
|
||||
@@ -122,6 +122,10 @@ enum NPCEntries
|
||||
NPC_ARMY_OF_THE_DEAD = 24207,
|
||||
NPC_EBON_GARGOYLE = 27829,
|
||||
|
||||
// Hunter
|
||||
NPC_VENOMOUS_SNAKE = 19833,
|
||||
NPC_VIPER = 19921,
|
||||
|
||||
// Generic
|
||||
NPC_GENERIC_IMP = 12922,
|
||||
NPC_GENERIC_VOIDWALKER = 8996
|
||||
|
||||
@@ -96,24 +96,17 @@ struct npc_pet_hunter_snake_trap : public ScriptedAI
|
||||
{
|
||||
_init = true;
|
||||
|
||||
CreatureTemplate const* Info = me->GetCreatureTemplate();
|
||||
CreatureBaseStats const* stats = sObjectMgr->GetCreatureBaseStats(me->GetLevel(), Info->unit_class);
|
||||
uint32 health = uint32(107 * (me->GetLevel() - 40) * 0.025f);
|
||||
me->SetCreateHealth(health);
|
||||
|
||||
for (uint8 stat = 0; stat < MAX_STATS; ++stat)
|
||||
{
|
||||
me->SetStat(Stats(stat), 0);
|
||||
me->SetCreateStat(Stats(stat), 0);
|
||||
}
|
||||
|
||||
me->SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, (float)health);
|
||||
me->SetMaxHealth(health);
|
||||
|
||||
//Add delta to make them not all hit the same time
|
||||
uint32 delta = urand(0, 700);
|
||||
me->SetAttackTime(BASE_ATTACK, Info->BaseAttackTime + delta);
|
||||
me->SetStatFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER, float(stats->AttackPower));
|
||||
me->CastSpell(me, SPELL_HUNTER_DEADLY_POISON_PASSIVE, true);
|
||||
me->SetAttackTime(BASE_ATTACK, me->GetAttackTime(BASE_ATTACK) + delta);
|
||||
|
||||
if (me->GetEntry() == NPC_VENOMOUS_SNAKE)
|
||||
DoCastSelf(SPELL_HUNTER_DEADLY_POISON_PASSIVE, true);
|
||||
|
||||
// Glyph of Snake Trap
|
||||
if (Unit* owner = me->GetOwner())
|
||||
|
||||
Reference in New Issue
Block a user