More Cleanups
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Game.Entities
|
||||
{
|
||||
_charmspells[x].SetActionAndType(spellId, ActiveStates.Disabled);
|
||||
|
||||
ActiveStates newstate = ActiveStates.Passive;
|
||||
ActiveStates newstate;
|
||||
|
||||
if (!spellInfo.IsAutocastable())
|
||||
newstate = ActiveStates.Passive;
|
||||
|
||||
@@ -1337,7 +1337,7 @@ namespace Game.Entities
|
||||
// 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8.
|
||||
// MISS > DODGE > PARRY > GLANCING > BLOCK > CRIT > CRUSHING > HIT
|
||||
|
||||
int sum = 0, tmp = 0;
|
||||
int sum = 0;
|
||||
int roll = RandomHelper.IRand(0, 9999);
|
||||
|
||||
uint attackerLevel = GetLevelForTarget(victim);
|
||||
@@ -1357,7 +1357,7 @@ namespace Game.Entities
|
||||
}
|
||||
|
||||
// 1. MISS
|
||||
tmp = miss_chance;
|
||||
int tmp = miss_chance;
|
||||
if (tmp > 0 && roll < (sum += tmp))
|
||||
return MeleeHitOutcome.Miss;
|
||||
|
||||
@@ -1477,9 +1477,9 @@ namespace Game.Entities
|
||||
|
||||
if (minDamage > maxDamage)
|
||||
{
|
||||
minDamage = minDamage + maxDamage;
|
||||
minDamage += maxDamage;
|
||||
maxDamage = minDamage - maxDamage;
|
||||
minDamage = minDamage - maxDamage;
|
||||
minDamage -= maxDamage;
|
||||
}
|
||||
|
||||
if (maxDamage == 0.0f)
|
||||
|
||||
@@ -84,7 +84,6 @@ namespace Game.Entities
|
||||
|
||||
//Spells
|
||||
protected Dictionary<CurrentSpellTypes, Spell> m_currentSpells = new((int)CurrentSpellTypes.Max);
|
||||
Dictionary<SpellValueMod, int> CustomSpellValueMod = new();
|
||||
MultiMap<uint, uint>[] m_spellImmune = new MultiMap<uint, uint>[(int)SpellImmunity.Max];
|
||||
SpellAuraInterruptFlags m_interruptMask;
|
||||
SpellAuraInterruptFlags2 m_interruptMask2;
|
||||
@@ -93,7 +92,6 @@ namespace Game.Entities
|
||||
SpellHistory _spellHistory;
|
||||
|
||||
//Auras
|
||||
List<AuraEffect> AuraEffectList = new();
|
||||
MultiMap<AuraType, AuraEffect> m_modAuras = new();
|
||||
List<Aura> m_removedAuras = new();
|
||||
List<AuraApplication> m_interruptableAuras = new(); // auras which have interrupt mask applied on unit
|
||||
|
||||
@@ -687,8 +687,8 @@ namespace Game.Entities
|
||||
uint areaId = GetAreaId();
|
||||
uint ridingSkill = 5000;
|
||||
AreaMountFlags mountFlags = 0;
|
||||
bool isSubmerged = false;
|
||||
bool isInWater = false;
|
||||
bool isSubmerged;
|
||||
bool isInWater;
|
||||
|
||||
if (IsTypeId(TypeId.Player))
|
||||
ridingSkill = ToPlayer().GetSkillValue(SkillType.Riding);
|
||||
@@ -705,8 +705,7 @@ namespace Game.Entities
|
||||
mountFlags = (AreaMountFlags)areaTable.MountFlags;
|
||||
}
|
||||
|
||||
LiquidData liquid;
|
||||
ZLiquidStatus liquidStatus = GetMap().GetLiquidStatus(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), LiquidHeaderTypeFlags.AllLiquids, out liquid);
|
||||
ZLiquidStatus liquidStatus = GetMap().GetLiquidStatus(GetPhaseShift(), GetPositionX(), GetPositionY(), GetPositionZ(), LiquidHeaderTypeFlags.AllLiquids, out _);
|
||||
isSubmerged = liquidStatus.HasAnyFlag(ZLiquidStatus.UnderWater) || HasUnitMovementFlag(MovementFlag.Swimming);
|
||||
isInWater = liquidStatus.HasAnyFlag(ZLiquidStatus.InWater | ZLiquidStatus.UnderWater);
|
||||
|
||||
|
||||
@@ -1371,7 +1371,7 @@ namespace Game.Entities
|
||||
|
||||
public bool IsVisible()
|
||||
{
|
||||
return (m_serverSideVisibility.GetValue(ServerSideVisibilityType.GM) > (uint)AccountTypes.Player) ? false : true;
|
||||
return m_serverSideVisibility.GetValue(ServerSideVisibilityType.GM) <= (uint)AccountTypes.Player;
|
||||
}
|
||||
|
||||
public void SetVisible(bool val)
|
||||
|
||||
Reference in New Issue
Block a user