mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
fix(Core/Entities): Only add use to spell caster objects if cast succeeds. (#19601)
Init.
This commit is contained in:
@@ -1891,7 +1891,6 @@ void GameObject::Use(Unit* user)
|
||||
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
spellId = info->spellcaster.spellId;
|
||||
|
||||
AddUse();
|
||||
break;
|
||||
}
|
||||
case GAMEOBJECT_TYPE_MEETINGSTONE: //23
|
||||
@@ -2067,7 +2066,10 @@ void GameObject::Use(Unit* user)
|
||||
sOutdoorPvPMgr->HandleCustomSpell(player, spellId, this);
|
||||
|
||||
if (spellCaster)
|
||||
spellCaster->CastSpell(user, spellInfo, triggered);
|
||||
{
|
||||
if ((spellCaster->CastSpell(user, spellInfo, triggered) == SPELL_CAST_OK) && GetGoType() == GAMEOBJECT_TYPE_SPELLCASTER)
|
||||
AddUse();
|
||||
}
|
||||
else
|
||||
CastSpell(user, spellId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user