public static void HandleActivateUnit(WorldSession session, ClientActivateUnit unit) { WorldEntity entity = session.Player.GetVisible <WorldEntity>(unit.UnitId); if (entity == null) { throw new InvalidPacketValueException(); } // TODO: sanity check for range etc. entity.OnActivate(session.Player); }