Core/Gossip: Implemented GossipOptionNpc.AzeriteRespec

Port From (https://github.com/TrinityCore/TrinityCore/commit/9fb4c1ca0228a51da4b69322e8a3db8932781f13)
This commit is contained in:
hondacrx
2022-10-14 17:04:26 -04:00
parent 6e45d82b49
commit 8488616832
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ namespace Framework.Constants
GarrisonTalent = 32, // White chat bubble GarrisonTalent = 32, // White chat bubble
ContributionCollector = 33, /*NYI*/ // White chat bubble ContributionCollector = 33, /*NYI*/ // White chat bubble
Transmogrify = 34, // Purple helm Transmogrify = 34, // Purple helm
AzeriteRespec = 35, /*NYI*/ // White chat bubble AzeriteRespec = 35, // White chat bubble
IslandsMission = 36, /*NYI*/ // White chat bubble IslandsMission = 36, /*NYI*/ // White chat bubble
UIItemInteraction = 37, /*NYI*/ // White chat bubble UIItemInteraction = 37, /*NYI*/ // White chat bubble
WorldMap = 38, /*NYI*/ // White chat bubble WorldMap = 38, /*NYI*/ // White chat bubble
+5 -1
View File
@@ -2370,6 +2370,7 @@ namespace Game.Entities
case GossipOptionNpc.Auctioneer: case GossipOptionNpc.Auctioneer:
case GossipOptionNpc.Mailbox: case GossipOptionNpc.Mailbox:
case GossipOptionNpc.Transmogrify: case GossipOptionNpc.Transmogrify:
case GossipOptionNpc.AzeriteRespec:
break; // No checks break; // No checks
case GossipOptionNpc.CemeterySelect: case GossipOptionNpc.CemeterySelect:
canTalk = false; // Deprecated canTalk = false; // Deprecated
@@ -2388,7 +2389,6 @@ namespace Game.Entities
case GossipOptionNpc.AdventureMap: case GossipOptionNpc.AdventureMap:
case GossipOptionNpc.GarrisonTalent: case GossipOptionNpc.GarrisonTalent:
case GossipOptionNpc.ContributionCollector: case GossipOptionNpc.ContributionCollector:
case GossipOptionNpc.AzeriteRespec:
case GossipOptionNpc.IslandsMission: case GossipOptionNpc.IslandsMission:
case GossipOptionNpc.UIItemInteraction: case GossipOptionNpc.UIItemInteraction:
case GossipOptionNpc.WorldMap: case GossipOptionNpc.WorldMap:
@@ -2622,6 +2622,10 @@ namespace Game.Entities
case GossipOptionNpc.Transmogrify: case GossipOptionNpc.Transmogrify:
GetSession().SendOpenTransmogrifier(guid); GetSession().SendOpenTransmogrifier(guid);
break; break;
case GossipOptionNpc.AzeriteRespec:
PlayerTalkClass.SendCloseGossip();
GetSession().SendAzeriteRespecNPC(guid);
break;
default: default:
break; break;
} }
+5
View File
@@ -243,5 +243,10 @@ namespace Game
azeriteEmpoweredItem.SetState(ItemUpdateState.Changed, _player); azeriteEmpoweredItem.SetState(ItemUpdateState.Changed, _player);
} }
public void SendAzeriteRespecNPC(ObjectGuid npc)
{
SendPacket(new AzeriteRespecNPC(npc));
}
} }
} }
+1 -1
View File
@@ -6764,7 +6764,7 @@ namespace Game.Spells
return SpellCastResult.AzeriteEmpoweredOnly; return SpellCastResult.AzeriteEmpoweredOnly;
bool hasSelections = false; bool hasSelections = false;
for (int tier = 0; tier < azeriteEmpoweredItem.GetMaxAzeritePowerTier(); ++tier) for (int tier = 0; tier < SharedConst.MaxAzeriteEmpoweredTier; ++tier)
{ {
if (azeriteEmpoweredItem.GetSelectedAzeritePower(tier) != 0) if (azeriteEmpoweredItem.GetSelectedAzeritePower(tier) != 0)
{ {