diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SharedDefines.h | 2 | ||||
-rw-r--r-- | src/game/Spell.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 52 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 83 | ||||
-rw-r--r-- | src/shared/SystemConfig.h | 2 | ||||
-rw-r--r-- | src/shared/SystemConfig.h.in | 2 |
7 files changed, 101 insertions, 43 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 333697926e1..3d76e2aec79 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -893,7 +893,7 @@ enum Targets TARGET_UNIT_CLASS_TARGET = 61, TARGET_TEST = 62, // for a test spell TARGET_DUELVSPLAYER_COORDINATES = 63, - TARGET_DEST_TARGET_ENEMY_UNKNOWN = 63, + TARGET_DEST_TARGET_FRIEND = 63, TARGET_DEST_TARGET_FRONT = 64, TARGET_DEST_TARGET_BACK = 65, // uses in teleport behind spells TARGET_DEST_TARGET_RIGHT = 66, diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 625019ba70c..54b2e582531 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1897,7 +1897,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) m_targets.setDestination(target, true); 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); break; diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 6889870656b..df6ff87a6a5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3320,24 +3320,14 @@ void Aura::HandleModStealth(bool apply, bool Real) } } - if (Real) + if (Real && !apply) { // Master of Subtlety - Unit::AuraList const& mDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY); - 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); - break; - } - } + if (m_target->HasAura(31665)) + m_target->CastSpell(m_target,31666,true); + // Overkill + if (m_target->HasAura(58427)) + m_target->CastSpell(m_target,58428,true); } } @@ -3942,16 +3932,6 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real) SpellEntry const*spell = GetSpellProto(); switch( spell->SpellFamilyName) { - case SPELLFAMILY_ROGUE: - { - // Master of Subtlety - if (spell->Id==31666 && !apply) - { - m_target->RemoveAurasDueToSpell(31665); - break; - } - break; - } case SPELLFAMILY_HUNTER: { // Explosive Shot @@ -6235,17 +6215,21 @@ void Aura::PeriodicDummyTick() } case SPELLFAMILY_ROGUE: { -// switch (spell->Id) -// { - // Master of Subtlety -// case 31666: break; + switch (spell->Id) + { // Killing Spree // case 51690: break; // Overkill -// case 58428: break; -// default: -// break; -// } + case 58428: + m_target->RemoveAurasDueToSpell(58427); + break; + // Master of Subtlety + case 31666: + m_target->RemoveAurasDueToSpell(31665); + break; + default: + break; + } break; } case SPELLFAMILY_HUNTER: diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index a765415e71c..c6365294c5f 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -129,6 +129,7 @@ SpellMgr::SpellMgr() SpellTargetType[i] = TARGET_TYPE_AREA_DEST; break; case TARGET_DEST_TARGET_ENEMY: + case TARGET_DEST_TARGET_FRIEND: case TARGET_DEST_TARGET_FRONT: case TARGET_DEST_TARGET_BACK: case TARGET_DEST_TARGET_RIGHT: diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2d216b8cfb9..30c611e4ab4 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1893,6 +1893,9 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe // Reflect damage spells (not cast any damage spell in aura lookup) uint32 reflectSpell = 0; int32 reflectDamage = 0; + uint32 healSpell = 0; + int32 healAmount = 0; + Unit * healCaster = NULL; // Need remove expired auras after bool existExpired = false; // absorb without mana cost @@ -2000,7 +2003,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe case SPELLFAMILY_PRIEST: { // Reflective Shield - if (spellProto->SpellFamilyFlags == 0x1) + if (spellProto->SpellFamilyFlags.IsEqual(0x1)) { if (pVictim == this) 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; + 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; } @@ -2100,6 +2132,8 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe if (mod->m_amount<=0) existExpired = true; } + if(healSpell && healCaster) + healCaster->CastCustomSpell(healCaster, healSpell, &healAmount, NULL, NULL, true); // Remove all expired absorb auras if (existExpired) @@ -4959,6 +4993,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu triggered_spell_id = 34650; break; } + // Overkill + case 58426: + { + basepoints0 = 1000; + triggered_spell_id = 31665; + target=this; + break; + } // Mark of Malice case 33493: { @@ -5761,14 +5803,21 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } return false; } + else if( dummySpell->SpellIconID == 2285 ) + { + basepoints0 = 1000; + triggered_spell_id = 58427; + target=this; + break; + } // Deadly Brew - if( dummySpell->SpellIconID == 2963 ) + else if( dummySpell->SpellIconID == 2963 ) { triggered_spell_id = 25809; break; } // Quick Recovery - if( dummySpell->SpellIconID == 2116 ) + else if( dummySpell->SpellIconID == 2116 ) { if(!procSpell) return false; @@ -5786,6 +5835,16 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu } 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 if ( dummySpell->SpellIconID == 2236 ) { @@ -5851,7 +5910,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu target = this; triggered_spell_id = 57669; // replenishment - CastCustomSpell(this,31930,&basepoints0,0,0,true,0,triggeredByAura); + CastSpell(this,31930,true); break; } // Sanctified Wrath @@ -7331,6 +7390,19 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, Aura CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura); 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 @@ -11520,6 +11592,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag break; } case SPELL_AURA_MANA_SHIELD: + case SPELL_AURA_OBS_MOD_ENERGY: 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()); diff --git a/src/shared/SystemConfig.h b/src/shared/SystemConfig.h index 679eee407e6..9d154b863d0 100644 --- a/src/shared/SystemConfig.h +++ b/src/shared/SystemConfig.h @@ -28,7 +28,7 @@ #include "revision.h" -#define _PACKAGENAME "TC&MaNGOS " +#define _PACKAGENAME "TrinityCore2 " #define _CODENAME "YUME" #if TRINITY_ENDIAN == TRINITY_BIGENDIAN diff --git a/src/shared/SystemConfig.h.in b/src/shared/SystemConfig.h.in index 6eff490b144..85bbd8e19f0 100644 --- a/src/shared/SystemConfig.h.in +++ b/src/shared/SystemConfig.h.in @@ -23,7 +23,7 @@ #define TRINITY_SYSTEMCONFIG_H #ifndef _PACKAGENAME -#define _PACKAGENAME "TC&Mangos " +#define _PACKAGENAME "TrinityCore2 " #endif #include "Platform/Define.h" |