[10886] Fixed crash at GO use in case GO owner/first user offline state.

This commit is contained in:
VladimirMangos 2010-12-18 11:08:10 +03:00
parent ddd37b719f
commit 38118d17d7
2 changed files with 5 additions and 2 deletions

View file

@ -1299,7 +1299,10 @@ void GameObject::Use(Unit* user)
if (GetUniqueUseCount() < info->summoningRitual.reqParticipants)
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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10885"
#define REVISION_NR "10886"
#endif // __REVISION_NR_H__