fix: Fixes ignoring mobs, champions, party crash, slayer rarity, boat speedhack, etc (#1222)

* Movie ignore mobiles to Mobile class
* Allow necromancer familiars to ignore mobiles
* ChampionSpawn should not quietly fail when creating new spawn
* Fix client party crash bug: 2 people partied, the leader logs out, other client is hung
* Fix spellbooks creating with magery/meditation only and creating magery multiple times
* Fix BaseRunicTool.GetRandomSlayer() creating more undead slayers than intended
* Do not allow players to dismount each other whilst mounted
* Fix AOS onwards damage increase tooltip and wrong formula in AOS
* Fix monsters killing other monster revenants + animate dead should not attack player pets + other animates
* Fix fire steed having loot pack added twice
* Fix oaks spawn not able to create Unicorns + Kirins via Activator.CreateInstace() due to constructor having name as parametr
* Fix ignoreMobiles flag not propagated to client for non-players.
* Fix harrower tents not leeching from players
* Fix boats speedhacking around the map
* Fix bless, agility etc. not renewing duration
* Fix reveal always worked
* Fix empty constructor for steeds so they don't throw now.
This commit is contained in:
mark1145 2022-10-31 22:16:50 -07:00 • committed by GitHub
parent 910e06767b
commit 053dbcbad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 871 additions and 454 deletions

View file

@ -77,17 +77,38 @@ namespace Server.Spells.Necromancy
pool.Enqueue(m);
}
var eable = m.GetMobilesInRange(2);
var cbc = Caster as BaseCreature;
var isMonster = cbc?.Controlled == false && (cbc.IsAnimatedDead || !cbc.Summoned);
var eable = m.GetMobilesInRange(2);
foreach (Mobile targ in eable)
{
if (!(Caster is BaseCreature && targ is BaseCreature) &&
targ != Caster && m != targ &&
SpellHelper.ValidIndirectTarget(Caster, targ) &&
Caster.CanBeHarmful(targ, false))
if (targ == Caster || m == targ || !SpellHelper.ValidIndirectTarget(Caster, targ)
|| !Caster.CanBeHarmful(targ, false))
{
pool.Enqueue(targ);
continue;
}
if (isMonster && targ.Player)
{
continue;
}
// Animate dead casting poison strike shouldn't hit: familiars or player or pets
if (targ is BaseCreature bc)
{
if (bc.IsAnimatedDead)
{
continue;
}
if (isMonster && (bc.Controlled || bc.Summoned || bc.Team == cbc.Team || bc.IsNecroFamiliar))
{
continue;
}
}
pool.Enqueue(targ);
}
eable.Free();

View file

@ -49,33 +49,39 @@ namespace Server.Spells.Necromancy
using var pool = PooledRefQueue<Mobile>.Create();
var cbc = Caster as BaseCreature;
var isMonster = cbc?.Controlled == false && !cbc.Summoned;
var isMonster = cbc?.Controlled == false && (cbc.IsAnimatedDead || !cbc.Summoned);
var eable = Caster.GetMobilesInRange(Core.ML ? 4 : 5);
foreach (var m in eable)
foreach (var targ in eable)
{
if (Caster == m || !Caster.InLOS(m) || (!isMonster && !SpellHelper.ValidIndirectTarget(Caster, m)) ||
!Caster.CanBeHarmful(m, false))
if (targ == Caster
|| !Caster.InLOS(targ)
|| !isMonster && !SpellHelper.ValidIndirectTarget(Caster, targ)
|| !Caster.CanBeHarmful(targ, false))
{
continue;
}
if (isMonster)
if (isMonster && targ.Player)
{
if (m is BaseCreature bc)
continue;
}
// Animate dead casting poison strike shouldn't hit: familiars or player or pets
if (targ is BaseCreature bc)
{
if (bc.IsAnimatedDead)
{
if (!bc.Controlled && !bc.Summoned && bc.Team == cbc.Team)
{
continue;
}
continue;
}
else if (!m.Player)
if (isMonster && (bc.Controlled || bc.Summoned || bc.Team == cbc.Team || bc.IsNecroFamiliar))
{
continue;
}
}
pool.Enqueue(m);
pool.Enqueue(targ);
}
eable.Free();