Adds BufferReader and BufferWriter. Updates UOP handling. (#101)

This commit is contained in:
Kamron Batman 2020-04-12 21:33:24 -07:00 • committed by GitHub
parent 2c0d97cd36
commit 038c3be258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
98 changed files with 2458 additions and 2185 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Items;
namespace Server.Mobiles
@ -71,21 +72,16 @@ namespace Server.Mobiles
EventSink.PlayerDeath += EventSink_PlayerDeath;
}
public static void EventSink_PlayerDeath(PlayerDeathEventArgs e)
public static void EventSink_PlayerDeath(Mobile m)
{
Mobile m = e.Mobile;
Mobile lastKiller = m.LastKiller;
if (lastKiller is BaseCreature creature)
lastKiller = creature.GetMaster();
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Set.Contains(lastKiller))
foreach (AggressorInfo ai in m.Aggressors)
if (ai.Attacker == lastKiller && ai.CanReportMurder)
{
SummonRevenant(m, lastKiller);
break;
}
if (IsInsideKhaldun(m) && IsInsideKhaldun(lastKiller) && lastKiller.Player && !m_Set.Contains(lastKiller) &&
m.Aggressors.Any(ai => ai.Attacker == lastKiller && ai.CanReportMurder))
SummonRevenant(m, lastKiller);
}
public static void SummonRevenant(Mobile victim, Mobile killer)