Scripts/Icecrown Citadel: Add script for Deathbringer Saurfang (only missing alliance outro due to need of spawning and moving a transport)
Scripts/Icecrown Citadel: Corrected Lord Marrowgar, should no longer target tanks with Bone Spike Graveyard, his Coldflame should now spread properly Core/Scripts: Moved Lady Deathwhisper Mana Barrier handler to scripts Core/Scripts: Allow AuraScript to prevent default effects by effect index Core/Scripts: Added Is25ManRaid() method to ScriptedAI, obviously used to check if raid is 25man Core/Achievements: Pass m_caster to UpdateAchievementCriteria for ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET --HG-- branch : trunk
This commit is contained in:
@@ -180,6 +180,9 @@ struct ScriptedAI : public CreatureAI
|
||||
// return the dungeon or raid difficulty
|
||||
Difficulty getDifficulty() { return m_difficulty; }
|
||||
|
||||
// return true for 25 man or 25 man heroic mode
|
||||
bool Is25ManRaid() { return m_difficulty & 1; }
|
||||
|
||||
template<class T> inline
|
||||
const T& DUNGEON_MODE(const T& normal5, const T& heroic10)
|
||||
{
|
||||
|
||||
@@ -8681,6 +8681,16 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
if (!pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, procSpell, this))
|
||||
return false;
|
||||
break;
|
||||
// Deathbringer Saurfang - Rune of Blood
|
||||
case 72408:
|
||||
// can proc only if target is marked with rune
|
||||
if (!pVictim->HasAura(72410))
|
||||
return false;
|
||||
break;
|
||||
// Deathbringer Saurfang - Blood Beast's Blood Link
|
||||
case 72176:
|
||||
basepoints0 = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
// Blade Barrier
|
||||
@@ -8868,6 +8878,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
// Deathbringer Saurfang - Blood Link
|
||||
case 72202:
|
||||
target = FindNearestCreature(37813, 75.0f); // NPC_DEATHBRINGER_SAURFANG = 37813
|
||||
break;
|
||||
}
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && ToPlayer()->HasSpellCooldown(trigger_spell_id))
|
||||
|
||||
@@ -76,6 +76,7 @@ void Vehicle::Install()
|
||||
switch (m_vehicleInfo->m_powerType)
|
||||
{
|
||||
case POWER_STEAM:
|
||||
case POWER_BLOOD:
|
||||
me->setPowerType(POWER_ENERGY);
|
||||
me->SetMaxPower(POWER_ENERGY, 100);
|
||||
break;
|
||||
|
||||
@@ -29,6 +29,7 @@ enum PowerType
|
||||
{
|
||||
POWER_STEAM = 61,
|
||||
POWER_PYRITE = 41,
|
||||
POWER_BLOOD = 121,
|
||||
};
|
||||
|
||||
struct VehicleSeat
|
||||
|
||||
@@ -427,6 +427,7 @@ void AddSC_boss_falric();
|
||||
void AddSC_boss_marwyn();
|
||||
void AddSC_boss_lord_marrowgar(); // Icecrown Citadel
|
||||
void AddSC_boss_lady_deathwhisper();
|
||||
void AddSC_boss_deathbringer_saurfang();
|
||||
void AddSC_instance_icecrown_citadel();
|
||||
|
||||
void AddSC_dalaran();
|
||||
@@ -1100,6 +1101,7 @@ void AddNorthrendScripts()
|
||||
AddSC_boss_marwyn();
|
||||
AddSC_boss_lord_marrowgar(); // Icecrown Citadel
|
||||
AddSC_boss_lady_deathwhisper();
|
||||
AddSC_boss_deathbringer_saurfang();
|
||||
AddSC_instance_icecrown_citadel();
|
||||
|
||||
AddSC_dalaran();
|
||||
|
||||
@@ -2268,14 +2268,6 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
case 39857: triggerSpellId = 39856; break;
|
||||
// Personalized Weather
|
||||
case 46736: triggerSpellId = 46737; break;
|
||||
// Mana Barrier - Lady Deathwhisper
|
||||
case 70842:
|
||||
{
|
||||
int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth();
|
||||
caster->ModifyHealth(missingHealth);
|
||||
caster->ModifyPower(POWER_MANA, -missingHealth);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1413,7 +1413,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
|
||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
unit->ToPlayer()->GetAchievementMgr().StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, m_spellInfo->Id);
|
||||
unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, m_spellInfo->Id);
|
||||
unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, m_spellInfo->Id, 0, m_caster);
|
||||
unit->ToPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, m_spellInfo->Id);
|
||||
}
|
||||
|
||||
@@ -2805,6 +2805,18 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
case 59725: // Improved Spell Reflection - aoe aura
|
||||
unitList.remove(m_caster);
|
||||
break;
|
||||
case 72255: // Mark of the Fallen Champion (Deathbringer Saurfang)
|
||||
case 72444:
|
||||
case 72445:
|
||||
case 72446:
|
||||
for (std::list<Unit*>::iterator itr = unitList.begin() ; itr != unitList.end();)
|
||||
{
|
||||
if (!(*itr)->HasAura(72293))
|
||||
itr = unitList.erase(itr);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Death Pact
|
||||
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000)
|
||||
|
||||
@@ -1847,8 +1847,10 @@ void Spell::EffectForceCast(uint32 i)
|
||||
case 52349: // Overtake
|
||||
unitTarget->CastCustomSpell(unitTarget, spellInfo->Id, &damage, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
//case 72378: // Blood Nova
|
||||
//case 73058: // Blood Nova
|
||||
case 72378: // Blood Nova
|
||||
case 73058: // Blood Nova
|
||||
spellInfo = sSpellMgr.GetSpellForDifficultyFromSpell(spellInfo, m_caster);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Unit * caster = GetTriggeredSpellCaster(spellInfo, m_caster, unitTarget);
|
||||
@@ -2629,7 +2631,9 @@ void Spell::EffectHealthLeech(uint32 i)
|
||||
|
||||
// Do not apply multiplier to damage if it's Death Coil
|
||||
int32 new_damage;
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & 0x80000)
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & 0x80000 ||
|
||||
m_spellInfo->Id == 72409 || m_spellInfo->Id == 72447 || // ...or Deathbringer Saurfang's Rune of Blood
|
||||
m_spellInfo->Id == 72448 || m_spellInfo->Id == 72449)
|
||||
new_damage = damage;
|
||||
else
|
||||
new_damage = int32(damage * multiplier);
|
||||
|
||||
@@ -280,12 +280,12 @@ class AuraScript : public _SpellScript
|
||||
public:
|
||||
bool _Validate(SpellEntry const * entry, const char * scriptname);
|
||||
bool _Load(Aura * aura);
|
||||
void _ResetDefault() { m_default = true; }
|
||||
bool _IsDefaultActionPrevented(SpellEffIndex /*effIndex*/) {return !m_default;};
|
||||
void PreventDefaultAction() { m_default = false; };
|
||||
void _ResetDefault() { m_defaultPreventedEffectsMask = 0; }
|
||||
bool _IsDefaultActionPrevented(SpellEffIndex effIndex) { return m_defaultPreventedEffectsMask & (1 << effIndex); }
|
||||
void PreventDefaultAction(SpellEffIndex effIndex) { m_defaultPreventedEffectsMask |= 1 << effIndex; }
|
||||
private:
|
||||
Aura * m_aura;
|
||||
bool m_default;
|
||||
uint8 m_defaultPreventedEffectsMask;
|
||||
public:
|
||||
//
|
||||
// AuraScript interface
|
||||
|
||||
Reference in New Issue
Block a user