aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorShauren <none@none>2010-10-16 16:34:21 +0200
committerShauren <none@none>2010-10-16 16:34:21 +0200
commit8a17d95647f2d87a5a6c08efbcb32040462b4f37 (patch)
treeef44f2034474fc9c4c5b78d3f137b3680fceee8e /src/server/game
parent222d1cd211cdea1d0e107e478437cc041728c9ff (diff)
Scripts/Icecrown Citadel: Added Professor Putricide script
Scripts/Icecrown Citadel: Fixed Professor Putricide gate opening when both Rotface and Festergut are dead Scripts/Icecrown Citadel: Added script updating entries of NPCs at Light's Hammer depending on faction Scripts/Icecrown Citadel: Rotface should not pick main tank as target for Slime Spray (removed debugging code) Core/Spells/Conditions : Spell script target condition now accepts ConditionValue3 as affecting effect mask (only search targets with matching mask) --HG-- branch : trunk extra : rebase_source : 943e3bac5d9063974d7f7132f144e91946f825d4
Diffstat (limited to 'src/server/game')
-rwxr-xr-xsrc/server/game/Conditions/ConditionMgr.cpp14
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp10
-rwxr-xr-xsrc/server/game/Miscellaneous/SharedDefines.h4
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp14
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp20
-rwxr-xr-xsrc/server/game/Spells/Spell.h2
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.cpp40
7 files changed, 89 insertions, 15 deletions
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index a6626ca62b2..155d73569f2 100755
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -828,10 +828,17 @@ bool ConditionMgr::isSourceTypeValid(Condition* cond)
spellProto->EffectImplicitTargetB[i] == TARGET_UNIT_CONE_ENTRY)
{
targetfound = true;
- break;
+ //break;
+ }
+ else if (cond->mConditionValue3 & (1 << i))
+ {
+ cond->mConditionValue3 &= ~(1 << i);
+ sLog.outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DST_NEARBY_ENTRY (46)"
+ ",TARGET_UNIT_AREA_ENTRY_SRC(7), TARGET_UNIT_AREA_ENTRY_DST(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
+ "TARGET_GAMEOBJECT_AREA_SRC(51), TARGET_GAMEOBJECT_AREA_DST(52) in effect %u", cond->mSourceEntry, uint32(i));
}
}
- if (!targetfound)
+ if (!targetfound && !cond->mConditionValue3) // cond->mConditionValue3 already errored up there
{
sLog.outErrorDb("SourceEntry %u in `condition` table does not have any implicit target TARGET_UNIT_NEARBY_ENTRY(38) or TARGET_DST_NEARBY_ENTRY (46)"
",TARGET_UNIT_AREA_ENTRY_SRC(7), TARGET_UNIT_AREA_ENTRY_DST(8), TARGET_UNIT_CONE_ENTRY(60), TARGET_GAMEOBJECT_NEARBY_ENTRY(40)"
@@ -1175,9 +1182,6 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
break;
}
}
-
- if (cond->mConditionValue3)
- sLog.outErrorDb("SpellTarget condition has useless data in value3 (%u)!", cond->mConditionValue3);
break;
}
case CONDITION_CREATURE_TARGET:
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 2e3737c6037..f4d3346145b 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5701,6 +5701,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
target = triggeredByAura->GetCaster();
break;
}
+ // Gaseous Bloat (Professor Putricide add)
+ case 70215:
+ case 72858:
+ case 72859:
+ case 72860:
+ {
+ target = getVictim();
+ triggered_spell_id = 70701;
+ break;
+ }
}
break;
}
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index bf2de3b0930..5f49e7e60a7 100755
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -1004,10 +1004,10 @@ enum AuraState
AURA_STATE_DEADLY_POISON = 16, // T |
AURA_STATE_ENRAGE = 17, // C |
AURA_STATE_BLEEDING = 18, // T|
- //AURA_STATE_UNKNOWN19 = 19, // | not used
+ AURA_STATE_UNKNOWN19 = 19, // |
//AURA_STATE_UNKNOWN20 = 20, // c | only (45317 Suicide)
//AURA_STATE_UNKNOWN21 = 21, // | not used
- //AURA_STATE_UNKNOWN22 = 22, // C t| varius spells (63884, 50240)
+ AURA_STATE_UNKNOWN22 = 22, // C t| varius spells (63884, 50240)
AURA_STATE_HEALTH_ABOVE_75_PERCENT = 23, // C |
};
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 629f9b9850f..87baad480a7 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1316,6 +1316,20 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
}
}
}
+ if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_GENERIC)
+ {
+ switch (GetId())
+ {
+ case 70911: // Unbound Plague
+ case 72854: // Unbound Plague
+ case 72855: // Unbound Plague
+ case 72856: // Unbound Plague
+ damage *= uint32(pow(1.25f, int32(m_tickNumber)));
+ break;
+ default:
+ break;
+ }
+ }
}
else
damage = uint32(target->CountPctFromMaxHealth(damage));
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 0aed57b9c4e..819fe27606f 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1877,7 +1877,7 @@ void Spell::SearchGOAreaTarget(std::list<GameObject*> &TagGOMap, float radius, S
m_caster->GetMap()->VisitGrid(pos->m_positionX, pos->m_positionY, radius, searcher);
}
-WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType)
+WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, SpellEffIndex effIndex)
{
switch(TargetType)
{
@@ -1888,9 +1888,9 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType)
{
sLog.outDebug("Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 14)", m_spellInfo->Id, m_caster->GetEntry());
if (IsPositiveSpell(m_spellInfo->Id))
- return SearchNearbyTarget(range, SPELL_TARGETS_ALLY);
+ return SearchNearbyTarget(range, SPELL_TARGETS_ALLY, effIndex);
else
- return SearchNearbyTarget(range, SPELL_TARGETS_ENEMY);
+ return SearchNearbyTarget(range, SPELL_TARGETS_ENEMY, effIndex);
}
Creature* creatureScriptTarget = NULL;
@@ -1900,6 +1900,8 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType)
{
if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
+ if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & (1 << uint32(effIndex))))
+ continue;
switch((*i_spellST)->mConditionValue1)
{
case SPELL_TARGET_TYPE_CONTROLLED:
@@ -2087,20 +2089,20 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
case TARGET_UNIT_NEARBY_ENEMY:
range = GetSpellMaxRange(m_spellInfo, false);
if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ENEMY);
+ target = SearchNearbyTarget(range, SPELL_TARGETS_ENEMY, SpellEffIndex(i));
break;
case TARGET_UNIT_NEARBY_ALLY:
case TARGET_UNIT_NEARBY_ALLY_UNK:
case TARGET_UNIT_NEARBY_RAID:
range = GetSpellMaxRange(m_spellInfo, true);
if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ALLY);
+ target = SearchNearbyTarget(range, SPELL_TARGETS_ALLY, SpellEffIndex(i));
break;
case TARGET_UNIT_NEARBY_ENTRY:
case TARGET_GAMEOBJECT_NEARBY_ENTRY:
range = GetSpellMaxRange(m_spellInfo, IsPositiveSpell(m_spellInfo->Id));
if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY);
+ target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i));
break;
}
@@ -2303,7 +2305,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
float range = GetSpellMaxRange(m_spellInfo, IsPositiveSpell(m_spellInfo->Id));
if (modOwner) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, range, this);
- if (WorldObject *target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY))
+ if (WorldObject *target = SearchNearbyTarget(range, SPELL_TARGETS_ENTRY, SpellEffIndex(i)))
m_targets.setDst(*target);
break;
}
@@ -2473,6 +2475,8 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
{
if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
+ if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & (1<<i)))
+ continue;
if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CREATURE)
SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, (*i_spellST)->mConditionValue2);
else if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_CONTROLLED)
@@ -2568,6 +2572,8 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
{
if ((*i_spellST)->mConditionType != CONDITION_SPELL_SCRIPT_TARGET)
continue;
+ if ((*i_spellST)->mConditionValue3 && !((*i_spellST)->mConditionValue3 & (1<<i)))
+ continue;
if ((*i_spellST)->mConditionValue1 == SPELL_TARGET_TYPE_GAMEOBJECT)
SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO, (*i_spellST)->mConditionValue2);
}
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 3509f0bffac..2a74e21f817 100755
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -660,7 +660,7 @@ class Spell
void SearchAreaTarget(std::list<Unit*> &unitList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0);
void SearchGOAreaTarget(std::list<GameObject*> &gobjectList, float radius, SpellNotifyPushType type, SpellTargets TargetType, uint32 entry = 0);
void SearchChainTarget(std::list<Unit*> &unitList, float radius, uint32 unMaxTargets, SpellTargets TargetType);
- WorldObject* SearchNearbyTarget(float range, SpellTargets TargetType);
+ WorldObject* SearchNearbyTarget(float range, SpellTargets TargetType, SpellEffIndex effIndex);
bool IsValidSingleTargetEffect(Unit const* target, Targets type) const;
bool IsValidSingleTargetSpell(Unit const* target) const;
bool IsValidDeadOrAliveTarget(Unit const* target) const;
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 48d8faa4369..f18d53bc893 100755
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3605,6 +3605,8 @@ void SpellMgr::LoadSpellCustomAttr()
case 64422: case 64688: // Sonic Screech
case 72373: // Shared Suffering
case 71904: // Chaos Bane
+ case 70492: case 72505: // Ooze Eruption
+ case 72624: case 72625: // Ooze Eruption
// ONLY SPELLS WITH SPELLFAMILY_GENERIC and EFFECT_SCHOOL_DAMAGE
mSpellCustomAttr[i] |= SPELL_ATTR_CU_SHARE_DAMAGE;
count++;
@@ -3882,6 +3884,44 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectSpellClassMask[0] = flag96(423937, 276955137, 2049);
count++;
break;
+ // this is here until targetAuraSpell and alike support SpellDifficulty.dbc
+ case 70459: // Ooze Eruption Search Effect
+ spellInfo->targetAuraSpell = 0;
+ count++;
+ break;
+ case 71413: // Green Ooze Summon
+ case 71414: // Orange Ooze Summon
+ spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST;
+ count++;
+ break;
+ // THIS IS HERE BECAUSE COOLDOWN ON CREATURE PROCS IS NOT IMPLEMENTED
+ case 71604: // Mutated Strength
+ case 72673: // Mutated Strength
+ case 72674: // Mutated Strength
+ case 72675: // Mutated Strength
+ spellInfo->Effect[1] = 0;
+ count++;
+ break;
+ case 70447: // Volatile Ooze Adhesive
+ case 72836: // Volatile Ooze Adhesive
+ case 72837: // Volatile Ooze Adhesive
+ case 72838: // Volatile Ooze Adhesive
+ case 70672: // Gaseous Bloat
+ case 72455: // Gaseous Bloat
+ case 72832: // Gaseous Bloat
+ case 72833: // Gaseous Bloat
+ spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
+ spellInfo->EffectImplicitTargetB[1] = TARGET_UNIT_TARGET_ENEMY;
+ spellInfo->EffectImplicitTargetB[2] = TARGET_UNIT_TARGET_ENEMY;
+ count++;
+ break;
+ case 70911: // Unbound Plague
+ case 72854: // Unbound Plague
+ case 72855: // Unbound Plague
+ case 72856: // Unbound Plague
+ spellInfo->EffectImplicitTargetB[0] = TARGET_UNIT_TARGET_ENEMY;
+ count++;
+ break;
default:
break;
}