diff options
author | QAston <none@none> | 2009-07-22 22:52:05 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-22 22:52:05 +0200 |
commit | 9d501da1b8ddb4207ad1d983dcaff2a09b390057 (patch) | |
tree | 0c959903dd1c396500ac82b7932d89f7064d0aae /src | |
parent | 974fad377e6f9479d5beb9bca7c51eb8451766a3 (diff) |
*Fix Piercing Shots - by freeganja.
*Clear movement generators for unit when removing from world.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 72d59694632..1b13a6673db 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3368,6 +3368,8 @@ void Spell::EffectSummonType(uint32 i) TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); + if (!summon) + continue; summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID()); if (properties->Category == SUMMON_CATEGORY_ALLY) summon->setFaction(m_originalCaster->getFaction()); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 56d3653abd2..5f651fcd015 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7349,7 +7349,25 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig break; } case SPELLFAMILY_HUNTER: + { + if (auraSpellInfo->SpellIconID == 3247) // Piercing Shots + { + switch (auraSpellInfo->Id) + { + case 53234: // Rank 1 + case 53237: // Rank 2 + case 53238: // Rank 3 + trigger_spell_id = 63468; + break; + default: + sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots",auraSpellInfo->Id); + return false; + } + basepoints0 = int32(damage * triggerAmount / 100); + target = pVictim; + } break; + } case SPELLFAMILY_PALADIN: { /* @@ -12132,6 +12150,7 @@ void Unit::RemoveFromWorld() ExitVehicle(); UnsummonAllTotems(); RemoveAllControlled(); + GetMotionMaster()->Clear(false); // remove different non-standard movement generators. if(m_NotifyListPos >= 0) { @@ -12164,7 +12183,6 @@ void Unit::CleanupsBeforeDelete() getHostilRefManager().setOnlineOfflineState(false); RemoveAllGameObjects(); RemoveAllDynObjects(); - GetMotionMaster()->Clear(false); // remove different non-standard movement generators. if(IsInWorld()) RemoveFromWorld(); |