aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/1912_world.sql5
-rw-r--r--sql/updates/1939_word.sql5
-rw-r--r--sql/updates/CMakeLists.txt1
-rw-r--r--src/game/Spell.cpp6
-rw-r--r--src/game/Spell.h16
-rw-r--r--src/game/SpellAuras.cpp5
-rw-r--r--src/game/SpellMgr.cpp1
7 files changed, 25 insertions, 14 deletions
diff --git a/sql/updates/1912_world.sql b/sql/updates/1912_world.sql
index 267dcf548e9..39b405c32c3 100644
--- a/sql/updates/1912_world.sql
+++ b/sql/updates/1912_world.sql
@@ -1,11 +1,8 @@
-- Shattered Barrier
--- Psychic Horror
-- Improved Fear
-DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 47571, 47572, 53754, 53759);
+DELETE FROM `spell_proc_event` WHERE `entry` IN (44745, 54787, 53754, 53759);
INSERT INTO `spell_proc_event` VALUES
(44745, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0),
(54787, 0x00, 3, 0x00000000, 0x00000001, 0x00000000, 0x00008000, 0x0006000, 0.000000, 0.000000, 0),
-(47571, 0x00, 6, 65536, 0x00000000, 0x00000000, 65536, 0x0006000, 0.000000, 0.000000, 0),
-(47572, 0x00, 6, 59981, 0x00000000, 0x00000000, 65536, 0x0006000, 0.000000, 0.000000, 0),
(53754, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0),
(53759, 0x00, 5, 0x00000000, 1024, 0x00000000, 0x00000000, 0x0006000, 0.000000, 0.000000, 0);
diff --git a/sql/updates/1939_word.sql b/sql/updates/1939_word.sql
new file mode 100644
index 00000000000..dec33f94d59
--- /dev/null
+++ b/sql/updates/1939_word.sql
@@ -0,0 +1,5 @@
+-- Psychic Horror
+DELETE FROM `spell_proc_event` WHERE `entry` IN (47571, 47572);
+INSERT INTO `spell_proc_event` VALUES
+(47571, 0x00, 6, 65536, 0x00000000, 0x00000000, 0x00010000, 0x0006000, 0.000000, 50.000000, 0),
+(47572, 0x00, 6, 65536, 0x00000000, 0x00000000, 0x00010000, 0x0006000, 0.000000, 100.000000, 0);
diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt
index 0dff617efb2..10df6b2b148 100644
--- a/sql/updates/CMakeLists.txt
+++ b/sql/updates/CMakeLists.txt
@@ -84,4 +84,5 @@ INSTALL(FILES
1911_world.sql
1912_world.sql
1927_world.sql
+1939_word.sql
DESTINATION share/trinity/sql/updates) \ No newline at end of file
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index bfc58631079..91c4a536d56 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1380,6 +1380,9 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const uint32 &type, SpellTargets TargetType, uint32 entry)
{
float x, y, z;
+
+ Unit *target = m_targets.getUnitTarget();
+
if(type == PUSH_DEST_CENTER)
{
if(!m_targets.HasDest())
@@ -1393,7 +1396,6 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
}
else if(type == PUSH_TARGET_CENTER)
{
- Unit *target = m_targets.getUnitTarget();
if(!target)
{
sLog.outError( "SPELL: cannot find unit target for spell ID %u\n", m_spellInfo->Id );
@@ -1410,7 +1412,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, const u
z = m_caster->GetPositionZ();
}
- Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry, x, y, z);
+ Trinity::SpellNotifierCreatureAndPlayer notifier(*this, TagUnitMap, radius, type, TargetType, entry, x, y, z, target);
if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY)
|| TargetType == SPELL_TARGETS_ENTRY && !entry)
m_caster->GetMap()->VisitWorld(x, y, radius, notifier);
diff --git a/src/game/Spell.h b/src/game/Spell.h
index 1fb074a396c..fee6f120835 100644
--- a/src/game/Spell.h
+++ b/src/game/Spell.h
@@ -634,20 +634,23 @@ namespace Trinity
Unit* i_caster;
uint32 i_entry;
float i_x, i_y, i_z;
+ Unit* i_unitTarget;
+ Unit* i_origCaster;
SpellNotifierCreatureAndPlayer(Spell &spell, std::list<Unit*> &data, float radius, const uint32 &type,
- SpellTargets TargetType = SPELL_TARGETS_ENEMY, uint32 entry = 0, float x = 0, float y = 0, float z = 0)
+ SpellTargets TargetType = SPELL_TARGETS_ENEMY, uint32 entry = 0, float x = 0, float y = 0, float z = 0, Unit * unitTarget=NULL)
: i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius), i_radiusSq(radius*radius)
- , i_TargetType(TargetType), i_entry(entry), i_x(x), i_y(y), i_z(z)
+ , i_TargetType(TargetType), i_entry(entry), i_x(x), i_y(y), i_z(z), i_unitTarget(unitTarget)
{
i_caster = spell.GetCaster();
+ i_origCaster = spell.GetOriginalCaster();
}
template<class T> inline void Visit(GridRefManager<T> &m)
{
assert(i_data);
- if(!i_caster)
+ if(!i_origCaster)
return;
for(typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
@@ -658,17 +661,20 @@ namespace Trinity
switch (i_TargetType)
{
case SPELL_TARGETS_ALLY:
- if (!itr->getSource()->isAttackableByAOE() || !i_caster->IsFriendlyTo( itr->getSource() ))
+ if (!itr->getSource()->isAttackableByAOE() || !i_origCaster->IsFriendlyTo( itr->getSource() ))
continue;
break;
case SPELL_TARGETS_ENEMY:
{
+ if (itr->getSource() == i_unitTarget)
+ break;
+
if(itr->getSource()->GetTypeId()==TYPEID_UNIT && ((Creature*)itr->getSource())->isTotem())
continue;
if(!itr->getSource()->isAttackableByAOE())
continue;
- Unit* check = i_caster->GetCharmerOrOwnerOrSelf();
+ Unit* check = i_origCaster->GetCharmerOrOwnerOrSelf();
if( check->GetTypeId()==TYPEID_PLAYER )
{
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 8d8fbedf141..e925c0ebd59 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2066,7 +2066,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
if(!m_target || !(m_removeMode == AURA_REMOVE_BY_DISPEL || m_removeMode == AURA_REMOVE_BY_DEFAULT))
return;
Unit* target=NULL;
- m_target->CastSpell(m_target, GetModifier()->m_amount, true, NULL, NULL, GetCasterGUID());
+ m_target->CastSpell(target, GetModifier()->m_amount, true, NULL, NULL, GetCasterGUID());
return;
}
break;
@@ -5682,7 +5682,8 @@ void Aura::PeriodicTick()
if(Player *modOwner = pCaster->GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_MULTIPLE_VALUE, multiplier);
- uint32 heal = pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, stackAmount);
+ // Don't apply heal mods for this aura
+ uint32 heal = uint32(new_damage * multiplier);//pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, stackAmount);
int32 gain = pCaster->ModifyHealth(heal);
pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index c84c53ac2dc..109c846710a 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1160,7 +1160,6 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
// Always trigger for this
if (EventProcFlag & (PROC_FLAG_KILLED | PROC_FLAG_KILL | PROC_FLAG_ON_TRAP_ACTIVATION))
return true;
-
if (spellProcEvent) // Exist event data
{
// Store extra req