mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
Fix Fishing's spell cast interruption.
This commit is contained in:
@@ -1249,6 +1249,7 @@ void GameObject::Use(Unit* user)
|
|||||||
Unit* spellCaster = user;
|
Unit* spellCaster = user;
|
||||||
uint32 spellId = 0;
|
uint32 spellId = 0;
|
||||||
bool triggered = false;
|
bool triggered = false;
|
||||||
|
bool tmpfish = false;
|
||||||
|
|
||||||
if (Player* playerUser = user->ToPlayer())
|
if (Player* playerUser = user->ToPlayer())
|
||||||
{
|
{
|
||||||
@@ -1461,6 +1462,7 @@ void GameObject::Use(Unit* user)
|
|||||||
// cast this spell later if provided
|
// cast this spell later if provided
|
||||||
spellId = info->goober.spellId;
|
spellId = info->goober.spellId;
|
||||||
spellCaster = user;
|
spellCaster = user;
|
||||||
|
tmpfish = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1549,6 +1551,8 @@ void GameObject::Use(Unit* user)
|
|||||||
}
|
}
|
||||||
else // else: junk
|
else // else: junk
|
||||||
player->SendLoot(GetGUID(), LOOT_FISHING_JUNK);
|
player->SendLoot(GetGUID(), LOOT_FISHING_JUNK);
|
||||||
|
|
||||||
|
tmpfish = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GO_JUST_DEACTIVATED: // nothing to do, will be deleted at next update
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user