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:
Jelle Meeus 2024-09-02 19:00:15 +02:00 committed by GitHub
parent 2f00db3418
commit 0504c7f9de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1887,20 +1887,21 @@ void GameObject::Use(Unit* user)
{
if (!user->IsPlayer())
return;
if (Group* group = user->ToPlayer()->GetGroup())
if (ObjectGuid ownerGuid = GetOwnerGUID())
{
if (ObjectGuid ownerGuid = GetOwnerGUID())
if (user->GetGUID() != ownerGuid)
{
if (group->IsMember(ownerGuid))
{
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
spellId = info->spellcaster.spellId;
}
Group* group = user->ToPlayer()->GetGroup();
if (!group)
return;
if (!group->IsMember(ownerGuid))
return;
}
}
}
user->RemoveAurasByType(SPELL_AURA_MOUNTED);
spellId = info->spellcaster.spellId;
break;
}
case GAMEOBJECT_TYPE_MEETINGSTONE: //23