Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading