*Fix build with vcpp80.

*Set aura charges for Sudden Death.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-09 11:13:45 +02:00
parent 031fe61a53
commit 0d9cd407b9
3 changed files with 18 additions and 48 deletions

View File

@@ -2612,6 +2612,7 @@
RelativePath="..\system.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>

View File

@@ -1479,23 +1479,6 @@ void AuraEffect::HandleAddModifier(bool apply, bool Real)
if (apply)
{
// Add custom charges for some mod aura
switch (m_spellProto->Id)
{
case 17941: // Shadow Trance
case 22008: // Netherwind Focus
case 31834: // Light's Grace
case 34754: // Clearcasting
case 34936: // Backlash
case 48108: // Hot Streak
case 51124: // Killing Machine
case 54741: // Firestarter
case 57761: // Fireball!
case 39805: // Lightning Overload
GetParentAura()->SetAuraCharges(1);
break;
}
SpellModifier *mod = new SpellModifier;
mod->op = SpellModOp(GetMiscValue());
@@ -4229,18 +4212,6 @@ void AuraEffect::HandleAuraProcTriggerSpell(bool apply, bool Real)
{
if(!Real)
return;
if(apply)
{
// some spell have charges by functionality not have its in spell data
switch (GetId())
{
case 28200: // Ascendance (Talisman of Ascendance trinket)
GetParentAura()->SetAuraCharges(6);
break;
default: break;
}
}
}
void AuraEffect::HandleAuraModStalked(bool apply, bool Real)

View File

@@ -587,24 +587,6 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
case SPELL_AURA_ADD_TARGET_TRIGGER:
return true;
case SPELL_AURA_PERIODIC_TRIGGER_SPELL:
if(!deep)
{
uint32 spellTriggeredId = spellproto->EffectTriggerSpell[effIndex];
SpellEntry const *spellTriggeredProto = sSpellStore.LookupEntry(spellTriggeredId);
if(spellTriggeredProto)
{
// non-positive targets of main spell return early
for(int i = 0; i < 3; ++i)
{
// if non-positive trigger cast targeted to positive target this main cast is non-positive
// this will place this spell auras as debuffs
if(IsPositiveTarget(spellTriggeredProto->EffectImplicitTargetA[effIndex],spellTriggeredProto->EffectImplicitTargetB[effIndex]) && !IsPositiveEffect(spellTriggeredId,i, true))
return false;
}
}
}
break;
case SPELL_AURA_PROC_TRIGGER_SPELL:
// many positive auras have negative triggered spells at damage for example and this not make it negative (it can be canceled for example)
break;
@@ -715,7 +697,7 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex, bool deep)
return false;
if (!deep && spellproto->EffectTriggerSpell[effIndex]
&& !spellproto->procFlags
&& spellproto->EffectImplicitTargetA[effIndex]!=TARGET_SELF
&& IsPositiveTarget(spellproto->EffectImplicitTargetA[effIndex],spellproto->EffectImplicitTargetB[effIndex])
&& !IsPositiveSpell(spellproto->EffectTriggerSpell[effIndex], true))
return false;
@@ -2368,6 +2350,22 @@ void SpellMgr::LoadSpellCustomAttr()
case 18662: // Curse of Doom
spellInfo->EffectBasePoints[0] = 0; //prevent summon too many of them
break;
case 17941: // Shadow Trance
case 22008: // Netherwind Focus
case 31834: // Light's Grace
case 34754: // Clearcasting
case 34936: // Backlash
case 48108: // Hot Streak
case 51124: // Killing Machine
case 54741: // Firestarter
case 57761: // Fireball!
case 39805: // Lightning Overload
case 52437: // Sudden Death
spellInfo->procCharges=1;
break;
case 28200: // Ascendance (Talisman of Ascendance trinket)
spellInfo->procCharges=6;
break;
default:
break;
}