mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix: Qaston revert (#13320)
* Revert "fix(Core/QAston): fixed shields oneshotting (#13271)" This reverts commite05f61d1b3. * Revert "fix(Core): Crash (#13292)" This reverts commita818bcf3e2. * Revert "fix: Crash (#13241)" This reverts commitbe423a91b5. * delete sql * Revert "refactor(Core/Spells): Implement QAston Proc System (#11079)" This reverts commitcbd3fd0967. * add sql revert * fix sql * remove update from world.updates
This commit is contained in:
@@ -310,8 +310,7 @@ void Spell::EffectEnvironmentalDMG(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->ToPlayer()->EnvironmentalDamage(DAMAGE_FIRE, damage);
|
||||
else
|
||||
{
|
||||
DamageInfo dmgInfo(m_caster, unitTarget, damage, m_spellInfo, m_spellInfo->GetSchoolMask(), SPELL_DIRECT_DAMAGE, BASE_ATTACK);
|
||||
m_caster->CalcAbsorbResist(dmgInfo);
|
||||
DamageInfo dmgInfo(m_caster, unitTarget, damage, m_spellInfo, m_spellInfo->GetSchoolMask(), SPELL_DIRECT_DAMAGE);
|
||||
|
||||
uint32 absorb = dmgInfo.GetAbsorb();
|
||||
uint32 resist = dmgInfo.GetResist();
|
||||
@@ -2343,7 +2342,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
if (Player* modOwner = m_originalCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DURATION>(m_spellInfo->Id, duration);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
TempSummon* summon = nullptr;
|
||||
|
||||
@@ -3149,7 +3148,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
if(Player* modOwner = m_originalCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DURATION>(m_spellInfo->Id, duration);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
Player* owner = m_originalCaster->ToPlayer();
|
||||
if (!owner && m_originalCaster->ToCreature()->IsTotem())
|
||||
@@ -3723,7 +3722,6 @@ void Spell::EffectInterruptCast(SpellEffIndex effIndex)
|
||||
{
|
||||
int32 duration = m_originalCaster->ModSpellDuration(m_spellInfo, unitTarget, m_originalCaster->CalcSpellDuration(m_spellInfo), false, 1 << effIndex);
|
||||
unitTarget->ProhibitSpellSchool(curSpellInfo->GetSchoolMask(), duration/*spellInfo->GetDuration()*/);
|
||||
m_originalCaster->ProcSkillsAndAuras(unitTarget, PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_NEG, PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG, PROC_SPELL_TYPE_MASK_ALL, PROC_SPELL_PHASE_HIT, PROC_HIT_INTERRUPT, nullptr, nullptr, nullptr);
|
||||
}
|
||||
ExecuteLogEffectInterruptCast(effIndex, unitTarget, curSpellInfo->Id);
|
||||
unitTarget->InterruptSpell(CurrentSpellTypes(i), false);
|
||||
@@ -4684,17 +4682,18 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
|
||||
void Spell::EffectAddExtraAttacks(SpellEffIndex effIndex)
|
||||
{
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!unitTarget || !unitTarget->IsAlive() || !unitTarget->GetVictim())
|
||||
if (!unitTarget || !unitTarget->IsAlive())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (unitTarget->m_extraAttacks)
|
||||
return;
|
||||
unitTarget->AddExtraAttacks(damage);
|
||||
|
||||
unitTarget->m_extraAttacks = damage;
|
||||
|
||||
ExecuteLogEffectExtraAttacks(effIndex, unitTarget->GetVictim(), damage);
|
||||
ExecuteLogEffectExtraAttacks(effIndex, unitTarget, damage);
|
||||
}
|
||||
|
||||
void Spell::EffectParry(SpellEffIndex /*effIndex*/)
|
||||
@@ -5817,8 +5816,19 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
m_runesState = m_caster->ToPlayer()->GetRunesState();
|
||||
|
||||
uint32 count = damage;
|
||||
if (count == 0)
|
||||
count = 1;
|
||||
if (count == 0) count = 1;
|
||||
for (uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
|
||||
{
|
||||
if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
|
||||
{
|
||||
if (m_spellInfo->Id == 45529)
|
||||
if (player->GetBaseRune(j) != RuneType(m_spellInfo->Effects[effIndex].MiscValueB))
|
||||
continue;
|
||||
player->SetRuneCooldown(j, 0);
|
||||
player->SetGracePeriod(j, player->IsInCombat()); // xinef: reset grace period
|
||||
--count;
|
||||
}
|
||||
}
|
||||
|
||||
// Blood Tap
|
||||
if (m_spellInfo->Id == 45529 && count > 0)
|
||||
@@ -5826,10 +5836,10 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
for (uint32 l = 0; l < MAX_RUNES && count > 0; ++l)
|
||||
{
|
||||
// Check if both runes are on cd as that is the only time when this needs to come into effect
|
||||
if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RUNE_BLOOD) && (player->GetRuneCooldown(l + 1) && player->GetCurrentRune(l + 1) == RUNE_BLOOD))
|
||||
if ((player->GetRuneCooldown(l) && player->GetCurrentRune(l) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)) && (player->GetRuneCooldown(l + 1) && player->GetCurrentRune(l + 1) == RuneType(m_spellInfo->Effects[effIndex].MiscValueB)))
|
||||
{
|
||||
// Should always update the rune with the lowest cd
|
||||
if (l + 1 < MAX_RUNES && player->GetRuneCooldown(l) >= player->GetRuneCooldown(l + 1))
|
||||
if (player->GetRuneCooldown(l) >= player->GetRuneCooldown(l + 1))
|
||||
l++;
|
||||
player->SetRuneCooldown(l, 0);
|
||||
player->SetGracePeriod(l, player->IsInCombat()); // xinef: reset grace period
|
||||
@@ -5840,15 +5850,6 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32 j = 0; j < MAX_RUNES && count > 0; ++j)
|
||||
{
|
||||
if (player->GetRuneCooldown(j) && player->GetCurrentRune(j) == RuneType(m_spellInfo->Effects[effIndex].MiscValue))
|
||||
{
|
||||
player->SetRuneCooldown(j, 0);
|
||||
--count;
|
||||
}
|
||||
}
|
||||
|
||||
// Empower rune weapon
|
||||
if (m_spellInfo->Id == 47568)
|
||||
{
|
||||
@@ -5858,7 +5859,7 @@ void Spell::EffectActivateRune(SpellEffIndex effIndex)
|
||||
|
||||
for (uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
if (player->GetRuneCooldown(i) && (player->GetCurrentRune(i) == RUNE_FROST))
|
||||
if (player->GetRuneCooldown(i) && (player->GetCurrentRune(i) == RUNE_FROST || player->GetCurrentRune(i) == RUNE_DEATH))
|
||||
{
|
||||
player->SetRuneCooldown(i, 0);
|
||||
player->SetGracePeriod(i, player->IsInCombat()); // xinef: reset grace period
|
||||
@@ -6060,7 +6061,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
int32 duration = m_spellInfo->GetDuration();
|
||||
|
||||
if (Player* modOwner = m_originalCaster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod<SPELLMOD_DURATION>(m_spellInfo->Id, duration);
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_DURATION, duration);
|
||||
|
||||
//TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
Map* map = caster->GetMap();
|
||||
|
||||
Reference in New Issue
Block a user