*Update Master of Subtlety code and fix Overkill.

*Fix Aspect of the Viper-by pasdVn
*Fix Circle of Healing.
Fix Rapture-by pasdVn

--HG--
branch : trunk
This commit is contained in:
QAston
2009-03-08 19:18:02 +01:00
parent 2826ebee2f
commit f260c92394
7 changed files with 118 additions and 41 deletions
+18
View File
@@ -0,0 +1,18 @@
DELETE FROM spell_proc_event WHERE entry IN (47535, 47536, 47537, 47538, 47539);
-- Rapture
INSERT INTO `spell_proc_event` VALUES (47535, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (47536, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (47537, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (47538, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (47539, 0x00, 6, 0x1800, 0x10000, 0x00000000, 0x00014010, 0x00000000, 0.000000, 0.000000, 0);
-- Aspect of the viper
INSERT INTO `spell_proc_event` VALUES (34074, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0.000000, 0.000000, 0);
-- Overkill
INSERT INTO `spell_proc_event` VALUES (58426, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
-- Master of subtlety
INSERT INTO `spell_proc_event` VALUES (31221, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (31222, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
INSERT INTO `spell_proc_event` VALUES (31223, 0x00, 8, 0x400000, 0x00000000, 0x00000000, 0x00014000, 0x00000000, 0.000000, 0.000000, 0);
DELETE FROM `spell_bonus_data` WHERE entry=2944;
INSERT INTO `spell_bonus_data` VALUES ('2944', '0', '0.1849', '0', 'Priest - Devouring Plague');
+1
View File
@@ -71,5 +71,6 @@ INSTALL(FILES
1729_world.sql 1729_world.sql
1730_world.sql 1730_world.sql
1732_world.sql 1732_world.sql
1733_world.sql
1164_characters.sql 1164_characters.sql
DESTINATION share/trinity/sql/updates) DESTINATION share/trinity/sql/updates)
+1 -1
View File
@@ -893,7 +893,7 @@ enum Targets
TARGET_UNIT_CLASS_TARGET = 61, TARGET_UNIT_CLASS_TARGET = 61,
TARGET_TEST = 62, // for a test spell TARGET_TEST = 62, // for a test spell
TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_DUELVSPLAYER_COORDINATES = 63,
TARGET_DEST_TARGET_ENEMY_UNKNOWN = 63, TARGET_DEST_TARGET_FRIEND = 63,
TARGET_DEST_TARGET_FRONT = 64, TARGET_DEST_TARGET_FRONT = 64,
TARGET_DEST_TARGET_BACK = 65, // uses in teleport behind spells TARGET_DEST_TARGET_BACK = 65, // uses in teleport behind spells
TARGET_DEST_TARGET_RIGHT = 66, TARGET_DEST_TARGET_RIGHT = 66,
+1 -1
View File
@@ -1898,7 +1898,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
m_targets.setDestination(target, true); m_targets.setDestination(target, true);
break; break;
} }
else if(cur == TARGET_DEST_TARGET_ENEMY_UNKNOWN) // no ground? else if(cur == TARGET_DEST_TARGET_FRIEND) // no ground?
{ {
m_targets.setDestination(target, false); m_targets.setDestination(target, false);
break; break;
+17 -33
View File
@@ -3322,24 +3322,14 @@ void Aura::HandleModStealth(bool apply, bool Real)
} }
} }
if (Real) if (Real && !apply)
{ {
// Master of Subtlety // Master of Subtlety
Unit::AuraList const& mDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY); if (m_target->HasAura(31665))
for(Unit::AuraList::const_iterator i = mDummyAuras.begin();i != mDummyAuras.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellIconID == 2114)
{
if (apply)
{
int32 bp = (*i)->GetModifier()->m_amount;
m_target->CastCustomSpell(m_target,31665,&bp,NULL,NULL,true);
}
else
m_target->CastSpell(m_target,31666,true); m_target->CastSpell(m_target,31666,true);
break; // Overkill
} if (m_target->HasAura(58427))
} m_target->CastSpell(m_target,58428,true);
} }
} }
@@ -3944,16 +3934,6 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
SpellEntry const*spell = GetSpellProto(); SpellEntry const*spell = GetSpellProto();
switch( spell->SpellFamilyName) switch( spell->SpellFamilyName)
{ {
case SPELLFAMILY_ROGUE:
{
// Master of Subtlety
if (spell->Id==31666 && !apply)
{
m_target->RemoveAurasDueToSpell(31665);
break;
}
break;
}
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{ {
// Explosive Shot // Explosive Shot
@@ -6237,17 +6217,21 @@ void Aura::PeriodicDummyTick()
} }
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// switch (spell->Id) switch (spell->Id)
// { {
// Master of Subtlety
// case 31666: break;
// Killing Spree // Killing Spree
// case 51690: break; // case 51690: break;
// Overkill // Overkill
// case 58428: break; case 58428:
// default: m_target->RemoveAurasDueToSpell(58427);
// break; break;
// } // Master of Subtlety
case 31666:
m_target->RemoveAurasDueToSpell(31665);
break;
default:
break;
}
break; break;
} }
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
+1
View File
@@ -129,6 +129,7 @@ SpellMgr::SpellMgr()
SpellTargetType[i] = TARGET_TYPE_AREA_DEST; SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
break; break;
case TARGET_DEST_TARGET_ENEMY: case TARGET_DEST_TARGET_ENEMY:
case TARGET_DEST_TARGET_FRIEND:
case TARGET_DEST_TARGET_FRONT: case TARGET_DEST_TARGET_FRONT:
case TARGET_DEST_TARGET_BACK: case TARGET_DEST_TARGET_BACK:
case TARGET_DEST_TARGET_RIGHT: case TARGET_DEST_TARGET_RIGHT:
+77 -4
View File
@@ -1893,6 +1893,9 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// Reflect damage spells (not cast any damage spell in aura lookup) // Reflect damage spells (not cast any damage spell in aura lookup)
uint32 reflectSpell = 0; uint32 reflectSpell = 0;
int32 reflectDamage = 0; int32 reflectDamage = 0;
uint32 healSpell = 0;
int32 healAmount = 0;
Unit * healCaster = NULL;
// Need remove expired auras after // Need remove expired auras after
bool existExpired = false; bool existExpired = false;
// absorb without mana cost // absorb without mana cost
@@ -2000,7 +2003,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
case SPELLFAMILY_PRIEST: case SPELLFAMILY_PRIEST:
{ {
// Reflective Shield // Reflective Shield
if (spellProto->SpellFamilyFlags == 0x1) if (spellProto->SpellFamilyFlags.IsEqual(0x1))
{ {
if (pVictim == this) if (pVictim == this)
break; break;
@@ -2026,7 +2029,36 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
} break; } break;
} }
} }
}
// no break here, rapture can proc with reflective shield
// Rapture
if (spellProto->SpellFamilyFlags.HasFlag(0x1, 0x1000000))
{
if (pVictim == this)
break; break;
healCaster = (*i)->GetCaster();
if (!healCaster)
break;
AuraList const& lOverRideCS = pVictim->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(AuraList::const_iterator k = lOverRideCS.begin(); k != lOverRideCS.end(); ++k)
{
switch((*k)->GetModifier()->m_miscvalue)
{
case 7556: // Rank 1
case 7555: // Rank 2
case 7554: // Rank 3
case 7553: // Rank 4
case 7552: // Rank 5
{
healSpell = 47755;
healAmount += ((pVictim->getLevel() * (-0.2) + 18) / 1000000) * currentAbsorb * pVictim->GetMaxPower(POWER_MANA);
// limitation based on aura amount
if(healAmount > pVictim->GetMaxPower(POWER_MANA) * (*k)->GetModifier()->m_amount / 1000)
healAmount = pVictim->GetMaxPower(POWER_MANA) * (*k)->GetModifier()->m_amount / 1000;
} break;
}
}
} }
break; break;
} }
@@ -2100,6 +2132,8 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
if (mod->m_amount<=0) if (mod->m_amount<=0)
existExpired = true; existExpired = true;
} }
if(healSpell && healCaster)
healCaster->CastCustomSpell(healCaster, healSpell, &healAmount, NULL, NULL, true);
// Remove all expired absorb auras // Remove all expired absorb auras
if (existExpired) if (existExpired)
@@ -4959,6 +4993,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
triggered_spell_id = 34650; triggered_spell_id = 34650;
break; break;
} }
// Overkill
case 58426:
{
basepoints0 = 1000;
triggered_spell_id = 31665;
target=this;
break;
}
// Mark of Malice // Mark of Malice
case 33493: case 33493:
{ {
@@ -5761,14 +5803,21 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
} }
return false; return false;
} }
else if( dummySpell->SpellIconID == 2285 )
{
basepoints0 = 1000;
triggered_spell_id = 58427;
target=this;
break;
}
// Deadly Brew // Deadly Brew
if( dummySpell->SpellIconID == 2963 ) else if( dummySpell->SpellIconID == 2963 )
{ {
triggered_spell_id = 25809; triggered_spell_id = 25809;
break; break;
} }
// Quick Recovery // Quick Recovery
if( dummySpell->SpellIconID == 2116 ) else if( dummySpell->SpellIconID == 2116 )
{ {
if(!procSpell) if(!procSpell)
return false; return false;
@@ -5786,6 +5835,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
} }
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{ {
// Aspect of the Viper
if ( dummySpell->SpellFamilyFlags[1] & 0x40000 )
{
uint32 maxmana = GetMaxPower(POWER_MANA);
basepoints0 = maxmana* GetAttackTime(RANGED_ATTACK)/1000.0f/100.0f;
target = this;
triggered_spell_id = 34075;
break;
}
// Thrill of the Hunt // Thrill of the Hunt
if ( dummySpell->SpellIconID == 2236 ) if ( dummySpell->SpellIconID == 2236 )
{ {
@@ -5851,7 +5910,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
target = this; target = this;
triggered_spell_id = 57669; triggered_spell_id = 57669;
// replenishment // replenishment
CastCustomSpell(this,31930,&basepoints0,0,0,true,0,triggeredByAura); CastSpell(this,31930,true);
break; break;
} }
// Sanctified Wrath // Sanctified Wrath
@@ -7331,6 +7390,19 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, Aura
CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura); CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura);
return true; return true;
} }
// Rapture
case 7556: // Rank 1
case 7555: // Rank 2
case 7554: // Rank 3
case 7553: // Rank 4
case 7552: // Rank 5
{
int32 basepoints0 = ((getLevel() * (-0.2) + 18) / 1000000) * damage * GetMaxPower(POWER_MANA);
if(basepoints0 > (GetMaxPower(POWER_MANA) / 100) * (triggeredByAura->GetModifier()->m_amount / 10))
basepoints0 = (GetMaxPower(POWER_MANA) / 100) * (triggeredByAura->GetModifier()->m_amount / 10);
CastCustomSpell(this, 47755, &basepoints0, 0, 0, true, 0, triggeredByAura);
return true;
}
} }
// not processed // not processed
@@ -11520,6 +11592,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
break; break;
} }
case SPELL_AURA_MANA_SHIELD: case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_OBS_MOD_ENERGY:
case SPELL_AURA_DUMMY: case SPELL_AURA_DUMMY:
{ {
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());