Core: Updated to 11.2.5.63704
Port From (https://github.com/TrinityCore/TrinityCore/commit/53068a94e88991ae7196fb247df4b7ca2e47e554)
This commit is contained in:
@@ -262,6 +262,9 @@ namespace Game.Spells
|
||||
else if (!auraData.Flags.HasFlag(AuraFlags.NoCaster))
|
||||
auraData.CastUnit = aura.GetCasterGUID();
|
||||
|
||||
if (!aura.GetCastItemGUID().IsEmpty())
|
||||
auraData.CastItem = aura.GetCastItemGUID();
|
||||
|
||||
if (auraData.Flags.HasFlag(AuraFlags.Duration))
|
||||
{
|
||||
auraData.Duration = aura.GetMaxDuration();
|
||||
|
||||
@@ -5935,13 +5935,29 @@ namespace Game.Spells
|
||||
return;
|
||||
|
||||
newConfig.TraitSystemID = CliDB.TraitTreeStorage.LookupByKey(effectInfo.MiscValue).TraitSystemID;
|
||||
int existingConfigForSystem = target.m_activePlayerData.TraitConfigs.FindIndexIf(config =>
|
||||
TraitSystemRecord traitSystem = CliDB.TraitSystemStorage.LookupByKey(newConfig.TraitSystemID);
|
||||
if (traitSystem == null)
|
||||
return;
|
||||
|
||||
switch (traitSystem.GetVariationType())
|
||||
{
|
||||
case TraitSystemVariationType.None:
|
||||
newConfig.VariationID = 0;
|
||||
break;
|
||||
case TraitSystemVariationType.Spec:
|
||||
newConfig.VariationID = (int)target.GetPrimarySpecialization();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
int existingConfigIdForSystem = target.m_activePlayerData.TraitConfigs.FindIf(config =>
|
||||
{
|
||||
return config.Type == (int)TraitConfigType.Generic
|
||||
&& config.TraitSystemID == newConfig.TraitSystemID;
|
||||
});
|
||||
}).Item1;
|
||||
|
||||
if (existingConfigForSystem < 0)
|
||||
if (existingConfigIdForSystem == 0)
|
||||
target.CreateTraitConfig(newConfig);
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace Game
|
||||
if (tree != null)
|
||||
tree.SubTrees.Add(subTree);
|
||||
|
||||
_traitSubTrees[(int)traitSubTree.ID] = subTree;
|
||||
_traitSubTrees[(int)traitSubTree.Id] = subTree;
|
||||
}
|
||||
|
||||
foreach (var (_, traitNodeGroup) in CliDB.TraitNodeGroupStorage)
|
||||
@@ -470,6 +470,12 @@ namespace Game
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TraitCurrencyType.TraitSourcedPlayerDataElement:
|
||||
if (currency.PlayerDataElementAccountID != 0)
|
||||
currencies[currency.Id] += player.GetDataElementAccount((uint)currency.CurrencyTypesID);
|
||||
else if (currency.PlayerDataElementCharacterID != 0)
|
||||
currencies[currency.Id] += player.GetDataElementCharacter((uint)currency.CurrencyTypesID);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user