Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-08-29 09:30:33 -06:00
committed by GitHub
32 changed files with 885 additions and 53 deletions

View File

@@ -60,8 +60,23 @@ void TotemAI::UpdateAI(uint32 /*diff*/)
if (me->ToTotem()->GetTotemType() != TOTEM_ACTIVE)
return;
if (!me->IsAlive() || me->IsNonMeleeSpellCast(false))
if (!me->IsAlive())
{
return;
}
if (me->IsNonMeleeSpellCast(false))
{
if (Unit* victim = ObjectAccessor::GetUnit(*me, i_victimGuid))
{
if (!victim || !victim->IsAlive())
{
me->InterruptNonMeleeSpells(false);
}
}
return;
}
// Search spell
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(me->ToTotem()->GetSpell());

View File

@@ -32,7 +32,7 @@
#include "Formulas.h"
#include "GameGraveyard.h"
#include "GridNotifiersImpl.h"
#include "Group.h"
#include "GroupMgr.h"
#include "MapMgr.h"
#include "MiscPackets.h"
#include "Object.h"
@@ -1151,6 +1151,7 @@ void Battleground::AddOrSetPlayerToCorrectBgGroup(Player* player, TeamId teamId)
group = new Group;
SetBgRaid(teamId, group);
group->Create(player);
sGroupMgr->AddGroup(group);
}
else if (group->IsMember(playerGuid))
{

View File

@@ -12062,6 +12062,8 @@ uint32 Unit::SpellHealingBonusDone(Unit* victim, SpellInfo const* spellProto, ui
{
case 4415: // Increased Rejuvenation Healing
case 4953:
DoneTotal += (*i)->GetAmount() / 5; // 5 ticks of Rejuvenation
break;
case 3736: // Hateful Totem of the Third Wind / Increased Lesser Healing Wave / LK Arena (4/5/6) Totem of the Third Wind / Savage Totem of the Third Wind
DoneTotal += (*i)->GetAmount();
break;
@@ -16143,9 +16145,13 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
{
if (SpellModifier* mod = triggeredByAura->GetSpellModifier())
{
if (mod->op == SPELLMOD_CASTING_TIME && procSpell && (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0)
if (mod->op == SPELLMOD_CASTING_TIME && mod->value < 0 && procSpell)
{
break;
// Skip instant spells
if (procSpellInfo->CalcCastTime() <= 0 || (procSpell->GetTriggeredCastFlags() & TRIGGERED_CAST_DIRECTLY) != 0)
{
break;
}
}
}
takeCharges = true;

View File

@@ -4361,6 +4361,24 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx3 |= SPELL_ATTR3_ALWAYS_HIT;
});
// Death's Respite
ApplySpellFix({ 67731, 68305 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_SUPRESS_TARGET_PROCS;
});
// Wyvern Sting DoT
ApplySpellFix({ 24131, 24134, 24135 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
});
// Feed Pet
ApplySpellFix({ 1539, 51284 }, [](SpellInfo* spellInfo)
{
spellInfo->Attributes |= SPELL_ATTR0_ALLOW_WHILE_SITTING;
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];