Core/Gossip: Integrate banker guid checks into shared gossip interaction data

Port From (https://github.com/TrinityCore/TrinityCore/commit/bde93b25d2b899c4623467a094c71333b2b54e8d)
This commit is contained in:
hondacrx
2023-01-06 15:51:30 -05:00
parent 5ee02ce4be
commit a21ae2b9aa
3 changed files with 12 additions and 13 deletions
+6 -4
View File
@@ -31,7 +31,7 @@ namespace Game
{
if (!CanUseBank())
{
Log.outDebug(LogFilter.Network, "WORLD: HandleAutoBankItemOpcode - {0} not found or you can't interact with him.", m_currentBankerGUID.ToString());
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankItemOpcode - {_player.PlayerTalkClass.GetInteractionData().SourceGuid} not found or you can't interact with him.");
return;
}
@@ -79,7 +79,7 @@ namespace Game
{
if (!CanUseBank())
{
Log.outDebug(LogFilter.Network, "WORLD: HandleAutoBankItemOpcode - {0} not found or you can't interact with him.", m_currentBankerGUID.ToString());
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankItemOpcode - {_player.PlayerTalkClass.GetInteractionData().SourceGuid} not found or you can't interact with him.");
return;
}
@@ -216,7 +216,7 @@ namespace Game
{
if (!CanUseBank())
{
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankReagentOpcode - {m_currentBankerGUID} not found or you can't interact with him.");
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankReagentOpcode - {_player.PlayerTalkClass.GetInteractionData().SourceGuid} not found or you can't interact with him.");
return;
}
@@ -253,7 +253,7 @@ namespace Game
{
if (!CanUseBank())
{
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankReagentOpcode - {m_currentBankerGUID} not found or you can't interact with him.");
Log.outDebug(LogFilter.Network, $"WORLD: HandleAutoBankReagentOpcode - {_player.PlayerTalkClass.GetInteractionData().SourceGuid} not found or you can't interact with him.");
return;
}
@@ -297,6 +297,8 @@ namespace Game
public void SendShowBank(ObjectGuid guid)
{
_player.PlayerTalkClass.GetInteractionData().Reset();
_player.PlayerTalkClass.GetInteractionData().SourceGuid = guid;
NPCInteractionOpenResult npcInteraction = new();
npcInteraction.Npc = guid;
npcInteraction.InteractionType = PlayerInteractionType.Banker;