aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-04 18:31:37 +0200
committerQAston <none@none>2009-05-04 18:31:37 +0200
commit6998da202884581ba50ed25ec3cfb7a2e45b8e77 (patch)
tree2b1ec286d4d9f0cd3ad9d3fdb5b06364d581ddbd /src
parent8ade78cf690d2c0c90ac7fb1681f633706217e71 (diff)
*Fix chains of ice
*Correct typo in my prev commit-by megamage *Fix hearthstone obtaining from innkeeper. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/NPCHandler.cpp2
-rw-r--r--src/game/SpellAuras.cpp6
-rw-r--r--src/game/SpellEffects.cpp8
-rw-r--r--src/game/SpellMgr.cpp9
-rw-r--r--src/game/Unit.cpp9
5 files changed, 9 insertions, 25 deletions
diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp
index 30d316afd83..5a9953564ab 100644
--- a/src/game/NPCHandler.cpp
+++ b/src/game/NPCHandler.cpp
@@ -453,7 +453,7 @@ void WorldSession::SendBindPoint(Creature *npc)
_player->m_homebindZ = _player->GetPositionZ();
// send spell for bind 3286 bind magic
- npc->CastSpell(_player, bindspell, true);
+ _player->CastSpell(_player, bindspell, true);
WorldPacket data( SMSG_TRAINER_BUY_SUCCEEDED, (8+4));
data << npc->GetGUID();
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 105c5a97f67..b1b2e487214 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -6618,11 +6618,11 @@ void AuraEffect::PeriodicDummyTick()
if (spell->SpellFamilyFlags[1] & 0x00004000)
{
// Get 0 effect aura
- AuraEffect *slow = m_target->GetAuraEffect(GetId(), 0);
+ AuraEffect *slow = GetParentAura()->GetPartAura(0);
if (slow)
{
- slow->ApplyModifier(false);;
- slow->SetAmount(GetAmount()*2);
+ slow->ApplyModifier(false);
+ slow->SetAmount(slow->GetAmount() + GetAmount());
if (slow->GetAmount() > 0) slow->SetAmount(0);
slow->ApplyModifier(true);
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 9da352bfbda..59ee2541ae0 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -413,14 +413,6 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
// Heroic Throw ${$m1+$AP*.50}
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00000001)
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
- // Shockwave ${$m3/100*$AP}
- else if(m_spellInfo->SpellFamilyFlags[1] & 0x00008000)
- {
- int32 pct = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget);
- if (pct > 0)
- damage+= int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * pct / 100);
- break;
- }
// Thunder Clap
else if(m_spellInfo->SpellFamilyFlags[0] & 0x80)
{
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 639f4e552e4..85752056552 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1256,12 +1256,6 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
}
else // For spells need check school/spell family/family mask
{
- // Item cast can trigger only with spells with spellfamily
- if (procExtra & PROC_EX_INTERNAL_ITEM_CAST)
- {
- if (!spellProcEvent->spellFamilyName)
- return false;
- }
// Check (if set) for school
if(spellProcEvent->schoolMask && (spellProcEvent->schoolMask & procSpell->SchoolMask) == 0)
return false;
@@ -1279,9 +1273,6 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
}
}
}
- // Item cast can trigger only with spells with spellfamily
- else if (procExtra & PROC_EX_INTERNAL_ITEM_CAST)
- return false;
// Check for extra req (if none) and hit/crit
if (procEvent_procEx == PROC_EX_NONE)
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d05d84416ce..0b48251dbca 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3196,7 +3196,7 @@ uint32 Unit::GetWeaponSkillValue (WeaponAttackType attType, Unit const* target)
uint32 skill = item ? item->GetSkill() : SKILL_UNARMED;
// in PvP use full skill instead current skill value
- value = (target && target->GetTypeId() == TYPEID_PLAYER || IS_PLAYER_GUID(GetOwnerGUID()))
+ value = (target && target->IsControlledByPlayer())
? ((Player*)this)->GetMaxSkillValue(skill)
: ((Player*)this)->GetSkillValue(skill);
// Modify value from ratings
@@ -5177,7 +5177,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
{
if (effIndex!=0)
return false;
- AuraEffect *counter = GetAuraEffect(triggeredByAura->GetId(), 1);
+ AuraEffect *counter = triggeredByAura->GetParentAura()->GetPartAura(1);
if (!counter)
return true;
@@ -9657,7 +9657,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
case 6427: case 6428: // Dirty Deeds
if(pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
{
- AuraEffect* eff0 = GetAuraEffect((*i)->GetId(),0,GetGUID());
+ AuraEffect* eff0 = (*i)->GetParentAura()->GetPartAura(0);
if(!eff0 || (*i)->GetEffIndex()!=1)
{
sLog.outError("Spell structure of DD (%u) changed.",(*i)->GetId());
@@ -10219,7 +10219,8 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
stack_bonus = GetTotalAuraMultiplier(SPELL_AURA_MOD_VEHICLE_SPEED_ALWAYS);
// for some spells this mod is applied on vehicle owner
- uint32 owner_speed_mod = ((Vehicle*)this)->GetOwner()->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED);
+ if (Unit * owner = (Vehicle*)this)->GetOwner())
+ uint32 owner_speed_mod = owner->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED);
main_speed_mod = main_speed_mod>owner_speed_mod ? main_speed_mod : owner_speed_mod;
}