Core/Garrisons: Implement SMSG_GARRISON_OPEN_TALENT_NPC opcode
Port From (https://github.com/TrinityCore/TrinityCore/commit/4772c4817f1b34553f1c697e2aedc0372af9aea2)
This commit is contained in:
@@ -746,6 +746,11 @@ namespace Game.Misc
|
||||
public int FriendshipFactionID;
|
||||
}
|
||||
|
||||
public class GossipMenuItemAddon
|
||||
{
|
||||
public int? GarrTalentTreeID;
|
||||
}
|
||||
|
||||
public class PointOfInterest
|
||||
{
|
||||
public uint Id;
|
||||
|
||||
@@ -3111,5 +3111,14 @@ namespace Game.Entities
|
||||
|
||||
SendPacket(displayToast);
|
||||
}
|
||||
|
||||
void SendGarrisonOpenTalentNpc(ObjectGuid guid, int garrTalentTreeId, int friendshipFactionId)
|
||||
{
|
||||
GarrisonOpenTalentNpc openTalentNpc = new();
|
||||
openTalentNpc.NpcGUID = guid;
|
||||
openTalentNpc.GarrTalentTreeID = garrTalentTreeId;
|
||||
openTalentNpc.FriendshipFactionID = friendshipFactionId;
|
||||
SendPacket(openTalentNpc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2612,6 +2612,13 @@ namespace Game.Entities
|
||||
PlayerTalkClass.SendCloseGossip();
|
||||
SendRespecWipeConfirm(guid, 0, SpecResetType.Glyphs);
|
||||
break;
|
||||
case GossipOptionNpc.GarrisonTalent:
|
||||
{
|
||||
GossipMenuAddon addon = Global.ObjectMgr.GetGossipMenuAddon(menuId);
|
||||
GossipMenuItemAddon itemAddon = Global.ObjectMgr.GetGossipMenuItemAddon(menuId, gossipListId);
|
||||
SendGarrisonOpenTalentNpc(guid, itemAddon != null ? itemAddon.GarrTalentTreeID.GetValueOrDefault(0) : 0, addon != null ? addon.FriendshipFactionID : 0);
|
||||
break;
|
||||
}
|
||||
case GossipOptionNpc.Transmogrify:
|
||||
GetSession().SendOpenTransmogrifier(guid);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user