Add "On" to some gossip methods in AI

Port From (https://github.com/TrinityCore/TrinityCore/commit/bc04acb72652882290cef49b2055d3cf1ab12f36)
This commit is contained in:
hondacrx
2022-05-04 09:26:05 -04:00
parent db947e947c
commit 52ce6b2700
10 changed files with 73 additions and 73 deletions
+5 -5
View File
@@ -160,7 +160,7 @@ namespace Game
}
_player.PlayerTalkClass.ClearMenus();
if (!unit.GetAI().GossipHello(_player))
if (!unit.GetAI().OnGossipHello(_player))
{
GetPlayer().PrepareGossipMenu(unit, unit.GetCreatureTemplate().GossipMenuId, true);
GetPlayer().SendPreparedGossip(unit);
@@ -222,12 +222,12 @@ namespace Game
{
if (unit != null)
{
if (!unit.GetAI().GossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
if (!unit.GetAI().OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
}
else
{
if (!go.GetAI().GossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
if (!go.GetAI().OnGossipSelectCode(_player, packet.GossipID, packet.GossipIndex, packet.PromotionCode))
_player.OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
}
}
@@ -235,12 +235,12 @@ namespace Game
{
if (unit != null)
{
if (!unit.GetAI().GossipSelect(_player, packet.GossipID, packet.GossipIndex))
if (!unit.GetAI().OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
GetPlayer().OnGossipSelect(unit, packet.GossipIndex, packet.GossipID);
}
else
{
if (!go.GetAI().GossipSelect(_player, packet.GossipID, packet.GossipIndex))
if (!go.GetAI().OnGossipSelect(_player, packet.GossipID, packet.GossipIndex))
GetPlayer().OnGossipSelect(go, packet.GossipIndex, packet.GossipID);
}
}
+3 -3
View File
@@ -77,7 +77,7 @@ namespace Game
creature.SetHomePosition(creature.GetPosition());
_player.PlayerTalkClass.ClearMenus();
if (creature.GetAI().GossipHello(_player))
if (creature.GetAI().OnGossipHello(_player))
return;
GetPlayer().PrepareGossipMenu(creature, creature.GetCreatureTemplate().GossipMenuId, true);
@@ -379,7 +379,7 @@ namespace Game
_player.PlayerTalkClass.ClearMenus();
Creature creatureQGiver = obj.ToCreature();
if (creatureQGiver != null)
creatureQGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
creatureQGiver.GetAI().OnQuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
break;
}
case TypeId.GameObject:
@@ -400,7 +400,7 @@ namespace Game
}
_player.PlayerTalkClass.ClearMenus();
questGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
questGiver.GetAI().OnQuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
break;
}
default:
+1 -1
View File
@@ -261,7 +261,7 @@ namespace Game
GameObject go = GetPlayer().GetGameObjectIfCanInteractWith(packet.Guid);
if (go)
{
if (go.GetAI().GossipHello(GetPlayer()))
if (go.GetAI().OnGossipHello(GetPlayer()))
return;
GetPlayer().UpdateCriteria(CriteriaType.UseGameobject, go.GetEntry());