fix(Core/GameObject): fixup allow use of Mage portal if caster is offline and still in group (#19853)
* fix portals * fixup! fix portals * fixup! fixup! fix portals
This commit is contained in:
@@ -1887,20 +1887,21 @@ void GameObject::Use(Unit* user)
|
|||||||
{
|
{
|
||||||
if (!user->IsPlayer())
|
if (!user->IsPlayer())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Group* group = user->ToPlayer()->GetGroup())
|
|
||||||
{
|
|
||||||
if (ObjectGuid ownerGuid = GetOwnerGUID())
|
if (ObjectGuid ownerGuid = GetOwnerGUID())
|
||||||
{
|
{
|
||||||
if (group->IsMember(ownerGuid))
|
if (user->GetGUID() != ownerGuid)
|
||||||
{
|
{
|
||||||
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
Group* group = user->ToPlayer()->GetGroup();
|
||||||
spellId = info->spellcaster.spellId;
|
if (!group)
|
||||||
}
|
return;
|
||||||
|
if (!group->IsMember(ownerGuid))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||||
|
spellId = info->spellcaster.spellId;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GAMEOBJECT_TYPE_MEETINGSTONE: //23
|
case GAMEOBJECT_TYPE_MEETINGSTONE: //23
|
||||||
|
|||||||
Reference in New Issue
Block a user