private static void OnSingleClick(NetState state, PacketReader pvSrc) { if (state == null || pvSrc == null) { return; } PlayerMobile viewer = null; PlayerMobile target = null; TitleDisplay?d = null; if (CMOptions.ModuleEnabled && state.Mobile is PlayerMobile) { viewer = (PlayerMobile)state.Mobile; int pos = pvSrc.Seek(0, SeekOrigin.Current); pvSrc.Seek(1, SeekOrigin.Begin); Serial s = pvSrc.ReadInt32(); pvSrc.Seek(pos, SeekOrigin.Begin); if (s.IsMobile) { target = World.FindMobile(s) as PlayerMobile; if (target != null && viewer.CanSee(target) && Utility.InUpdateRange(viewer, target)) { Title t; if (GetTitle(target, out t) && t != null) { d = t.Display; } } } } var battle = AutoPvP.FindBattle(target) as UOF_PvPBattle; if (d != null && d.Value == TitleDisplay.BeforeName && (battle == null || !battle.IncognitoMode)) { DisplayTitle(viewer, target); } if (LookReqParent != null) { LookReqParent.OnReceive(state, pvSrc); } else { PacketHandlers.LookReq(state, pvSrc); } if (d != null && d.Value == TitleDisplay.AfterName && (battle == null || !battle.IncognitoMode)) { DisplayTitle(viewer, target); } }
public static void InvokeLookReqParent(NetState state, PacketReader pvSrc) { if (LookReqParent != null) { LookReqParent.OnReceive(state, pvSrc); } else { PacketHandlers.LookReq(state, pvSrc); } }