mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
[Core/Script] As the crow flies - delete horrible hack and properly fix
This commit is contained in:
5
data/sql/updates/world/2016_07_14_00.sql
Normal file
5
data/sql/updates/world/2016_07_14_00.sql
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE world_db_version CHANGE COLUMN 2016_07_10_02 2016_07_14_00 bit;
|
||||||
|
|
||||||
|
/* add spellscript for crow spell */
|
||||||
|
DELETE FROM spell_script_names WHERE spell_id = 38776;
|
||||||
|
INSERT INTO spell_script_names VALUES (38776,'spell_q9718_crow_transform');
|
||||||
@@ -213,13 +213,6 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
|
|||||||
movementInfo.guid = guid;
|
movementInfo.guid = guid;
|
||||||
ReadMovementInfo(recvData, &movementInfo);
|
ReadMovementInfo(recvData, &movementInfo);
|
||||||
|
|
||||||
// Fix quest "As the crow flies" - Remove morph and complete quest
|
|
||||||
if(GetPlayer()->GetQuestStatus(9718) == QUEST_STATUS_INCOMPLETE)
|
|
||||||
{
|
|
||||||
GetPlayer()->CompleteQuest(9718);
|
|
||||||
GetPlayer()->RemoveAurasDueToSpell(38776);
|
|
||||||
}
|
|
||||||
|
|
||||||
recvData.read_skip<uint32>(); // spline id
|
recvData.read_skip<uint32>(); // spline id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3238,6 +3238,9 @@ void SpellMgr::LoadDbcDataCorrections()
|
|||||||
|
|
||||||
switch (spellInfo->Id)
|
switch (spellInfo->Id)
|
||||||
{
|
{
|
||||||
|
case 38776: // Evergrove Druid Transform Crow
|
||||||
|
spellInfo->DurationIndex = 4; // 120 seconds
|
||||||
|
break;
|
||||||
case 63026: // Force Cast (HACK: Target shouldn't be changed)
|
case 63026: // Force Cast (HACK: Target shouldn't be changed)
|
||||||
case 63137: // Force Cast (HACK: Target shouldn't be changed; summon position should be untied from spell destination)
|
case 63137: // Force Cast (HACK: Target shouldn't be changed; summon position should be untied from spell destination)
|
||||||
spellInfo->EffectImplicitTargetA[EFFECT_0] = TARGET_DEST_DB;
|
spellInfo->EffectImplicitTargetA[EFFECT_0] = TARGET_DEST_DB;
|
||||||
|
|||||||
@@ -3025,6 +3025,37 @@ class spell_q12919_gymers_throw : public SpellScriptLoader
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define QUEST_CROW_TRANSFORM 9718
|
||||||
|
|
||||||
|
// spell 38776
|
||||||
|
class spell_q9718_crow_transform : public SpellScriptLoader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
spell_q9718_crow_transform() : SpellScriptLoader("spell_q9718_crow_transform") { }
|
||||||
|
|
||||||
|
class spell_q9718_crow_transform_AuraScript : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_q9718_crow_transform_AuraScript)
|
||||||
|
|
||||||
|
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
|
{
|
||||||
|
if(GetOwner())
|
||||||
|
if(Player* player = GetOwner()->ToPlayer())
|
||||||
|
player->CompleteQuest(QUEST_CROW_TRANSFORM);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
OnEffectRemove += AuraEffectRemoveFn(spell_q9718_crow_transform_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_TRANSFORM, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const
|
||||||
|
{
|
||||||
|
return new spell_q9718_crow_transform_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void AddSC_quest_spell_scripts()
|
void AddSC_quest_spell_scripts()
|
||||||
{
|
{
|
||||||
@@ -3049,6 +3080,7 @@ void AddSC_quest_spell_scripts()
|
|||||||
new spell_q11198_take_down_tethyr();
|
new spell_q11198_take_down_tethyr();
|
||||||
new spell_q11653_youre_not_so_big_now();
|
new spell_q11653_youre_not_so_big_now();
|
||||||
new spell_q10985_light_of_the_naaru();
|
new spell_q10985_light_of_the_naaru();
|
||||||
|
new spell_q9718_crow_transform();
|
||||||
|
|
||||||
// Theirs
|
// Theirs
|
||||||
new spell_q55_sacred_cleansing();
|
new spell_q55_sacred_cleansing();
|
||||||
|
|||||||
Reference in New Issue
Block a user