mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge commit 'origin/master' into 310
Conflicts: src/game/SpellAuras.cpp
This commit is contained in:
commit
cae3f0a532
53 changed files with 1074 additions and 954 deletions
|
|
@ -2323,7 +2323,7 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
|
|||
return (100.0f - LvlPenalty) * LvlFactor / 100.0f;
|
||||
}
|
||||
|
||||
void Unit::SendAttackStart(Unit* pVictim)
|
||||
void Unit::SendMeleeAttackStart(Unit* pVictim)
|
||||
{
|
||||
WorldPacket data( SMSG_ATTACKSTART, 8 + 8 );
|
||||
data << uint64(GetGUID());
|
||||
|
|
@ -2333,7 +2333,7 @@ void Unit::SendAttackStart(Unit* pVictim)
|
|||
DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" );
|
||||
}
|
||||
|
||||
void Unit::SendAttackStop(Unit* victim)
|
||||
void Unit::SendMeleeAttackStop(Unit* victim)
|
||||
{
|
||||
if(!victim)
|
||||
return;
|
||||
|
|
@ -3743,7 +3743,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
|
|||
{
|
||||
// Custom dispel case
|
||||
// Unstable Affliction
|
||||
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags & 0x010000000000LL))
|
||||
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x010000000000)))
|
||||
{
|
||||
int32 damage = aur->GetModifier()->m_amount*9;
|
||||
uint64 caster_guid = aur->GetCasterGUID();
|
||||
|
|
@ -4553,7 +4553,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
{
|
||||
if(SpellEntry const* iterSpellProto = (*iter)->GetSpellProto())
|
||||
{
|
||||
if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & 0x10000000))
|
||||
if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & UI64LIT(0x10000000)))
|
||||
{
|
||||
found=true;
|
||||
break;
|
||||
|
|
@ -4949,7 +4949,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
||||
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||
{
|
||||
if(GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
|
@ -5001,7 +5001,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
// Retaliation
|
||||
if(dummySpell->SpellFamilyFlags==0x0000000800000000LL)
|
||||
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0000000800000000))
|
||||
{
|
||||
// check attack comes not from behind
|
||||
if (!HasInArc(M_PI, pVictim))
|
||||
|
|
@ -5045,7 +5045,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case SPELLFAMILY_WARLOCK:
|
||||
{
|
||||
// Seed of Corruption
|
||||
if (dummySpell->SpellFamilyFlags & 0x0000001000000000LL)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
{
|
||||
Modifier* mod = triggeredByAura->GetModifier();
|
||||
// if damage is more than need or target die from damage deal finish spell
|
||||
|
|
@ -5067,7 +5067,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
return true;
|
||||
}
|
||||
// Seed of Corruption (Mobs cast) - no die req
|
||||
if (dummySpell->SpellFamilyFlags == 0x00LL && dummySpell->SpellIconID == 1932)
|
||||
if (dummySpell->SpellFamilyFlags == UI64LIT(0x0) && dummySpell->SpellIconID == 1932)
|
||||
{
|
||||
Modifier* mod = triggeredByAura->GetModifier();
|
||||
// if damage is more than need deal finish spell
|
||||
|
|
@ -5148,7 +5148,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
// Vampiric Touch
|
||||
if( dummySpell->SpellFamilyFlags & 0x0000040000000000LL )
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
{
|
||||
if(!pVictim || !pVictim->isAlive())
|
||||
return false;
|
||||
|
|
@ -5190,10 +5190,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case 40438:
|
||||
{
|
||||
// Shadow Word: Pain
|
||||
if( procSpell->SpellFamilyFlags & 0x0000000000008000LL )
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||
triggered_spell_id = 40441;
|
||||
// Renew
|
||||
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
triggered_spell_id = 40440;
|
||||
else
|
||||
return false;
|
||||
|
|
@ -5275,19 +5275,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
float chance;
|
||||
|
||||
// Starfire
|
||||
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL )
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
{
|
||||
triggered_spell_id = 40445;
|
||||
chance = 25.0f;
|
||||
}
|
||||
// Rejuvenation
|
||||
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000010))
|
||||
{
|
||||
triggered_spell_id = 40446;
|
||||
chance = 25.0f;
|
||||
}
|
||||
// Mangle (cat/bear)
|
||||
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL )
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000044000000000))
|
||||
{
|
||||
triggered_spell_id = 40452;
|
||||
chance = 40.0f;
|
||||
|
|
@ -5318,7 +5318,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if (effIndex!=0)
|
||||
return true;
|
||||
// Wrath crit
|
||||
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
{
|
||||
if (!roll_chance_i(60))
|
||||
return false;
|
||||
|
|
@ -5327,7 +5327,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Starfire crit
|
||||
if (procSpell->SpellFamilyFlags & 0x0000000000000004LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000004))
|
||||
{
|
||||
triggered_spell_id = 48517;
|
||||
target = this;
|
||||
|
|
@ -5368,8 +5368,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
for(AuraList::const_iterator itr = sd.begin(); itr != sd.end(); ++itr)
|
||||
{
|
||||
SpellEntry const *spellProto = (*itr)->GetSpellProto();
|
||||
if( spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
|
||||
spellProto->SpellFamilyFlags & 0x0000000000040000LL)
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
|
||||
(spellProto->SpellFamilyFlags & UI64LIT(0x0000000000040000)))
|
||||
{
|
||||
(*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto));
|
||||
(*itr)->RefreshAura();
|
||||
|
|
@ -5404,7 +5404,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case SPELLFAMILY_HUNTER:
|
||||
{
|
||||
// Aspect of the Viper
|
||||
if ( dummySpell->SpellFamilyFlags & 0x4000000000000LL )
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x4000000000000))
|
||||
{
|
||||
uint32 maxmana = GetMaxPower(POWER_MANA);
|
||||
basepoints0 = maxmana* GetAttackTime(RANGED_ATTACK)/1000.0f/100.0f;
|
||||
|
|
@ -5414,7 +5414,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Thrill of the Hunt
|
||||
if ( dummySpell->SpellIconID == 2236 )
|
||||
if (dummySpell->SpellIconID == 2236)
|
||||
{
|
||||
if(!procSpell)
|
||||
return false;
|
||||
|
|
@ -5450,7 +5450,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if ( dummySpell->SpellIconID == 3560 )
|
||||
{
|
||||
// This effect only from Rapid Killing (mana regen)
|
||||
if (!(procSpell->SpellFamilyFlags & 0x0100000000000000LL))
|
||||
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0100000000000000)))
|
||||
return false;
|
||||
triggered_spell_id = 56654;
|
||||
target = this;
|
||||
|
|
@ -5461,7 +5461,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
|
||||
if (dummySpell->SpellFamilyFlags&0x000000008000000LL && effIndex==0)
|
||||
if ((dummySpell->SpellFamilyFlags & UI64LIT(0x000000008000000)) && effIndex==0)
|
||||
{
|
||||
triggered_spell_id = 25742;
|
||||
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
|
|
@ -5471,7 +5471,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Sacred Shield
|
||||
if (dummySpell->SpellFamilyFlags&0x0008000000000000LL)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0008000000000000))
|
||||
{
|
||||
triggered_spell_id = 58597;
|
||||
target = this;
|
||||
|
|
@ -5607,19 +5607,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)
|
||||
case 40470:
|
||||
{
|
||||
if( !procSpell )
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
float chance;
|
||||
|
||||
// Flash of light/Holy light
|
||||
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x00000000C0000000))
|
||||
{
|
||||
triggered_spell_id = 40471;
|
||||
chance = 15.0f;
|
||||
}
|
||||
// Judgement
|
||||
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL )
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000800000))
|
||||
{
|
||||
triggered_spell_id = 40472;
|
||||
chance = 50.0f;
|
||||
|
|
@ -5779,17 +5779,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
return false;
|
||||
|
||||
float chance;
|
||||
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000001))
|
||||
{
|
||||
triggered_spell_id = 40465; // Lightning Bolt
|
||||
chance = 15.0f;
|
||||
}
|
||||
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL)
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080))
|
||||
{
|
||||
triggered_spell_id = 40465; // Lesser Healing Wave
|
||||
chance = 10.0f;
|
||||
}
|
||||
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL)
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000001000000000))
|
||||
{
|
||||
triggered_spell_id = 40466; // Stormstrike
|
||||
chance = 50.0f;
|
||||
|
|
@ -5835,7 +5835,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Earth Shield
|
||||
if(dummySpell->SpellFamilyFlags & 0x0000040000000000LL)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000040000000000))
|
||||
{
|
||||
basepoints0 = triggerAmount;
|
||||
target = this;
|
||||
|
|
@ -5846,14 +5846,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if (dummySpell->SpellIconID == 2287)
|
||||
{
|
||||
// Lesser Healing Wave need aditional 60% roll
|
||||
if (procSpell->SpellFamilyFlags & 0x0000000000000080LL && !roll_chance_i(60))
|
||||
if ((procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)) && !roll_chance_i(60))
|
||||
return false;
|
||||
// lookup water shield
|
||||
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
|
||||
{
|
||||
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000002000000000LL)
|
||||
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000002000000000)))
|
||||
{
|
||||
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
|
||||
CastSpell(this, spell, true, castItem, triggeredByAura);
|
||||
|
|
@ -5914,12 +5914,12 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
mod->value = -100;
|
||||
mod->type = SPELLMOD_PCT;
|
||||
mod->spellId = dummySpell->Id;
|
||||
mod->mask = 0x0000000000000003LL;
|
||||
mod->mask2= 0LL;
|
||||
mod->mask = UI64LIT(0x0000000000000003);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
((Player*)this)->AddSpellMod(mod, true);
|
||||
|
||||
// Remove cooldown (Chain Lightning - have Category Recovery time)
|
||||
if (procSpell->SpellFamilyFlags & 0x0000000000000002LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000002))
|
||||
((Player*)this)->RemoveSpellCooldown(spellId);
|
||||
|
||||
CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
|
||||
|
|
@ -5938,8 +5938,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
|
||||
{
|
||||
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL)
|
||||
if ((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
|
||||
((*itr)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000400)))
|
||||
{
|
||||
uint32 spell = 0;
|
||||
switch ((*itr)->GetId())
|
||||
|
|
@ -6006,7 +6006,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
break;
|
||||
}
|
||||
// Vendetta
|
||||
if (dummySpell->SpellFamilyFlags & 0x0000000000010000LL)
|
||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000010000))
|
||||
{
|
||||
basepoints0 = triggerAmount * GetMaxHealth() / 100;
|
||||
triggered_spell_id = 50181;
|
||||
|
|
@ -6269,10 +6269,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
uint32 tick = 1; // Default tick = 1
|
||||
|
||||
// Hellfire have 15 tick
|
||||
if (procSpell->SpellFamilyFlags&0x0000000000000040LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000040))
|
||||
tick = 15;
|
||||
// Rain of Fire have 4 tick
|
||||
else if (procSpell->SpellFamilyFlags&0x0000000000000020LL)
|
||||
else if (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000020))
|
||||
tick = 4;
|
||||
else
|
||||
return false;
|
||||
|
|
@ -6291,7 +6291,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
trigger_spell_id = 18093;
|
||||
}
|
||||
// Drain Soul
|
||||
else if (auraSpellInfo->SpellFamilyFlags & 0x0000000000004000LL)
|
||||
else if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000004000))
|
||||
{
|
||||
Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
|
||||
for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
|
||||
|
|
@ -6420,7 +6420,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
// procspell is triggered spell but we need mana cost of original casted spell
|
||||
uint32 originalSpellId = procSpell->Id;
|
||||
// Holy Shock heal
|
||||
if(procSpell->SpellFamilyFlags & 0x0001000000000000LL)
|
||||
if (procSpell->SpellFamilyFlags & UI64LIT(0x0001000000000000))
|
||||
{
|
||||
switch(procSpell->Id)
|
||||
{
|
||||
|
|
@ -6488,7 +6488,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
case SPELLFAMILY_SHAMAN:
|
||||
{
|
||||
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
|
||||
if(auraSpellInfo->SpellFamilyFlags & 0x0000000000000400)
|
||||
if (auraSpellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000400))
|
||||
{
|
||||
switch(auraSpellInfo->Id)
|
||||
{
|
||||
|
|
@ -6667,7 +6667,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
case 53232:
|
||||
{
|
||||
// This effect only from Rapid Fire (ability cast)
|
||||
if (!(procSpell->SpellFamilyFlags & 0x0000000000000020LL))
|
||||
if (!(procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000020)))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -6725,7 +6725,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
if(!procSpell)
|
||||
return false;
|
||||
// For trigger from Blizzard need exist Improved Blizzard
|
||||
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags & 0x0000000000000080LL)
|
||||
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && (procSpell->SpellFamilyFlags & UI64LIT(0x0000000000000080)))
|
||||
{
|
||||
bool found = false;
|
||||
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
|
|
@ -7250,7 +7250,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
|
|||
if( meleeAttack && !hasUnitState(UNIT_STAT_MELEE_ATTACKING) )
|
||||
{
|
||||
addUnitState(UNIT_STAT_MELEE_ATTACKING);
|
||||
SendAttackStart(victim);
|
||||
SendMeleeAttackStart(victim);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -7291,7 +7291,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
|
|||
resetAttackTimer(OFF_ATTACK);
|
||||
|
||||
if(meleeAttack)
|
||||
SendAttackStart(victim);
|
||||
SendMeleeAttackStart(victim);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -7320,7 +7320,7 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/)
|
|||
((Creature*)this)->SetNoSearchAssistance(false);
|
||||
}
|
||||
|
||||
SendAttackStop(victim);
|
||||
SendMeleeAttackStop(victim);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -7511,7 +7511,7 @@ void Unit::SetPet(Pet* pet)
|
|||
SetUInt64Value(UNIT_FIELD_SUMMON, pet ? pet->GetGUID() : 0);
|
||||
|
||||
// FIXME: hack, speed must be set only at follow
|
||||
if(pet)
|
||||
if(pet && GetTypeId()==TYPEID_PLAYER)
|
||||
for(int i = 0; i < MAX_MOVE_TYPE; ++i)
|
||||
pet->SetSpeed(UnitMoveType(i), m_speed_rate[i], true);
|
||||
}
|
||||
|
|
@ -7695,7 +7695,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
|
||||
{
|
||||
SpellEntry const* m_spell = itr->second->GetSpellProto();
|
||||
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & 0x0004071B8044C402LL))
|
||||
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & UI64LIT(0x0004071B8044C402)))
|
||||
continue;
|
||||
modPercent += stepPercent * itr->second->GetStackAmount();
|
||||
if (modPercent >= maxPercent)
|
||||
|
|
@ -7715,7 +7715,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
break;
|
||||
case 5481: // Starfire Bonus
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x0000000000200002LL))
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, UI64LIT(0x0000000000200002)))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -7742,7 +7742,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
}
|
||||
else // Tundra Stalker
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT, 0x0400000000000000LL))
|
||||
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT, UI64LIT(0x0400000000000000)))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -7750,14 +7750,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
}
|
||||
case 7293: // Rage of Rivendare
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0x0200000000000000LL))
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, UI64LIT(0x0200000000000000)))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
// Twisted Faith
|
||||
case 7377:
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x0000000000008000LL, 0, GetGUID()))
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000000000008000), 0, GetGUID()))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -7768,7 +7768,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
|||
case 7601:
|
||||
case 7602:
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, 0x0000000000000400LL))
|
||||
if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, UI64LIT(0x0000000000000400)))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -8044,7 +8044,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
|||
{
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// Sacred Shield
|
||||
if (spellProto->SpellFamilyFlags & 0x0000000040000000LL)
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000000040000000))
|
||||
{
|
||||
Aura *aura = pVictim->GetDummyAura(58597);
|
||||
if (aura && aura->GetCasterGUID() == GetGUID())
|
||||
|
|
@ -8054,9 +8054,9 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
|
|||
break;
|
||||
case SPELLFAMILY_SHAMAN:
|
||||
// Lava Burst
|
||||
if (spellProto->SpellFamilyFlags & 0x0000100000000000LL)
|
||||
if (spellProto->SpellFamilyFlags & UI64LIT(0x0000100000000000))
|
||||
{
|
||||
if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x0000000010000000LL, 0, GetGUID()))
|
||||
if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, UI64LIT(0x0000000010000000), 0, GetGUID()))
|
||||
{
|
||||
// Consume shock aura if not have Glyph of Flame Shock
|
||||
if (!GetAura(55447, 0))
|
||||
|
|
@ -8143,8 +8143,6 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const *spellProto, uint32 dama
|
|||
break;
|
||||
}
|
||||
|
||||
crit_bonus = int32(crit_bonus * GetTotalAuraMultiplier(SPELL_AURA_MOD_CRITICAL_HEALING_BONUS));
|
||||
|
||||
if(pVictim)
|
||||
{
|
||||
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
|
||||
|
|
@ -8154,6 +8152,8 @@ uint32 Unit::SpellCriticalHealingBonus(SpellEntry const *spellProto, uint32 dama
|
|||
if(crit_bonus > 0)
|
||||
damage += crit_bonus;
|
||||
|
||||
damage = int32(damage * GetTotalAuraMultiplier(SPELL_AURA_MOD_CRITICAL_HEALING_AMOUNT));
|
||||
|
||||
return damage;
|
||||
}
|
||||
|
||||
|
|
@ -8208,7 +8208,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
break;
|
||||
case 7798: // Glyph of Regrowth
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x0000000000000040LL))
|
||||
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, UI64LIT(0x0000000000000040)))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -8222,8 +8222,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
if (itr->second->GetCasterGUID()!=GetGUID())
|
||||
continue;
|
||||
SpellEntry const* m_spell = itr->second->GetSpellProto();
|
||||
if ( m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
|
||||
!(m_spell->SpellFamilyFlags & 0x0000001000000050LL))
|
||||
if (m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
|
||||
!(m_spell->SpellFamilyFlags & UI64LIT(0x0000001000000050)))
|
||||
continue;
|
||||
modPercent += stepPercent * itr->second->GetStackAmount();
|
||||
}
|
||||
|
|
@ -8232,7 +8232,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
}
|
||||
case 7871: // Glyph of Lesser Healing Wave
|
||||
{
|
||||
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x0000040000000000LL, 0, GetGUID()))
|
||||
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, UI64LIT(0x0000040000000000), 0, GetGUID()))
|
||||
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -8328,7 +8328,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
|||
|
||||
// Taken mods
|
||||
// Healing Wave cast
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags & 0x0000000000000040LL)
|
||||
if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && (spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000040)))
|
||||
{
|
||||
// Search for Healing Way on Victim
|
||||
Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
|
|
@ -8626,7 +8626,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
|
|||
if(spellProto==NULL)
|
||||
break;
|
||||
// Should increase Shred (initial Damage of Lacerate and Rake handled in Spell::EffectSchoolDMG)
|
||||
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags==0x00008000LL))
|
||||
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags == UI64LIT(0x00008000)))
|
||||
TakenTotalMod *= (100.0f+(*i)->GetModifier()->m_amount)/100.0f;
|
||||
break;
|
||||
}
|
||||
|
|
@ -10325,13 +10325,15 @@ CharmInfo::CharmInfo(Unit* unit)
|
|||
void CharmInfo::InitPetActionBar()
|
||||
{
|
||||
// the first 3 SpellOrActions are attack, follow and stay
|
||||
// last 3 SpellOrActions are reactions
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
{
|
||||
SetActionBar(i,COMMAND_ATTACK - i,ACT_COMMAND);
|
||||
SetActionBar(i + 7,COMMAND_ATTACK - i,ACT_REACTION);
|
||||
}
|
||||
// middle 4 SpellOrActions are spells/special attacks/abilities
|
||||
for(uint32 i = 0; i < 4; ++i)
|
||||
SetActionBar(i,0,ACT_DISABLED);
|
||||
SetActionBar(i + 3,0,ACT_DISABLED);
|
||||
}
|
||||
|
||||
void CharmInfo::InitEmptyActionBar()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue