Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Vehicle/Vehicle.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Spells/SpellMgr.cpp src/server/game/Weather/Weather.h src/server/shared/Database/Implementation/WorldDatabase.cpp src/tools/CMakeLists.txt
This commit is contained in:
commit
71eaceae5d
74 files changed
+1107
-570
No files matched your search
@@ -649,6 +649,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_CHAR, target->GetDBTableGUIDLow(), target->GetGUIDLow(), faction, npcflags, Entry, displayid, nativeid);
|
||||
handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction());
|
||||
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
|
||||
|
||||
@@ -495,10 +495,9 @@ public:
|
||||
cInfo->questItems[5] = fields[78].GetUInt32();
|
||||
cInfo->movementId = fields[79].GetUInt32();
|
||||
cInfo->RegenHealth = fields[80].GetBool();
|
||||
cInfo->equipmentId = fields[81].GetUInt32();
|
||||
cInfo->MechanicImmuneMask = fields[82].GetUInt32();
|
||||
cInfo->flags_extra = fields[83].GetUInt32();
|
||||
cInfo->ScriptID = sObjectMgr->GetScriptId(fields[84].GetCString());
|
||||
cInfo->MechanicImmuneMask = fields[81].GetUInt32();
|
||||
cInfo->flags_extra = fields[82].GetUInt32();
|
||||
cInfo->ScriptID = sObjectMgr->GetScriptId(fields[83].GetCString());
|
||||
|
||||
sObjectMgr->CheckCreatureTemplate(cInfo);
|
||||
}
|
||||
|
||||
@@ -32,12 +32,20 @@ enum Say
|
||||
SAY_LEASH = 1,
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_CLEAVE = 1,
|
||||
EVENT_MORTAL_STRIKE = 2,
|
||||
EVENT_BLAST_WAVE = 3,
|
||||
EVENT_KNOCK_BACK = 4,
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_CLEAVE = 26350,
|
||||
SPELL_BLASTWAVE = 23331,
|
||||
SPELL_MORTALSTRIKE = 24573,
|
||||
SPELL_KNOCKBACK = 25778
|
||||
SPELL_BLAST_WAVE = 23331,
|
||||
SPELL_MORTAL_STRIKE = 24573,
|
||||
SPELL_KNOCK_BACK = 25778
|
||||
};
|
||||
|
||||
class boss_broodlord : public CreatureScript
|
||||
@@ -54,17 +62,13 @@ public:
|
||||
{
|
||||
boss_broodlordAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint32 Cleave_Timer;
|
||||
uint32 BlastWave_Timer;
|
||||
uint32 MortalStrike_Timer;
|
||||
uint32 KnockBack_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Cleave_Timer = 8000; // These times are probably wrong
|
||||
BlastWave_Timer = 12000;
|
||||
MortalStrike_Timer = 20000;
|
||||
KnockBack_Timer = 30000;
|
||||
// These timers are probably wrong
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 8000);
|
||||
events.ScheduleEvent(EVENT_BLAST_WAVE, 12000);
|
||||
events.ScheduleEvent(EVENT_MORTAL_STRIKE, 20000);
|
||||
events.ScheduleEvent(EVENT_KNOCK_BACK, 30000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -78,45 +82,51 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Cleave_Timer
|
||||
if (Cleave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_CLEAVE);
|
||||
Cleave_Timer = 7000;
|
||||
} else Cleave_Timer -= diff;
|
||||
if (EnterEvadeIfOutOfCombatArea(diff))
|
||||
Talk(SAY_LEASH);
|
||||
|
||||
// BlastWave
|
||||
if (BlastWave_Timer <= diff)
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_BLASTWAVE);
|
||||
BlastWave_Timer = urand(8000, 16000);
|
||||
} else BlastWave_Timer -= diff;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
//MortalStrike_Timer
|
||||
if (MortalStrike_Timer <= diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoCast(me->getVictim(), SPELL_MORTALSTRIKE);
|
||||
MortalStrike_Timer = urand(25000, 35000);
|
||||
} else MortalStrike_Timer -= diff;
|
||||
|
||||
if (KnockBack_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = me->getVictim())
|
||||
switch (eventId)
|
||||
{
|
||||
DoCast(target, SPELL_KNOCKBACK);
|
||||
// Drop 50% aggro
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -50);
|
||||
case EVENT_CLEAVE:
|
||||
DoCastVictim(SPELL_CLEAVE);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 8000);
|
||||
break;
|
||||
case EVENT_MORTAL_STRIKE:
|
||||
DoCastVictim(SPELL_MORTAL_STRIKE);
|
||||
events.ScheduleEvent(EVENT_MORTAL_STRIKE, 20000);
|
||||
break;
|
||||
case EVENT_BLAST_WAVE:
|
||||
DoCastVictim(SPELL_BLAST_WAVE);
|
||||
events.ScheduleEvent(EVENT_BLAST_WAVE, 12000);
|
||||
break;
|
||||
case EVENT_KNOCK_BACK:
|
||||
if (Unit* target = me->getVictim())
|
||||
{
|
||||
DoCast(target, SPELL_BLAST_WAVE);
|
||||
// Drop 50% of threat
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -50);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_KNOCK_BACK, 30000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
KnockBack_Timer = urand(15000, 30000);
|
||||
} else KnockBack_Timer -= diff;
|
||||
}
|
||||
|
||||
if (EnterEvadeIfOutOfCombatArea(diff))
|
||||
Talk(SAY_LEASH);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events; /// @todo: change BWL to instance script and bosses to BossAI
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -102,10 +102,8 @@ public:
|
||||
npc_unworthy_initiateAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (!me->GetEquipmentId())
|
||||
if (const CreatureTemplate* info = sObjectMgr->GetCreatureTemplate(28406))
|
||||
if (info->equipmentId)
|
||||
const_cast<CreatureTemplate*>(me->GetCreatureTemplate())->equipmentId = info->equipmentId;
|
||||
if (!me->GetCurrentEquipmentId())
|
||||
me->SetCurrentEquipmentId(me->GetOriginalEquipmentId());
|
||||
}
|
||||
|
||||
uint64 playerGUID;
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
case 2:
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
DoCast(me, SPELL_KOLTIRA_TRANSFORM);
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
me->LoadEquipment();
|
||||
break;
|
||||
case 3:
|
||||
SetEscortPaused(true);
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
++_summonDeaths;
|
||||
if (_summonDeaths == 11) // All summons died
|
||||
{
|
||||
SendWeather(WEATHER_STATE_UNK, 0.0f);
|
||||
SendWeather(WEATHER_STATE_FOG, 0.0f);
|
||||
me->RemoveAurasDueToSpell(SPELL_PTAH_EXPLOSION);
|
||||
events.SetPhase(PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_RAGING_SMASH, urand(7000, 12000), 0, PHASE_NORMAL);
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_aged_dying_ancient_kodoAI(creature);
|
||||
|
||||
@@ -45,11 +45,13 @@ enum Spells
|
||||
SPELL_SHROUD_OF_SORROW = 70986,
|
||||
SPELL_FRENZIED_BLOODTHIRST_VISUAL = 71949,
|
||||
SPELL_VAMPIRIC_BITE = 71726,
|
||||
SPELL_VAMPIRIC_BITE_DUMMY = 71837,
|
||||
SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR = 70879,
|
||||
SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_HEAL = 70872,
|
||||
SPELL_FRENZIED_BLOODTHIRST = 70877,
|
||||
SPELL_UNCONTROLLABLE_FRENZY = 70923,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN = 71952,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN = 70994,
|
||||
SPELL_PRESENCE_OF_THE_DARKFALLEN_2 = 71952,
|
||||
SPELL_BLOOD_MIRROR_DAMAGE = 70821,
|
||||
SPELL_BLOOD_MIRROR_VISUAL = 71510,
|
||||
SPELL_BLOOD_MIRROR_DUMMY = 70838,
|
||||
@@ -88,6 +90,7 @@ uint32 const vampireAuras[3][MAX_DIFFICULTY] =
|
||||
#define ESSENCE_OF_BLOOD_QUEEN_PLR RAID_MODE<uint32>(70879, 71525, 71530, 71531)
|
||||
#define FRENZIED_BLOODTHIRST RAID_MODE<uint32>(70877, 71474, 70877, 71474)
|
||||
#define DELIRIOUS_SLASH RAID_MODE<uint32>(71623, 71624, 71625, 71626)
|
||||
#define PRESENCE_OF_THE_DARKFALLEN RAID_MODE<uint32>(70994, 71962, 71963, 71964)
|
||||
|
||||
enum Events
|
||||
{
|
||||
@@ -220,6 +223,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLOOD_MIRROR_DUMMY);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(DELIRIOUS_SLASH);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PACT_OF_THE_DARKFALLEN);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(PRESENCE_OF_THE_DARKFALLEN);
|
||||
}
|
||||
|
||||
void DoAction(int32 const action)
|
||||
@@ -357,8 +361,11 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
Unit* target = targets.front();
|
||||
DoCast(target, SPELL_VAMPIRIC_BITE);
|
||||
DoCastAOE(SPELL_VAMPIRIC_BITE_DUMMY, true);
|
||||
Talk(SAY_VAMPIRIC_BITE);
|
||||
_vampires.insert(target->GetGUID());
|
||||
target->CastSpell(target, SPELL_PRESENCE_OF_THE_DARKFALLEN, TRIGGERED_FULL_MASK);
|
||||
target->CastSpell(target, SPELL_PRESENCE_OF_THE_DARKFALLEN_2, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -377,9 +384,10 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
_offtank->CastSpell(me->getVictim(), SPELL_BLOOD_MIRROR_DAMAGE, true);
|
||||
me->getVictim()->CastSpell(_offtank, SPELL_BLOOD_MIRROR_DUMMY, true);
|
||||
DoCastVictim(SPELL_BLOOD_MIRROR_VISUAL);
|
||||
if (Item* shadowsEdge = _offtank->GetWeaponForAttack(BASE_ATTACK, true))
|
||||
if (!_offtank->HasAura(SPELL_THIRST_QUENCHED) && shadowsEdge->GetEntry() == ITEM_SHADOW_S_EDGE && !_offtank->HasAura(SPELL_GUSHING_WOUND))
|
||||
_offtank->CastSpell(_offtank, SPELL_GUSHING_WOUND, true);
|
||||
if (Is25ManRaid() && _offtank->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE &&
|
||||
_offtank->HasAura(SPELL_UNSATED_CRAVING) && !_offtank->HasAura(SPELL_THIRST_QUENCHED) &&
|
||||
!_offtank->HasAura(SPELL_GUSHING_WOUND))
|
||||
_offtank->CastSpell(_offtank, SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -396,13 +404,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
{
|
||||
std::list<Player*> targets;
|
||||
SelectRandomTarget(false, &targets);
|
||||
uint32 targetCount = 2;
|
||||
// do not combine these checks! we want it incremented TWICE when both conditions are met
|
||||
if (IsHeroic())
|
||||
++targetCount;
|
||||
if (Is25ManRaid())
|
||||
++targetCount;
|
||||
Trinity::Containers::RandomResizeList<Player*>(targets, targetCount);
|
||||
Trinity::Containers::RandomResizeList(targets, Is25ManRaid() ? 3 : 2);
|
||||
if (targets.size() > 1)
|
||||
{
|
||||
Talk(SAY_PACT_OF_THE_DARKFALLEN);
|
||||
@@ -554,33 +556,36 @@ class spell_blood_queen_vampiric_bite : public SpellScriptLoader
|
||||
|
||||
uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_FRENZIED_BLOODTHIRST, GetCaster());
|
||||
GetCaster()->RemoveAura(spellId, 0, 0, AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, true);
|
||||
// Presence of the Darkfallen buff on Blood-Queen
|
||||
if (GetCaster()->GetMap()->IsHeroic())
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_PRESENCE_OF_THE_DARKFALLEN, true);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, TRIGGERED_FULL_MASK);
|
||||
|
||||
// Shadowmourne questline
|
||||
if (GetCaster()->ToPlayer()->GetQuestStatus(QUEST_BLOOD_INFUSION) == QUEST_STATUS_INCOMPLETE)
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
|
||||
{
|
||||
if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
|
||||
if (aura->GetStackAmount() == 3)
|
||||
{
|
||||
if (aura->GetStackAmount() == 3)
|
||||
{
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_THIRST_QUENCHED, true);
|
||||
GetCaster()->RemoveAura(aura);
|
||||
}
|
||||
else
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_GUSHING_WOUND, true);
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_THIRST_QUENCHED, TRIGGERED_FULL_MASK);
|
||||
GetCaster()->RemoveAura(aura);
|
||||
}
|
||||
else
|
||||
GetCaster()->CastSpell(GetCaster(), SPELL_GUSHING_WOUND, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* bloodQueen = ObjectAccessor::GetCreature(*GetCaster(), instance->GetData64(DATA_BLOOD_QUEEN_LANA_THEL)))
|
||||
bloodQueen->AI()->SetGUID(GetHitUnit()->GetGUID(), GUID_VAMPIRE);
|
||||
}
|
||||
|
||||
void HandlePresence(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PRESENCE_OF_THE_DARKFALLEN, TRIGGERED_FULL_MASK);
|
||||
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_PRESENCE_OF_THE_DARKFALLEN_2, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_blood_queen_vampiric_bite_SpellScript::CheckTarget);
|
||||
BeforeHit += SpellHitFn(spell_blood_queen_vampiric_bite_SpellScript::OnCast);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_vampiric_bite_SpellScript::HandlePresence, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ enum Spells
|
||||
SPELL_CONCUSSIVE_SHOCK = 71337,
|
||||
|
||||
// Frost Infusion
|
||||
SPELL_FROST_INFUSION_CREDIT = 72289
|
||||
SPELL_FROST_INFUSION_CREDIT = 72289,
|
||||
SPELL_FROST_IMBUED_BLADE = 72290,
|
||||
SPELL_FROST_INFUSION = 72292,
|
||||
};
|
||||
|
||||
enum Events
|
||||
@@ -147,11 +149,7 @@ enum MovementPoints
|
||||
|
||||
enum Shadowmourne
|
||||
{
|
||||
QUEST_FROST_INFUSION = 24757,
|
||||
ITEM_SHADOW_S_EDGE = 49888,
|
||||
|
||||
SPELL_FROST_INFUSION = 72292,
|
||||
SPELL_FROST_IMBUED_BLADE = 72290,
|
||||
QUEST_FROST_INFUSION = 24757
|
||||
};
|
||||
|
||||
Position const RimefangFlyPos = {4413.309f, 2456.421f, 233.3795f, 2.890186f};
|
||||
@@ -390,47 +388,10 @@ class boss_sindragosa : public CreatureScript
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell)
|
||||
{
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(70127, me))
|
||||
{
|
||||
if (spellId == spell->Id)
|
||||
{
|
||||
if (Aura const* mysticBuffet = target->GetAura(spell->Id))
|
||||
_mysticBuffetStack = std::max<uint8>(_mysticBuffetStack, mysticBuffet->GetStackAmount());
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Frost Infusion
|
||||
if (Player* player = target->ToPlayer())
|
||||
{
|
||||
if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(_isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1, me))
|
||||
{
|
||||
if (spellId == spell->Id)
|
||||
{
|
||||
Item* shadowsEdge = player->GetWeaponForAttack(BASE_ATTACK, true);
|
||||
if (player->GetQuestStatus(QUEST_FROST_INFUSION) == QUEST_STATUS_INCOMPLETE && shadowsEdge)
|
||||
{
|
||||
if (!player->HasAura(SPELL_FROST_IMBUED_BLADE) && shadowsEdge->GetEntry() == ITEM_SHADOW_S_EDGE)
|
||||
{
|
||||
if (Aura* infusion = player->GetAura(SPELL_FROST_INFUSION))
|
||||
{
|
||||
if (infusion->GetStackAmount() == 3)
|
||||
{
|
||||
player->CastSpell(player, SPELL_FROST_IMBUED_BLADE, true);
|
||||
player->RemoveAura(infusion);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_FROST_INFUSION, true);
|
||||
}
|
||||
else
|
||||
player->CastSpell(player, SPELL_FROST_INFUSION, true);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
@@ -1155,6 +1116,50 @@ class spell_sindragosa_unchained_magic : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_sindragosa_frost_breath : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sindragosa_frost_breath() : SpellScriptLoader("spell_sindragosa_frost_breath") { }
|
||||
|
||||
class spell_sindragosa_frost_breath_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_sindragosa_frost_breath_SpellScript);
|
||||
|
||||
void HandleInfusion()
|
||||
{
|
||||
Player* target = GetHitPlayer();
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (target->GetQuestStatus(QUEST_FROST_INFUSION) != QUEST_STATUS_INCOMPLETE)
|
||||
return;
|
||||
|
||||
// Check if player has Shadow's Edge equipped and not ready for infusion
|
||||
if (!target->HasAura(SPELL_UNSATED_CRAVING) || target->HasAura(SPELL_FROST_IMBUED_BLADE))
|
||||
return;
|
||||
|
||||
Aura* infusion = target->GetAura(SPELL_FROST_INFUSION, target->GetGUID());
|
||||
if (infusion && infusion->GetStackAmount() >= 3)
|
||||
{
|
||||
target->RemoveAura(infusion);
|
||||
target->CastSpell(target, SPELL_FROST_IMBUED_BLADE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
else
|
||||
target->CastSpell(target, SPELL_FROST_INFUSION, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_sindragosa_frost_breath_SpellScript::HandleInfusion);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_sindragosa_frost_breath_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_sindragosa_instability : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1577,6 +1582,7 @@ void AddSC_boss_sindragosa()
|
||||
new npc_sindragosa_trash();
|
||||
new spell_sindragosa_s_fury();
|
||||
new spell_sindragosa_unchained_magic();
|
||||
new spell_sindragosa_frost_breath();
|
||||
new spell_sindragosa_instability();
|
||||
new spell_sindragosa_frost_beacon();
|
||||
new spell_sindragosa_ice_tomb();
|
||||
|
||||
@@ -56,6 +56,7 @@ enum SharedSpells
|
||||
SPELL_FROSTMOURNE_TELEPORT_VISUAL = 73078,
|
||||
|
||||
// Shadowmourne questline
|
||||
SPELL_UNSATED_CRAVING = 71168,
|
||||
SPELL_SHADOWS_FATE = 71169
|
||||
};
|
||||
|
||||
|
||||
@@ -435,7 +435,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
// these 2 gates are functional only on 25man modes
|
||||
case GO_DOODAD_ICECROWN_ROOSTPORTCULLIS_01:
|
||||
case GO_DOODAD_ICECROWN_ROOSTPORTCULLIS_04:
|
||||
if (instance->GetSpawnMode() & 1)
|
||||
if (instance->Is25ManRaid())
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
case GO_LADY_DEATHWHISPER_ELEVATOR:
|
||||
|
||||
@@ -565,10 +565,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
}
|
||||
HandleGameObject(KologarnBridgeGUID, false);
|
||||
}
|
||||
if (state == IN_PROGRESS)
|
||||
HandleGameObject(KologarnDoorGUID, false);
|
||||
else
|
||||
HandleGameObject(KologarnDoorGUID, true);
|
||||
break;
|
||||
case BOSS_HODIR:
|
||||
if (state == DONE)
|
||||
|
||||
+4
-4
@@ -316,7 +316,7 @@ public:
|
||||
me->SetDisplayId(MODEL_NIGHTELF);
|
||||
|
||||
// and reseting equipment
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
me->LoadEquipment();
|
||||
|
||||
if (instance && instance->GetData64(DATA_LEOTHERAS_EVENT_STARTER))
|
||||
{
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
if (me->HasAura(AURA_BANISH))
|
||||
return;
|
||||
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
me->LoadEquipment();
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -558,7 +558,7 @@ public:
|
||||
{
|
||||
//switch to nightelf form
|
||||
me->SetDisplayId(MODEL_NIGHTELF);
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
me->LoadEquipment();
|
||||
|
||||
CastConsumingMadness();
|
||||
DespawnDemon();
|
||||
@@ -589,7 +589,7 @@ public:
|
||||
|
||||
Talk(SAY_FINAL_FORM);
|
||||
me->SetDisplayId(MODEL_NIGHTELF);
|
||||
me->LoadEquipment(me->GetEquipmentId());
|
||||
me->LoadEquipment();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -813,7 +813,40 @@ class spell_item_scroll_of_recall : public SpellScriptLoader
|
||||
enum ShadowsFate
|
||||
{
|
||||
SPELL_SOUL_FEAST = 71203,
|
||||
QUEST_A_FEAST_OF_SOULS = 24547
|
||||
};
|
||||
|
||||
class spell_item_unsated_craving : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_item_unsated_craving() : SpellScriptLoader("spell_item_unsated_craving") { }
|
||||
|
||||
class spell_item_unsated_craving_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_unsated_craving_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& procInfo)
|
||||
{
|
||||
Unit* caster = procInfo.GetActor();
|
||||
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
Unit* target = procInfo.GetActionTarget();
|
||||
if (!target || target->GetTypeId() != TYPEID_UNIT || target->GetCreatureType() == CREATURE_TYPE_CRITTER || target->isSummon())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_item_unsated_craving_AuraScript::CheckProc);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_item_unsated_craving_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_item_shadows_fate : public SpellScriptLoader
|
||||
@@ -825,41 +858,20 @@ class spell_item_shadows_fate : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_item_shadows_fate_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
void HandleProc(ProcEventInfo& procInfo)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SOUL_FEAST))
|
||||
return false;
|
||||
if (!sObjectMgr->GetQuestTemplate(QUEST_A_FEAST_OF_SOULS))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
Unit* caster = procInfo.GetActor();
|
||||
Unit* target = GetCaster();
|
||||
if (!caster || !target)
|
||||
return;
|
||||
|
||||
bool Load()
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetCaster();
|
||||
return _procTarget && _procTarget->GetTypeId() == TYPEID_PLAYER && _procTarget->ToPlayer()->GetQuestStatus(QUEST_A_FEAST_OF_SOULS) == QUEST_STATUS_INCOMPLETE;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(_procTarget, SPELL_SOUL_FEAST, true);
|
||||
caster->CastSpell(target, SPELL_SOUL_FEAST, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_item_shadows_fate_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_item_shadows_fate_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
OnProc += AuraProcFn(spell_item_shadows_fate_AuraScript::HandleProc);
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* _procTarget;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
@@ -2481,6 +2493,7 @@ void AddSC_item_spell_scripts()
|
||||
new spell_item_piccolo_of_the_flaming_fire();
|
||||
new spell_item_savory_deviate_delight();
|
||||
new spell_item_scroll_of_recall();
|
||||
new spell_item_unsated_craving();
|
||||
new spell_item_shadows_fate();
|
||||
new spell_item_shadowmourne();
|
||||
new spell_item_shadowmourne_soul_fragment();
|
||||
|
||||
Reference in new issue
Block a user