fix(Core/GameObject): Allow use of Mage portal if caster is offline and still in group (#19797)
search group of user for ownerGUID
This commit is contained in:
@@ -1885,13 +1885,21 @@ void GameObject::Use(Unit* user)
|
|||||||
|
|
||||||
if (info->spellcaster.partyOnly)
|
if (info->spellcaster.partyOnly)
|
||||||
{
|
{
|
||||||
Player const* caster = ObjectAccessor::FindConnectedPlayer(GetOwnerGUID());
|
if (!user->IsPlayer())
|
||||||
if (!caster || user->GetTypeId() != TYPEID_PLAYER || !user->ToPlayer()->IsInSameRaidWith(caster))
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
if (Group* group = user->ToPlayer()->GetGroup())
|
||||||
spellId = info->spellcaster.spellId;
|
{
|
||||||
|
if (ObjectGuid ownerGuid = GetOwnerGUID())
|
||||||
|
{
|
||||||
|
if (group->IsMember(ownerGuid))
|
||||||
|
{
|
||||||
|
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||||
|
spellId = info->spellcaster.spellId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user