aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-09 11:13:45 +0200
committerQAston <none@none>2009-04-09 11:13:45 +0200
commit0d9cd407b99cd33158a2a9bac19bd2ca688b6c93 (patch)
tree5369f241d85b1434d746fc69bcf2e4e5eb7973d4 /src
parent031fe61a53cc3a9edd4883ffc0190095eba24905 (diff)
*Fix build with vcpp80.
*Set aura charges for Sudden Death. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/VC80/80ScriptDev2.vcproj1
-rw-r--r--src/game/SpellAuras.cpp29
-rw-r--r--src/game/SpellMgr.cpp36
3 files changed, 18 insertions, 48 deletions
diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
index 79f4c293310..696a21c39db 100644
--- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj
+++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj
@@ -2612,6 +2612,7 @@
RelativePath="..\system.cpp"
>
</File>
+ </Filter>
</Files>
<Globals>
</Globals>
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 93176a83470..8694131d32c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -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)
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 57b68ae55d9..a53143c4fbd 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -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;
}