From 90fdd10c3f9298a8268c5731771a3f0713a698ae Mon Sep 17 00:00:00 2001 From: Kartselyanski Date: Sat, 16 Jun 2018 17:47:52 +0300 Subject: [PATCH] Fix Fishing's spell cast interruption. --- src/server/game/Entities/GameObject/GameObject.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index c1596c945..61e81f0c1 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1249,6 +1249,7 @@ void GameObject::Use(Unit* user) Unit* spellCaster = user; uint32 spellId = 0; bool triggered = false; + bool tmpfish = false; if (Player* playerUser = user->ToPlayer()) { @@ -1461,7 +1462,8 @@ void GameObject::Use(Unit* user) // cast this spell later if provided spellId = info->goober.spellId; spellCaster = user; - + tmpfish = true; + break; } case GAMEOBJECT_TYPE_CAMERA: //13 @@ -1549,6 +1551,8 @@ void GameObject::Use(Unit* user) } else // else: junk player->SendLoot(GetGUID(), LOOT_FISHING_JUNK); + + tmpfish = true; break; } case GO_JUST_DEACTIVATED: // nothing to do, will be deleted at next update @@ -1563,7 +1567,10 @@ void GameObject::Use(Unit* user) } } - player->InterruptSpell(CURRENT_CHANNELED_SPELL, true, true, true); + if(tmpfish) + player->FinishSpell(CURRENT_CHANNELED_SPELL, true); + else + player->InterruptSpell(CURRENT_CHANNELED_SPELL, true, true, true); return; }