fix: Fixes EVs/BSs attacking players in Pre-AOS (#2132)
This commit is contained in:
parent
b8a8bfd1a9
commit
bcab91255a
5 changed files with 22 additions and 20 deletions
|
|
@ -387,6 +387,12 @@ namespace Server.Misc
|
|||
return Notoriety.Invulnerable;
|
||||
}
|
||||
|
||||
// Moved above AccessLevel check so staff summons are red
|
||||
if (bcTarg?.AlwaysMurderer == true)
|
||||
{
|
||||
return Notoriety.Murderer;
|
||||
}
|
||||
|
||||
var pmFrom = source as PlayerMobile;
|
||||
var pmTarg = target as PlayerMobile;
|
||||
|
||||
|
|
@ -434,7 +440,7 @@ namespace Server.Misc
|
|||
|
||||
if (target.Kills >= 5 ||
|
||||
target.Body.IsMonster && IsSummoned(bcTarg) && target is not BaseFamiliar && target is not ArcaneFey &&
|
||||
target is not Golem || bcTarg?.AlwaysMurderer == true || bcTarg?.IsAnimatedDead == true)
|
||||
target is not Golem || bcTarg?.IsAnimatedDead == true)
|
||||
{
|
||||
return Notoriety.Murderer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2672,39 +2672,27 @@ public abstract class BaseAI
|
|||
var pm = m as PlayerMobile;
|
||||
|
||||
// Monster don't attack it's own summon or the summon of another monster
|
||||
if (Core.AOS && bc != null && bc.Summoned && (bc.SummonMaster == m_Mobile || (!bc.SummonMaster.Player && IsHostile(bc.SummonMaster))))
|
||||
if (Core.AOS && bc != null && bc.Summoned && (bc.SummonMaster == m_Mobile || !bc.SummonMaster.Player && IsHostile(bc.SummonMaster)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m_Mobile.Summoned && m_Mobile.SummonMaster != null)
|
||||
{
|
||||
// If this is a summon, it can't target its controller.
|
||||
if (m == m_Mobile.SummonMaster)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// It also must abide by harmful spell rules.
|
||||
if (!SpellHelper.ValidIndirectTarget(m_Mobile.SummonMaster, m))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Animated creatures cannot attack players directly.
|
||||
if (pm != null && m_Mobile.IsAnimatedDead)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Animated creatures cannot attack other animated creatures
|
||||
if (m_Mobile.IsAnimatedDead && bc?.IsAnimatedDead == true)
|
||||
// Animated creatures cannot attack other animated creatures or pets of other players
|
||||
if (m_Mobile.IsAnimatedDead && bc != null && (bc.IsAnimatedDead || bc.Controlled))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Animated creatures cannot attack pets of other players
|
||||
if (m_Mobile.IsAnimatedDead && bc?.Controlled == true)
|
||||
// If this is a summon, it can't target its controller or invalid targets.
|
||||
if (m_Mobile.FollowsAcquireRules && (m == m_Mobile.SummonMaster || !SpellHelper.ValidIndirectTarget(m_Mobile, m)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2771,7 +2759,9 @@ public abstract class BaseAI
|
|||
}
|
||||
|
||||
var theirVal = m_Mobile.GetFightModeRanking(m, acqType, bPlayerOnly);
|
||||
if (theirVal > val && m_Mobile.InLOS(m))
|
||||
|
||||
// Always prefer someone else over the summon master (EV/BS)
|
||||
if ((theirVal > val || newFocusMob == m_Mobile.SummonMaster) && m_Mobile.InLOS(m))
|
||||
{
|
||||
newFocusMob = m;
|
||||
val = theirVal;
|
||||
|
|
|
|||
|
|
@ -448,6 +448,8 @@ namespace Server.Mobiles
|
|||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool IsPrisoner { get; set; }
|
||||
|
||||
public virtual bool FollowsAcquireRules => true;
|
||||
|
||||
protected DateTime SummonEnd { get; set; }
|
||||
|
||||
public virtual Faction FactionAllegiance => null;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override string CorpseName => "a blade spirit corpse";
|
||||
public override string DefaultName => "a blade spirit";
|
||||
|
||||
|
||||
public override bool DeleteCorpseOnDeath => Core.AOS;
|
||||
public override bool IsHouseSummonable => true;
|
||||
|
||||
|
|
@ -55,6 +55,8 @@ namespace Server.Mobiles
|
|||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override bool FollowsAcquireRules => Core.AOS || !Summoned || SummonMaster?.Player != true || Map != Map.Felucca;
|
||||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly) =>
|
||||
(m.Str + m.Skills.Tactics.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ namespace Server.Mobiles
|
|||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override bool FollowsAcquireRules => Core.AOS || !Summoned || SummonMaster?.Player != true || Map != Map.Felucca;
|
||||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly) =>
|
||||
(m.Int + m.Skills.Magery.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue