Fixed appearance validation

Implemented proper facial hair validation
Implemented transmog Set
fix interaction of spells like Shadowmeld with Threat reducing effects
This commit is contained in:
hondacrx
2017-08-24 18:01:44 -04:00
parent 7934d51702
commit 0707f9b377
71 changed files with 2968 additions and 632 deletions
+7 -11
View File
@@ -688,19 +688,18 @@ namespace Game.Entities
}
public Unit GetMeleeHitRedirectTarget(Unit victim, SpellInfo spellInfo = null)
{
var hitTriggerAuras = victim.GetAuraEffectsByType(AuraType.AddCasterHitTrigger);
foreach (var i in hitTriggerAuras)
var interceptAuras = victim.GetAuraEffectsByType(AuraType.InterceptMeleeRangedAttacks);
foreach (var i in interceptAuras)
{
Unit magnet = i.GetCaster();
if (magnet != null)
if (_IsValidAttackTarget(magnet, spellInfo) && magnet.IsWithinLOSInMap(this)
&& (spellInfo == null || (spellInfo.CheckExplicitTarget(this, magnet) == SpellCastResult.SpellCastOk
&& spellInfo.CheckTarget(this, magnet, false) == SpellCastResult.SpellCastOk)))
if (RandomHelper.randChance(i.GetAmount()))
{
i.GetBase().DropCharge(AuraRemoveMode.Expire);
return magnet;
}
{
i.GetBase().DropCharge(AuraRemoveMode.Expire);
return magnet;
}
}
return victim;
}
@@ -2053,10 +2052,7 @@ namespace Game.Entities
// 6.CRIT
tmp = crit_chance;
if (tmp > 0 && roll < (sum += tmp))
{
if (GetTypeId() != TypeId.Unit || !(ToCreature().GetCreatureTemplate().FlagsExtra.HasAnyFlag(CreatureFlagsExtra.NoCrit)))
return MeleeHitOutcome.Crit;
}
return MeleeHitOutcome.Crit;
// 7. CRUSHING
// mobs can score crushing blows if they're 4 or more levels above victim