Core/AI: Kick Gossip functions upstairs, from UnitAI to CreatureAI - they only make sense for Creatures anyway.

Port From (https://github.com/TrinityCore/TrinityCore/commit/0aed5a35efd0305c1c3046430a1b348f2049a1c5)
This commit is contained in:
hondacrx
2021-04-28 10:53:26 -04:00
parent 4f650d6e90
commit cb471274e8
6 changed files with 48 additions and 51 deletions
+3 -4
View File
@@ -360,7 +360,6 @@ namespace Game
case TypeId.Player:
{
//For AutoSubmition was added plr case there as it almost same exclute AI script cases.
Unit unitQGiver = obj.ToUnit();
// Send next quest
Quest nextQuest = _player.GetNextQuest(packet.QuestGiverGUID, quest);
if (nextQuest != null)
@@ -376,9 +375,9 @@ namespace Game
}
_player.PlayerTalkClass.ClearMenus();
var qGiverAI = unitQGiver.GetAI();
if (qGiverAI != null)
qGiverAI.QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
Creature creatureQGiver = obj.ToCreature();
if (creatureQGiver != null)
creatureQGiver.GetAI().QuestReward(_player, quest, packet.Choice.LootItemType, packet.Choice.Item.ItemID);
break;
}
case TypeId.GameObject: