Core/Spells: DK Dancing Rune weapon diseases now count towards Heart Strike bonus damage
This commit is contained in:
@@ -679,6 +679,7 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
|
|||||||
#pragma warning(default:4355)
|
#pragma warning(default:4355)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_drwGUID = 0;
|
||||||
m_speakTime = 0;
|
m_speakTime = 0;
|
||||||
m_speakCount = 0;
|
m_speakCount = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -2573,6 +2573,11 @@ class Player : public Unit, public GridObject<Player>
|
|||||||
uint32 m_pendingSpectatorInviteInstanceId;
|
uint32 m_pendingSpectatorInviteInstanceId;
|
||||||
std::set<uint32> m_receivedSpectatorResetFor;
|
std::set<uint32> m_receivedSpectatorResetFor;
|
||||||
|
|
||||||
|
// Dancing Rune weapon
|
||||||
|
void setRuneWeaponGUID(uint64 guid) { m_drwGUID = guid; };
|
||||||
|
uint64 getRuneWeaponGUID() { return m_drwGUID; };
|
||||||
|
uint64 m_drwGUID;
|
||||||
|
|
||||||
bool CanSeeDKPet() const { return m_ExtraFlags & PLAYER_EXTRA_SHOW_DK_PET; }
|
bool CanSeeDKPet() const { return m_ExtraFlags & PLAYER_EXTRA_SHOW_DK_PET; }
|
||||||
void SetShowDKPet(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_SHOW_DK_PET; else m_ExtraFlags &= ~PLAYER_EXTRA_SHOW_DK_PET; };
|
void SetShowDKPet(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_SHOW_DK_PET; else m_ExtraFlags &= ~PLAYER_EXTRA_SHOW_DK_PET; };
|
||||||
void PrepareCharmAISpells();
|
void PrepareCharmAISpells();
|
||||||
|
|||||||
@@ -5047,6 +5047,11 @@ uint32 Unit::GetDiseasesByCaster(uint64 casterGUID, uint8 mode)
|
|||||||
SPELL_AURA_NONE
|
SPELL_AURA_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
uint64 drwGUID = 0;
|
||||||
|
|
||||||
|
if (Player* playerCaster = ObjectAccessor::GetPlayer(*this, casterGUID))
|
||||||
|
drwGUID = playerCaster->getRuneWeaponGUID();
|
||||||
|
|
||||||
uint32 diseases = 0;
|
uint32 diseases = 0;
|
||||||
for (uint8 index = 0; diseaseAuraTypes[index] != SPELL_AURA_NONE; ++index)
|
for (uint8 index = 0; diseaseAuraTypes[index] != SPELL_AURA_NONE; ++index)
|
||||||
{
|
{
|
||||||
@@ -5054,7 +5059,7 @@ uint32 Unit::GetDiseasesByCaster(uint64 casterGUID, uint8 mode)
|
|||||||
{
|
{
|
||||||
// Get auras with disease dispel type by caster
|
// Get auras with disease dispel type by caster
|
||||||
if ((*i)->GetSpellInfo()->Dispel == DISPEL_DISEASE
|
if ((*i)->GetSpellInfo()->Dispel == DISPEL_DISEASE
|
||||||
&& (*i)->GetCasterGUID() == casterGUID)
|
&& ((*i)->GetCasterGUID() == casterGUID || (*i)->GetCasterGUID() == drwGUID)) // if its caster or his dancing rune weapon
|
||||||
{
|
{
|
||||||
++diseases;
|
++diseases;
|
||||||
|
|
||||||
|
|||||||
@@ -332,7 +332,12 @@ class npc_pet_dk_dancing_rune_weapon : public CreatureScript
|
|||||||
// Xinef: Hit / Expertise scaling
|
// Xinef: Hit / Expertise scaling
|
||||||
me->AddAura(61017, me);
|
me->AddAura(61017, me);
|
||||||
if (Unit* owner = me->GetOwner())
|
if (Unit* owner = me->GetOwner())
|
||||||
|
{
|
||||||
me->GetMotionMaster()->MoveFollow(owner, 0.01f, me->GetFollowAngle(), MOTION_SLOT_CONTROLLED);
|
me->GetMotionMaster()->MoveFollow(owner, 0.01f, me->GetFollowAngle(), MOTION_SLOT_CONTROLLED);
|
||||||
|
if (Player* player = owner->ToPlayer())
|
||||||
|
player->setRuneWeaponGUID(me->GetGUID());
|
||||||
|
}
|
||||||
|
|
||||||
NullCreatureAI::InitializeAI();
|
NullCreatureAI::InitializeAI();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user