mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
Fix Midsummer fire quest An Innocent Disguise aswell as fixed indentation.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
INSERT INTO version_db_world (`sql_rev`) VALUES ('1499101625045878500');
|
||||
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (46337, 'spell_gen_crab_disguise');
|
||||
UPDATE `creature_template` SET `unit_class` = 8 WHERE `entry` = 25863;
|
||||
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(25863, 0, 0, 0, 4, 0, 100, 0, 1000, 1000, 1800000, 1800000, 11, 184, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Twilight Firesworn - On Aggro - Cast \'Fire Shield\''),
|
||||
(25863, 0, 1, 0, 0, 0, 100, 0, 0, 0, 3400, 5400, 11, 20793, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Twilight Firesworn - In Combat CMC - Cast \'Fireball\''),
|
||||
(25863, 0, 2, 0, 2, 0, 100, 1, 0, 15, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Twilight Firesworn - Between 0-15% Health - Flee For Assist (No Repeat)');
|
||||
|
||||
@@ -100,8 +100,8 @@ void PetAI::UpdateAI(uint32 diff)
|
||||
Unit* owner = me->GetCharmerOrOwner();
|
||||
|
||||
//if Pet is in combat put player in combat
|
||||
if (me->IsInCombat())
|
||||
owner->IsInCombat();
|
||||
if (me->IsInCombat())
|
||||
owner->IsInCombat();
|
||||
|
||||
if (m_updateAlliesTimer <= diff)
|
||||
// UpdateAllies self set update timer
|
||||
|
||||
@@ -201,6 +201,60 @@ class npc_midsummer_torch_target : public CreatureScript
|
||||
// SPELLS
|
||||
///////////////////////////////
|
||||
|
||||
enum CrabDisguise
|
||||
{
|
||||
SPELL_CRAB_DISGUISE = 46337,
|
||||
SPELL_APPLY_DIGUISE = 34804,
|
||||
SPELL_FADE_DIGUISE = 47693,
|
||||
};
|
||||
|
||||
class spell_gen_crab_disguise : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_crab_disguise() : SpellScriptLoader("spell_gen_crab_disguise") { }
|
||||
|
||||
class spell_gen_crab_disguise_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_crab_disguise_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_CRAB_DISGUISE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
caster->CastSpell(caster, SPELL_APPLY_DIGUISE, true);
|
||||
caster->setFaction(88);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
caster->CastSpell(caster, SPELL_FADE_DIGUISE, true);
|
||||
caster->RestoreFaction();
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterEffectApply += AuraEffectRemoveFn(spell_gen_crab_disguise_AuraScript::OnApply, EFFECT_0, SPELL_AURA_FORCE_REACTION, AURA_EFFECT_HANDLE_REAL);
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_gen_crab_disguise_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_FORCE_REACTION, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_gen_crab_disguise_AuraScript();
|
||||
}
|
||||
|
||||
enum RibbonPole
|
||||
{
|
||||
SPELL_RIBBON_POLE_CHANNEL_VISUAL = 29172,
|
||||
@@ -513,6 +567,7 @@ void AddSC_event_midsummer_scripts()
|
||||
new npc_midsummer_torch_target();
|
||||
|
||||
// Spells
|
||||
new spell_gen_crab_disguise();
|
||||
new spell_midsummer_ribbon_pole();
|
||||
new spell_midsummer_torch_quest();
|
||||
new spell_midsummer_fling_torch();
|
||||
|
||||
Reference in New Issue
Block a user