*Fix Living Bomb target selection.

*Fix healing mod apply for devouring plague.
*Fix psychic horror.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-15 23:59:06 +01:00
parent 61f519ca26
commit 5bc3df176a
7 changed files with 25 additions and 14 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -84,4 +84,5 @@ INSTALL(FILES
1911_world.sql
1912_world.sql
1927_world.sql
1939_word.sql
DESTINATION share/trinity/sql/updates)

View File

@@ -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);

View File

@@ -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 )
{

View File

@@ -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);

View File

@@ -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