Core/Player: Keep shared quests through map changes instead of getting stuck in busy state
Port From (https://github.com/TrinityCore/TrinityCore/commit/c12ee97f122acfd77bd81cf178a77d5054c312b6)
This commit is contained in:
@@ -252,7 +252,8 @@ namespace Game.Entities
|
||||
uint m_PlayedTimeLevel;
|
||||
|
||||
Dictionary<byte, ActionButton> m_actionButtons = new Dictionary<byte, ActionButton>();
|
||||
ObjectGuid m_divider;
|
||||
ObjectGuid m_playerSharingQuest;
|
||||
uint m_sharedQuestId;
|
||||
uint m_ingametime;
|
||||
|
||||
PlayerCommandStates _activeCheats;
|
||||
|
||||
@@ -33,9 +33,11 @@ namespace Game.Entities
|
||||
{
|
||||
public partial class Player
|
||||
{
|
||||
public ObjectGuid GetDivider() { return m_divider; }
|
||||
public void SetDivider(ObjectGuid guid) { m_divider = guid; }
|
||||
|
||||
public uint GetSharedQuestID() { return m_sharedQuestId; }
|
||||
public ObjectGuid GetPlayerSharingQuest() { return m_playerSharingQuest; }
|
||||
public void SetQuestSharingInfo(ObjectGuid guid, uint id) { m_playerSharingQuest = guid; m_sharedQuestId = id; }
|
||||
public void ClearQuestSharingInfo() { m_playerSharingQuest = ObjectGuid.Empty; m_sharedQuestId = 0; }
|
||||
|
||||
uint GetInGameTime() { return m_ingametime; }
|
||||
public void SetInGameTime(uint time) { m_ingametime = time; }
|
||||
|
||||
|
||||
@@ -5806,6 +5806,15 @@ namespace Game.Entities
|
||||
_garrison.SendRemoteInfo();
|
||||
|
||||
UpdateItemLevelAreaBasedScaling();
|
||||
|
||||
if (!GetPlayerSharingQuest().IsEmpty())
|
||||
{
|
||||
Quest quest = Global.ObjectMgr.GetQuestTemplate(GetSharedQuestID());
|
||||
if (quest != null)
|
||||
PlayerTalkClass.SendQuestGiverQuestDetails(quest, GetGUID(), true, false);
|
||||
else
|
||||
ClearQuestSharingInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveSocial()
|
||||
|
||||
Reference in New Issue
Block a user