Core/Auras: Renamed a bunch of unknown or changed spell aura types and implemented some of them
Port From (https://github.com/TrinityCore/TrinityCore/commit/d697882dfbb16242b7aa0b915fb116a14039ac5e)
This commit is contained in:
@@ -3939,6 +3939,10 @@ namespace Game.Entities
|
||||
|
||||
public bool HasItemTotemCategory(uint TotemCategory)
|
||||
{
|
||||
foreach (AuraEffect providedTotemCategory in GetAuraEffectsByType(AuraType.ProvideTotemCategory))
|
||||
if (Global.DB2Mgr.IsTotemCategoryCompatibleWith((uint)providedTotemCategory.GetMiscValueB(), TotemCategory))
|
||||
return true;
|
||||
|
||||
int inventoryEnd = InventorySlots.ItemStart + GetInventorySlotCount();
|
||||
for (byte i = EquipmentSlot.Start; i < inventoryEnd; ++i)
|
||||
{
|
||||
|
||||
@@ -781,10 +781,7 @@ namespace Game.Entities
|
||||
|
||||
chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
||||
{
|
||||
if (aurEff.GetCasterGUID() == GetGUID())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return aurEff.GetCasterGUID() == GetGUID();
|
||||
});
|
||||
|
||||
chance += victim.GetTotalAuraModifier(AuraType.ModAttackerSpellAndWeaponCritChance);
|
||||
|
||||
@@ -527,6 +527,12 @@ namespace Game.Entities
|
||||
|
||||
float DoneTotalMod = 1.0f;
|
||||
|
||||
// bonus against aurastate
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModDamageDoneVersusAurastate, aurEff =>
|
||||
{
|
||||
return victim.HasAuraState((AuraStateType)aurEff.GetMiscValue());
|
||||
});
|
||||
|
||||
// Healing done percent
|
||||
DoneTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingDonePercent);
|
||||
|
||||
@@ -742,11 +748,13 @@ namespace Game.Entities
|
||||
// for this types the bonus was already added in GetUnitCriticalChance, do not add twice
|
||||
if (spellProto.DmgClass != SpellDmgClass.Melee && spellProto.DmgClass != SpellDmgClass.Ranged)
|
||||
{
|
||||
crit_chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCasterWithAbilities, aurEff =>
|
||||
{
|
||||
return aurEff.GetCasterGUID() == GetGUID() && aurEff.IsAffectingSpell(spellProto);
|
||||
});
|
||||
crit_chance += victim.GetTotalAuraModifier(AuraType.ModCritChanceForCaster, aurEff =>
|
||||
{
|
||||
if (aurEff.GetCasterGUID() == GetGUID() && aurEff.IsAffectingSpell(spellProto))
|
||||
return true;
|
||||
return false;
|
||||
return aurEff.GetCasterGUID() != GetGUID();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user