mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -1985,19 +1985,26 @@ void Player::RegenerateHealth()
|
||||
else if (!IsInCombat() || HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
|
||||
{
|
||||
addvalue = OCTRegenHPPerSpirit() * HealthIncreaseRate;
|
||||
|
||||
if (!IsStandState())
|
||||
{
|
||||
addvalue *= 1.33f;
|
||||
}
|
||||
|
||||
AuraEffectList const& mModHealthRegenPct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
|
||||
{
|
||||
AddPct(addvalue, (*i)->GetAmount());
|
||||
}
|
||||
|
||||
if (!IsInCombat())
|
||||
{
|
||||
AuraEffectList const& mModHealthRegenPct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALTH_REGEN_PERCENT);
|
||||
for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
|
||||
AddPct(addvalue, (*i)->GetAmount());
|
||||
|
||||
addvalue += GetTotalAuraModifier(SPELL_AURA_MOD_REGEN) * 2 * IN_MILLISECONDS / (5 * IN_MILLISECONDS);
|
||||
}
|
||||
else if (HasAuraType(SPELL_AURA_MOD_REGEN_DURING_COMBAT))
|
||||
{
|
||||
ApplyPct(addvalue, GetTotalAuraModifier(SPELL_AURA_MOD_REGEN_DURING_COMBAT));
|
||||
|
||||
if (!IsStandState())
|
||||
addvalue *= 1.5f;
|
||||
}
|
||||
}
|
||||
|
||||
// always regeneration bonus (including combat)
|
||||
|
||||
@@ -1979,7 +1979,7 @@ void Player::UpdateCharmedAI()
|
||||
|
||||
if (!target || !IsValidAttackTarget(target))
|
||||
{
|
||||
target = SelectNearbyTarget(nullptr, 30);
|
||||
target = SelectNearbyTarget(nullptr, GetMap()->IsDungeon() ? 100.f : 30.f);
|
||||
if (!target)
|
||||
{
|
||||
if (!HasUnitState(UNIT_STATE_FOLLOW))
|
||||
|
||||
@@ -2704,11 +2704,8 @@ void Spell::EffectDistract(SpellEffIndex /*effIndex*/)
|
||||
if (unitTarget->HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING))
|
||||
return;
|
||||
|
||||
unitTarget->SetFacingTo(unitTarget->GetAngle(destTarget));
|
||||
unitTarget->ClearUnitState(UNIT_STATE_MOVING);
|
||||
|
||||
if (unitTarget->GetTypeId() == TYPEID_UNIT)
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILLISECONDS);
|
||||
unitTarget->SetFacingTo(unitTarget->GetAngle(destTarget)); /// @BUG Causes the player to stop moving + interrupts spellcast.
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void Spell::EffectPickPocket(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -713,8 +713,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
|
||||
ApplySpellFix({
|
||||
5171, // Slice and Dice
|
||||
6774, // Slice and Dice
|
||||
1725 // Distract
|
||||
6774 // Slice and Dice
|
||||
}, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_TARGET_PROCS;
|
||||
|
||||
Reference in New Issue
Block a user