Merge branch 'master' of github.com:TrinityCore/TrinityCore
This commit is contained in:
@@ -6809,21 +6809,27 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
||||||
if ((procFlag & PROC_FLAG_DONE_MELEE_AUTO_ATTACK) || (procSpell && procSpell->Id == 53595))
|
bool stacker = !procSpell || procSpell->Id == 53595;
|
||||||
|
bool damager = procSpell && procSpell->EquippedItemClass == ITEM_CLASS_WEAPON;
|
||||||
|
|
||||||
|
if (!stacker && !damager)
|
||||||
|
return false;
|
||||||
|
|
||||||
triggered_spell_id = 31803;
|
triggered_spell_id = 31803;
|
||||||
|
|
||||||
// On target with 5 stacks of Holy Vengeance direct damage is done
|
// On target with 5 stacks of Holy Vengeance direct damage is done
|
||||||
if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID()))
|
if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID()))
|
||||||
{
|
{
|
||||||
if (aur->GetStackAmount() == 5)
|
if (aur->GetStackAmount() == 5)
|
||||||
{
|
{
|
||||||
|
if (stacker)
|
||||||
aur->RefreshDuration();
|
aur->RefreshDuration();
|
||||||
CastSpell(pVictim, 42463, true);
|
CastSpell(pVictim, 42463, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only Autoattack can stack debuff
|
if (!stacker)
|
||||||
if (procFlag & PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS)
|
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -6834,21 +6840,27 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
||||||
if ((procFlag & PROC_FLAG_DONE_MELEE_AUTO_ATTACK) || (procSpell && procSpell->Id == 53595))
|
bool stacker = !procSpell || procSpell->Id == 53595;
|
||||||
|
bool damager = procSpell && procSpell->EquippedItemClass == ITEM_CLASS_WEAPON;
|
||||||
|
|
||||||
|
if (!stacker && !damager)
|
||||||
|
return false;
|
||||||
|
|
||||||
triggered_spell_id = 53742;
|
triggered_spell_id = 53742;
|
||||||
|
|
||||||
// On target with 5 stacks of Blood Corruption direct damage is done
|
// On target with 5 stacks of Blood Corruption direct damage is done
|
||||||
if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID()))
|
if (Aura* aur = pVictim->GetAura(triggered_spell_id, GetGUID()))
|
||||||
{
|
{
|
||||||
if (aur->GetStackAmount() == 5)
|
if (aur->GetStackAmount() == 5)
|
||||||
{
|
{
|
||||||
|
if (stacker)
|
||||||
aur->RefreshDuration();
|
aur->RefreshDuration();
|
||||||
CastSpell(pVictim, 53739, true);
|
CastSpell(pVictim, 53739, true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only Autoattack can stack debuff
|
if (!stacker)
|
||||||
if (procFlag & PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS)
|
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,16 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
|||||||
{
|
{
|
||||||
// Send next quest
|
// Send next quest
|
||||||
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
|
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
|
||||||
|
{
|
||||||
|
if (nextquest->IsAutoAccept() && _player->CanAddQuest(nextquest, true))
|
||||||
|
{
|
||||||
|
_player->AddQuest(nextquest, pObject);
|
||||||
|
if (_player->CanCompleteQuest(nextquest->GetQuestId()))
|
||||||
|
_player->CompleteQuest(nextquest->GetQuestId());
|
||||||
|
}
|
||||||
|
|
||||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
||||||
|
}
|
||||||
|
|
||||||
(pObject->ToCreature())->AI()->sQuestReward(_player, pQuest, reward);
|
(pObject->ToCreature())->AI()->sQuestReward(_player, pQuest, reward);
|
||||||
}
|
}
|
||||||
@@ -335,7 +344,17 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
|||||||
{
|
{
|
||||||
// Send next quest
|
// Send next quest
|
||||||
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
|
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
|
||||||
|
{
|
||||||
|
if (nextquest->IsAutoAccept() && _player->CanAddQuest(nextquest, true))
|
||||||
|
{
|
||||||
|
_player->AddQuest(nextquest, pObject);
|
||||||
|
if (_player->CanCompleteQuest(nextquest->GetQuestId()))
|
||||||
|
_player->CompleteQuest(nextquest->GetQuestId());
|
||||||
|
}
|
||||||
|
|
||||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
||||||
|
}
|
||||||
|
|
||||||
pObject->ToGameObject()->AI()->QuestReward(_player, pQuest, reward);
|
pObject->ToGameObject()->AI()->QuestReward(_player, pQuest, reward);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
|
#include "SpellScript.h"
|
||||||
#include "ulduar.h"
|
#include "ulduar.h"
|
||||||
|
|
||||||
enum AuriayaSpells
|
enum AuriayaSpells
|
||||||
|
|||||||
Reference in New Issue
Block a user