*Fix the bug that proc debuff applied on caster.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-26 16:50:35 -06:00
parent b24cc17a4b
commit 9bd4507f92
2 changed files with 8 additions and 4 deletions
+4
View File
@@ -1140,6 +1140,10 @@ void Aura::TriggerSpell()
uint64 originalCasterGUID = GetCasterGUID(); uint64 originalCasterGUID = GetCasterGUID();
SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id); SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(trigger_spell_id);
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(triggeredSpellInfo->rangeIndex);
if(!GetSpellMaxRange(srange))
target = caster; //for druid dispel poison
SpellEntry const *auraSpellInfo = GetSpellProto(); SpellEntry const *auraSpellInfo = GetSpellProto();
uint32 auraId = auraSpellInfo->Id; uint32 auraId = auraSpellInfo->Id;
+4 -4
View File
@@ -899,13 +899,13 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
{ {
if(spellmgr.SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET) if(spellmgr.SpellTargetType[spellInfo->EffectImplicitTargetA[i]] == TARGET_TYPE_UNIT_TARGET)
{ {
SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex); /*SpellRangeEntry const* srange = sSpellRangeStore.LookupEntry(spellInfo->rangeIndex);
if(srange && GetSpellMaxRange(srange) == 0.0f) if(srange && GetSpellMaxRange(srange) == 0.0f)
{ {
Victim = this; Victim = this;
break; break;
} }
else if(!Victim) else */if(!Victim)
{ {
sLog.outError("CastSpell: spell id %i by caster: %s %u) does not have unit target", spellInfo->Id,(GetTypeId()==TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId()==TYPEID_PLAYER ? GetGUIDLow() : GetEntry())); sLog.outError("CastSpell: spell id %i by caster: %s %u) does not have unit target", spellInfo->Id,(GetTypeId()==TYPEID_PLAYER ? "player (GUID:" : "creature (Entry:"),(GetTypeId()==TYPEID_PLAYER ? GetGUIDLow() : GetEntry()));
return; return;
@@ -7693,8 +7693,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
if(basepoints0) if(basepoints0)
CastCustomSpell(target,trigger_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura); CastCustomSpell(target,trigger_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
else if(spellmgr.GetSpellCustomAttr(trigger_spell_id) & SPELL_ATTR_CU_AURA_SPELL) //else if(spellmgr.GetSpellCustomAttr(trigger_spell_id) & SPELL_ATTR_CU_AURA_SPELL)
AddAura(trigger_spell_id, target); // AddAura(trigger_spell_id, target);
else else
CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura); CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura);