private void Mob_OnDead(IKillable sender, IKiller killer) { var mob = (Mob)sender; RemoveListeners(mob); Mobs.TryRemove(mob.Id, out var removedMob); foreach (var player in GetAllPlayers(true)) { _packetsHelper.SendMobDead(player.Client, sender, killer); } // Add experience to killer character/party if (killer is Character killerCharacter) { if (killerCharacter.HasParty) { killerCharacter.AddPartyMobExperience(mob.Level, (ushort)mob.Exp); } else { killerCharacter.AddMobExperience(mob.Level, (ushort)mob.Exp); } } }
private void Mob_OnDead(IKillable sender, IKiller killer) { var mob = (Mob)sender; RemoveListeners(mob); Mobs.TryRemove(mob.Id, out var removedMob); foreach (var player in GetAllPlayers(true)) { _packetsHelper.SendMobDead(player.Client, sender, killer); } }