Skip to content

Commit

Permalink
fix: Fixes negative acts from explosion spell. Fixes Orc Brute ability (
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman authored Oct 16, 2024
1 parent 26c7f5c commit 9f985b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/OrcBrute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void SpawnOrcLord(Mobile target)
{
var map = target.Map;

if (map == null)
if (map == null || map == Map.Internal)
{
return;
}
Expand All @@ -112,14 +112,20 @@ public void SpawnOrcLord(Mobile target)
{
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);
}
}
}
5 changes: 5 additions & 0 deletions Projects/UOContent/Spells/Sixth/Explosion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public InternalTimer(MagerySpell spell, Mobile attacker, Mobile defender, Mobile

protected override void OnTick()
{
if (_defender.Deleted || !_defender.Alive)
{
return;
}

if (_attacker.HarmfulCheck(_defender))
{
double damage;
Expand Down

0 comments on commit 9f985b0

Please sign in to comment.