Core/Players: Fixed learning talents available for multiple specs but in different row/column
This commit is contained in:
@@ -92,6 +92,7 @@ namespace Framework.Constants
|
|||||||
ForceMove = 0x40,
|
ForceMove = 0x40,
|
||||||
DisarmOffhand = 0x80,
|
DisarmOffhand = 0x80,
|
||||||
DisablePredStats = 0x100,
|
DisablePredStats = 0x100,
|
||||||
|
AllowChangingTalents = 0x200,
|
||||||
DisarmRanged = 0x400,
|
DisarmRanged = 0x400,
|
||||||
RegeneratePower = 0x800,
|
RegeneratePower = 0x800,
|
||||||
RestrictPartyInteraction = 0x1000,
|
RestrictPartyInteraction = 0x1000,
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ namespace Game.Entities
|
|||||||
if (IsInCombat())
|
if (IsInCombat())
|
||||||
return TalentLearnResult.FailedAffectingCombat;
|
return TalentLearnResult.FailedAffectingCombat;
|
||||||
|
|
||||||
if (IsDead() || GetMap().IsBattlegroundOrArena())
|
if (IsDead())
|
||||||
return TalentLearnResult.FailedCantDoThatRightNow;
|
return TalentLearnResult.FailedCantDoThatRightNow;
|
||||||
|
|
||||||
if (GetUInt32Value(PlayerFields.CurrentSpecId) == 0)
|
if (GetUInt32Value(PlayerFields.CurrentSpecId) == 0)
|
||||||
@@ -143,6 +143,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
if (talent.SpecID == 0)
|
if (talent.SpecID == 0)
|
||||||
bestSlotMatch = talent;
|
bestSlotMatch = talent;
|
||||||
|
|
||||||
else if (talent.SpecID == GetUInt32Value(PlayerFields.CurrentSpecId))
|
else if (talent.SpecID == GetUInt32Value(PlayerFields.CurrentSpecId))
|
||||||
{
|
{
|
||||||
bestSlotMatch = talent;
|
bestSlotMatch = talent;
|
||||||
@@ -161,7 +162,10 @@ namespace Game.Entities
|
|||||||
if (talent.SpecID != 0 && talent.SpecID != GetUInt32Value(PlayerFields.CurrentSpecId))
|
if (talent.SpecID != 0 && talent.SpecID != GetUInt32Value(PlayerFields.CurrentSpecId))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (HasTalent(talent.Id, GetActiveTalentGroup()) && !HasFlag(PlayerFields.Flags, PlayerFlags.Resting) && HasFlag(UnitFields.Flags, UnitFlags.ImmuneToNpc))
|
if (!HasTalent(talent.Id, GetActiveTalentGroup()))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (!HasFlag(PlayerFields.Flags, PlayerFlags.Resting) && HasFlag(UnitFields.Flags2, UnitFlags2.AllowChangingTalents))
|
||||||
return TalentLearnResult.FailedRestArea;
|
return TalentLearnResult.FailedRestArea;
|
||||||
|
|
||||||
if (GetSpellHistory().HasCooldown(talent.SpellID))
|
if (GetSpellHistory().HasCooldown(talent.SpellID))
|
||||||
|
|||||||
Reference in New Issue
Block a user