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
+1 -3
View File
@@ -5575,9 +5575,7 @@ namespace Game.Spells
if (!strict && m_casttime == 0)
return SpellCastResult.SpellCastOk;
var pair = GetMinMaxRange(strict);
float minRange = pair.Item1;
float maxRange = pair.Item2;
(float minRange, float maxRange) = GetMinMaxRange(strict);
// get square values for sqr distance checks
minRange *= minRange;
+12
View File
@@ -5846,6 +5846,18 @@ namespace Game.Spells
playerTarget.AddHonorXP((uint)damage);
playerTarget.SendPacket(packet);
}
[SpellEffectHandler(SpellEffectName.LearnTransmogSet)]
void EffectLearnTransmogSet(uint effIndex)
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
if (!unitTarget || !unitTarget.IsPlayer())
return;
unitTarget.ToPlayer().GetSession().GetCollectionMgr().AddTransmogSet((uint)effectInfo.MiscValue);
}
}
public class DispelCharges
+1 -1
View File
@@ -3313,7 +3313,7 @@ namespace Game.Spells
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 252 SPELL_EFFECT_252
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 253 SPELL_EFFECT_GIVE_HONOR
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 254 SPELL_EFFECT_254
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None) // 255 SPELL_EFFECT_255
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit) // 255 SPELL_EFFECT_LEARN_TRANSMOG_SET
};
#region Fields
+3 -3
View File
@@ -509,7 +509,7 @@ namespace Game.Entities
if (procEntry.SpellFamilyName != 0 && eventSpellInfo != null && (procEntry.SpellFamilyName != eventSpellInfo.SpellFamilyName))
return false;
if (procEntry.SpellFamilyMask != null && eventSpellInfo != null && !(procEntry.SpellFamilyMask & eventSpellInfo.SpellFamilyFlags))
if (eventSpellInfo != null && !(procEntry.SpellFamilyMask & eventSpellInfo.SpellFamilyFlags))
return false;
}
@@ -3158,7 +3158,7 @@ namespace Game.Entities
case AuraType.SpellMagnet:
case AuraType.ModAttackPower:
case AuraType.ModPowerRegenPercent:
case AuraType.AddCasterHitTrigger:
case AuraType.InterceptMeleeRangedAttacks:
case AuraType.OverrideClassScripts:
case AuraType.ModMechanicResistance:
case AuraType.MeleeAttackPowerAttackerBonus:
@@ -3385,7 +3385,7 @@ namespace Game.Entities
{
public SpellSchoolMask SchoolMask { get; set; } // if nonzero - bitmask for matching proc condition based on spell's school
public SpellFamilyNames SpellFamilyName { get; set; } // if nonzero - for matching proc condition based on candidate spell's SpellFamilyName
public FlagArray128 SpellFamilyMask { get; set; } // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags
public FlagArray128 SpellFamilyMask { get; set; } = new FlagArray128(); // if nonzero - bitmask for matching proc condition based on candidate spell's SpellFamilyFlags
public ProcFlags ProcFlags { get; set; } // if nonzero - owerwrite procFlags field for given Spell.dbc entry, bitmask for matching proc condition, see enum ProcFlags
public ProcFlagsSpellType SpellTypeMask { get; set; } // if nonzero - bitmask for matching proc condition based on candidate spell's damage/heal effects, see enum ProcFlagsSpellType
public ProcFlagsSpellPhase SpellPhaseMask { get; set; } // if nonzero - bitmask for matching phase of a spellcast on which proc occurs, see enum ProcFlagsSpellPhase