mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10814] Convert to ObjectGuid aura cast item guid access function.
This commit is contained in:
parent
957c9331a9
commit
3c0b80dada
4 changed files with 18 additions and 18 deletions
|
|
@ -375,9 +375,9 @@ class MANGOS_DLL_SPEC Aura
|
||||||
|
|
||||||
SpellEntry const* GetSpellProto() const { return GetHolder()->GetSpellProto(); }
|
SpellEntry const* GetSpellProto() const { return GetHolder()->GetSpellProto(); }
|
||||||
uint32 GetId() const{ return GetHolder()->GetSpellProto()->Id; }
|
uint32 GetId() const{ return GetHolder()->GetSpellProto()->Id; }
|
||||||
uint64 GetCastItemGUID() const { return GetHolder()->GetCastItemGuid().GetRawValue(); }
|
ObjectGuid const& GetCastItemGuid() const { return GetHolder()->GetCastItemGuid(); }
|
||||||
uint64 const& GetCasterGUID() const { return GetHolder()->GetCasterGUID(); }//can't be easy replaced by GetCasterGuid until AuraHolders backporting ig we don't want create additional problems for this.
|
uint64 const& GetCasterGUID() const { return GetHolder()->GetCasterGUID(); }//can't be easy replaced by GetCasterGuid until AuraHolders backporting ig we don't want create additional problems for this.
|
||||||
ObjectGuid GetCasterGuid() const { return GetHolder()->GetCasterGuid(); }
|
ObjectGuid const& GetCasterGuid() const { return GetHolder()->GetCasterGuid(); }
|
||||||
Unit* GetCaster() const { return GetHolder()->GetCaster(); }
|
Unit* GetCaster() const { return GetHolder()->GetCaster(); }
|
||||||
Unit* GetTarget() const { return GetHolder()->GetTarget(); }
|
Unit* GetTarget() const { return GetHolder()->GetTarget(); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2492,7 +2492,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||||
{
|
{
|
||||||
if ((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN &&
|
if ((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN &&
|
||||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000200000)) &&
|
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000200000)) &&
|
||||||
(*itr)->GetCastItemGUID() == item->GetGUID())
|
(*itr)->GetCastItemGuid() == item->GetObjectGuid())
|
||||||
{
|
{
|
||||||
m_damage += m_damage * damage / 100;
|
m_damage += m_damage * damage / 100;
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -437,8 +437,8 @@ SpellAuraProcResult Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
{
|
{
|
||||||
SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto();
|
SpellEntry const *hasteSpell = triggeredByAura->GetSpellProto();
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
uint32 triggered_spell_id = 0;
|
uint32 triggered_spell_id = 0;
|
||||||
Unit* target = pVictim;
|
Unit* target = pVictim;
|
||||||
|
|
@ -503,8 +503,8 @@ SpellAuraProcResult Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*
|
||||||
|
|
||||||
SpellEntry const *triggeredByAuraSpell = triggeredByAura->GetSpellProto();
|
SpellEntry const *triggeredByAuraSpell = triggeredByAura->GetSpellProto();
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
uint32 triggered_spell_id = 0;
|
uint32 triggered_spell_id = 0;
|
||||||
Unit* target = pVictim;
|
Unit* target = pVictim;
|
||||||
|
|
@ -567,8 +567,8 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
SpellEffectIndex effIndex = triggeredByAura->GetEffIndex();
|
SpellEffectIndex effIndex = triggeredByAura->GetEffIndex();
|
||||||
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
// some dummy spells have trigger spell in spell data already (from 3.0.3)
|
// some dummy spells have trigger spell in spell data already (from 3.0.3)
|
||||||
uint32 triggered_spell_id = dummySpell->EffectApplyAuraName[effIndex] == SPELL_AURA_DUMMY ? dummySpell->EffectTriggerSpell[effIndex] : 0;
|
uint32 triggered_spell_id = dummySpell->EffectApplyAuraName[effIndex] == SPELL_AURA_DUMMY ? dummySpell->EffectTriggerSpell[effIndex] : 0;
|
||||||
|
|
@ -2695,8 +2695,8 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit *pVictim, uint32 d
|
||||||
if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
||||||
basepoints[0] = triggerAmount;
|
basepoints[0] = triggerAmount;
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
// Try handle unknown trigger spells
|
// Try handle unknown trigger spells
|
||||||
// Custom requirements (not listed in procEx) Warning! damage dealing after this
|
// Custom requirements (not listed in procEx) Warning! damage dealing after this
|
||||||
|
|
@ -3504,8 +3504,8 @@ SpellAuraProcResult Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint3
|
||||||
if(!pVictim || !pVictim->isAlive())
|
if(!pVictim || !pVictim->isAlive())
|
||||||
return SPELL_AURA_PROC_FAILED;
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
// Basepoints of trigger aura
|
// Basepoints of trigger aura
|
||||||
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
int32 triggerAmount = triggeredByAura->GetModifier()->m_amount;
|
||||||
|
|
@ -3704,8 +3704,8 @@ SpellAuraProcResult Unit::HandleMaelstromWeaponAuraProc(Unit* /*pVictim*/, uint3
|
||||||
SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/)
|
SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 /*cooldown*/)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
switch(spellInfo->SpellFamilyName)
|
switch(spellInfo->SpellFamilyName)
|
||||||
{
|
{
|
||||||
|
|
@ -3749,8 +3749,8 @@ SpellAuraProcResult Unit::HandleAddPctModifierAuraProc(Unit* /*pVictim*/, uint32
|
||||||
SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown)
|
SpellAuraProcResult Unit::HandleModDamagePercentDoneAuraProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 /*procFlag*/, uint32 procEx, uint32 cooldown)
|
||||||
{
|
{
|
||||||
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
SpellEntry const *spellInfo = triggeredByAura->GetSpellProto();
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
// Aspect of the Viper
|
// Aspect of the Viper
|
||||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->SpellFamilyFlags & UI64LIT(0x4000000000000))
|
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->SpellFamilyFlags & UI64LIT(0x4000000000000))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10813"
|
#define REVISION_NR "10814"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue