Misc cleanups
This commit is contained in:
@@ -166,7 +166,7 @@ namespace Game.Chat
|
|||||||
// the max level of the new profession.
|
// the max level of the new profession.
|
||||||
ushort max = maxPureSkill != 0 ? maxPureSkill : targetHasSkill ? target.GetPureMaxSkillValue((SkillType)skill) : (ushort)level;
|
ushort max = maxPureSkill != 0 ? maxPureSkill : targetHasSkill ? target.GetPureMaxSkillValue((SkillType)skill) : (ushort)level;
|
||||||
|
|
||||||
if (level == 0 || level > max || max <= 0)
|
if (level == 0 || level > max)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If the player has the skill, we get the current skill step. If they don't have the skill, we
|
// If the player has the skill, we get the current skill step. If they don't have the skill, we
|
||||||
|
|||||||
@@ -1740,7 +1740,7 @@ namespace Game.Entities
|
|||||||
if (!_IsTargetAcceptable(who))
|
if (!_IsTargetAcceptable(who))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!force && (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance)))
|
if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2638,7 +2638,7 @@ namespace Game.Entities
|
|||||||
|
|
||||||
// can't assist player out of sanctuary from sanctuary if has pvp enabled
|
// can't assist player out of sanctuary from sanctuary if has pvp enabled
|
||||||
if (unitTarget.IsPvP())
|
if (unitTarget.IsPvP())
|
||||||
if (unit != null && unit.IsInSanctuary() && !unitTarget.IsInSanctuary())
|
if (unit.IsInSanctuary() && !unitTarget.IsInSanctuary())
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ namespace Game.Entities
|
|||||||
if (pvpInfo.EndTimer == 0 || (currTime < pvpInfo.EndTimer + 300) || pvpInfo.IsHostile)
|
if (pvpInfo.EndTimer == 0 || (currTime < pvpInfo.EndTimer + 300) || pvpInfo.IsHostile)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pvpInfo.EndTimer != 0 && pvpInfo.EndTimer <= currTime)
|
if (pvpInfo.EndTimer <= currTime)
|
||||||
{
|
{
|
||||||
pvpInfo.EndTimer = 0;
|
pvpInfo.EndTimer = 0;
|
||||||
RemovePlayerFlag(PlayerFlags.PVPTimer);
|
RemovePlayerFlag(PlayerFlags.PVPTimer);
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ namespace Game.Entities
|
|||||||
CharmType type;
|
CharmType type;
|
||||||
if (HasUnitState(UnitState.Possessed))
|
if (HasUnitState(UnitState.Possessed))
|
||||||
type = CharmType.Possess;
|
type = CharmType.Possess;
|
||||||
else if (charmer && charmer.IsOnVehicle(this))
|
else if (charmer.IsOnVehicle(this))
|
||||||
type = CharmType.Vehicle;
|
type = CharmType.Vehicle;
|
||||||
else
|
else
|
||||||
type = CharmType.Charm;
|
type = CharmType.Charm;
|
||||||
|
|||||||
@@ -645,7 +645,7 @@ namespace Game
|
|||||||
if (!groupGuy)
|
if (!groupGuy)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!groupGuy.IsInMap(groupGuy))
|
if (!groupGuy.IsInWorld)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (groupGuy.GetMap().IsNonRaidDungeon())
|
if (groupGuy.GetMap().IsNonRaidDungeon())
|
||||||
@@ -725,7 +725,7 @@ namespace Game
|
|||||||
if (!groupGuy)
|
if (!groupGuy)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!groupGuy.IsInMap(groupGuy))
|
if (!groupGuy.IsInWorld)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (groupGuy.GetMap().IsRaid())
|
if (groupGuy.GetMap().IsRaid())
|
||||||
|
|||||||
Reference in New Issue
Block a user