[Core/Mechanics] Player, add support to gameobject to cast spell on player in Pv…

…p zone. Also fix quest 9422/9419
This commit is contained in:
lello
2016-07-12 01:40:48 +02:00
parent ad3d901931
commit 3323fc00c6

View File

@@ -1785,6 +1785,9 @@ void GameObject::Use(Unit* user)
;//sLog->outDebug(LOG_FILTER_OUTDOORPVP, "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId);
return;
}
if (Player* player = user->ToPlayer())
sOutdoorPvPMgr->HandleCustomSpell(player, spellId, this);
if (spellCaster)
spellCaster->CastSpell(user, spellInfo, triggered);