mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10886] Fixed crash at GO use in case GO owner/first user offline state.
This commit is contained in:
parent
ddd37b719f
commit
38118d17d7
2 changed files with 5 additions and 2 deletions
|
|
@ -1299,7 +1299,10 @@ void GameObject::Use(Unit* user)
|
||||||
if (GetUniqueUseCount() < info->summoningRitual.reqParticipants)
|
if (GetUniqueUseCount() < info->summoningRitual.reqParticipants)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
spellCaster = GetMap()->GetPlayer(m_firstUser);
|
// owner is first user for non-wild GO objects, if it offline value already set to current user
|
||||||
|
if (GetOwnerGuid().IsEmpty())
|
||||||
|
if (Player* firstUser = GetMap()->GetPlayer(m_firstUser))
|
||||||
|
spellCaster = firstUser;
|
||||||
|
|
||||||
spellId = info->summoningRitual.spellId;
|
spellId = info->summoningRitual.spellId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10885"
|
#define REVISION_NR "10886"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue