fix: Fixes negative acts from explosion spell. Fixes Orc Brute ability (#1974)

This commit is contained in:
Kamron Batman 2024-10-15 17:51:14 -07:00 committed by GitHub
parent 26c7f5c49b
commit 9f985b0c38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 6 deletions

View file

@ -102,7 +102,7 @@ namespace Server.Mobiles
{
var map = target.Map;
if (map == null)
if (map == null || map == Map.Internal)
{
return;
}
@ -112,14 +112,20 @@ namespace Server.Mobiles
{
if (++count == 10)
{
BaseCreature orc = new SpawnedOrcishLord { Team = Team };
// This MoveToWorld is safe since we return after executing and do not keep looping.
orc.MoveToWorld(map.GetRandomNearbyLocation(target.Location), map);
orc.Combatant = target;
return;
}
}
var location = map.GetRandomNearbyLocation(target.Location);
var orc = new SpawnedOrcishLord
{
Team = Team,
Home = location,
RangeHome = 10,
Combatant = target
};
orc.MoveToWorld(location, map);
}
}
}

View file

@ -68,6 +68,11 @@ namespace Server.Spells.Sixth
protected override void OnTick()
{
if (_defender.Deleted || !_defender.Alive)
{
return;
}
if (_attacker.HarmfulCheck(_defender))
{
double damage;